Commit 71f0d9e0 authored by Pavel Tvrdik's avatar Pavel Tvrdik
Browse files

Merge branch 'master' into mrtdump

parents 1dea356a 1e3810f9
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
Version 1.6.0 (2016-04-29)
  o Major RIP protocol redesign
  o New Babel routing protocol
  o BGP multipath support
  o KRT: Add support for plenty of kernel route metrics
  o KRT: Allow more than 256 routing tables
  o Static: Allow to specify attributes for static routes
  o Static: Support for BFD controlled static routes
  o FreeBSD: Setup password for BGP MD5 authentication
  o IO: Remove socket number limit
  o Plenty of bug fixes

  Upgrade notes:

  For RIP, most protocol options were moved to interface blocks.


Version 1.5.0 (2015-04-20)
  o Major OSPF protocol redesign.
  o OSPFv2 multi-instance extension (RFC 6549).
+8 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@

#define SERVER_READ_BUF_LEN 4096

static char *opt_list = "s:vr";
static char *opt_list = "s:vrl";
static int verbose, restricted, once;
static char *init_cmd;

@@ -59,13 +59,14 @@ int term_lns, term_cls;
static void
usage(char *name)
{
  fprintf(stderr, "Usage: %s [-s <control-socket>] [-v] [-r]\n", name);
  fprintf(stderr, "Usage: %s [-s <control-socket>] [-v] [-r] [-l]\n", name);
  exit(1);
}

static void
parse_args(int argc, char **argv)
{
  int server_changed = 0;
  int c;

  while ((c = getopt(argc, argv, opt_list)) >= 0)
@@ -73,6 +74,7 @@ parse_args(int argc, char **argv)
      {
      case 's':
	server_path = optarg;
	server_changed = 1;
	break;
      case 'v':
	verbose++;
@@ -80,6 +82,10 @@ parse_args(int argc, char **argv)
      case 'r':
	restricted = 1;
	break;
      case 'l':
	if (!server_changed)
	  server_path = xbasename(server_path);
	break;
      default:
	usage(argv[0]);
      }
+3 −0
Original line number Diff line number Diff line
@@ -206,6 +206,9 @@ fi
AC_SUBST(iproutedir)

all_protocols="$proto_bfd bgp ospf pipe $proto_radv rip static"
if test "$ip" = ipv6 ; then
   all_protocols="$all_protocols babel"
fi
all_protocols=`echo $all_protocols | sed 's/ /,/g'`

if test "$with_protocols" = all ; then
+198 −26
Original line number Diff line number Diff line
@@ -171,6 +171,11 @@ BIRD executable by configuring out routing protocols you don't use, and
	<tag>-f</tag>
	run bird in foreground.

	<tag>-l</tag>
	look for a configuration file and a communication socket in the current
	working directory instead of in default system locations. However, paths
	specified by options <cf/-c/, <cf/-s/ have higher priority.

	<tag>-R</tag>
	apply graceful restart recovery after start.
</descrip>
@@ -746,6 +751,10 @@ This argument can be omitted if there exists only a single instance.
	Show router status, that is BIRD version, uptime and time from last
	reconfiguration.

	<tag>show interfaces [summary]</tag>
	Show the list of interfaces. For each interface, print its type, state,
	MTU and addresses assigned.

	<tag>show protocols [all]</tag>
	Show list of protocol instances along with tables they are connected to
	and protocol status, possibly giving verbose information, if <cf/all/ is
@@ -773,16 +782,18 @@ This argument can be omitted if there exists only a single instance.
	Show contents of an OSPF LSA database. Options could be used to filter
	entries.

	<tag>show rip interfaces [<m/name/] ["<m/interface/"]</tag>
	Show detailed information about RIP interfaces.

	<tag>show rip neighbors [<m/name/] ["<m/interface/"]</tag>
	Show a list of RIP neighbors and associated state.

	<tag>show static [<m/name/]</tag>
	Show detailed information about static routes.

	<tag>show bfd sessions [<m/name/]</tag>
	Show information about BFD sessions.

	<tag>show interfaces [summary]</tag>
	Show the list of interfaces. For each interface, print its type, state,
	MTU and addresses assigned.

	<tag>show symbols [table|filter|function|protocol|template|roa|<m/symbol/]</tag>
	Show the list of symbols defined in the configuration (names of
	protocols, routing tables etc.).
@@ -1408,6 +1419,102 @@ corresponding protocol sections.

<chapt>Protocols

<sect>Babel

<sect1>Introduction

<p>The Babel protocol (RFC6126) is a loop-avoiding distance-vector routing
protocol that is robust and efficient both in ordinary wired networks and in
wireless mesh networks. Babel is conceptually very simple in its operation and
"just works" in its default configuration, though some configuration is possible
and in some cases desirable.

<p>While the Babel protocol is dual stack (i.e., can carry both IPv4 and IPv6
routes over the same IPv6 transport), BIRD presently implements only the IPv6
subset of the protocol. No Babel extensions are implemented, but the BIRD
implementation can coexist with implementations using the extensions (and will
just ignore extension messages).

<p>The Babel protocol implementation in BIRD is currently in alpha stage.

<sect1>Configuration

<p>Babel supports no global configuration options apart from those common to all
other protocols, but supports the following per-interface configuration options:

<code>
protocol babel [<name>] {
	interface <interface pattern> {
		type <wired|wireless>;
		rxcost <number>;
		hello interval <number>;
		update interval <number>;
		port <number>;
		tx class|dscp <number>;
		tx priority <number>;
		rx buffer <number>;
		tx length <number>;
		check link <switch>;
	};
}
</code>

<descrip>
      <tag>type wired|wireless </tag>
      This option specifies the interface type: Wired or wireless. Wired
      interfaces are considered more reliable, and so the default hello
      interval is higher, and a neighbour is considered unreachable after only
      a small number of "hello" packets are lost. On wireless interfaces,
      hello packets are sent more often, and the ETX link quality estimation
      technique is used to compute the metrics of routes discovered over this
      interface. This technique will gradually degrade the metric of routes
      when packets are lost rather than the more binary up/down mechanism of
      wired type links. Default: <cf/wired/.

      <tag>rxcost <m/num/</tag>
      This specifies the RX cost of the interface. The route metrics will be
      computed from this value with a mechanism determined by the interface
      <cf/type/. Default: 96 for wired interfaces, 256 for wireless.

      <tag>hello interval <m/num/</tag>
      Interval at which periodic "hello" messages are sent on this interface,
      in seconds. Default: 4 seconds.

      <tag>update interval <m/num/</tag>
      Interval at which periodic (full) updates are sent. Default: 4 times the
      hello interval.

      <tag>port <m/number/</tag>
      This option selects an UDP port to operate on. The default is to operate
      on port 6696 as specified in the Babel RFC.

      <tag>tx class|dscp|priority <m/number/</tag>
      These options specify the ToS/DiffServ/Traffic class/Priority of the
      outgoing Babel packets. See <ref id="dsc-prio" name="tx class"> common
      option for detailed description.

      <tag>rx buffer <m/number/</tag>
      This option specifies the size of buffers used for packet processing.
      The buffer size should be bigger than maximal size of received packets.
      The default value is the interface MTU, and the value will be clamped to a
      minimum of 512 bytes + IP packet overhead.

      <tag>tx length <m/number/</tag>
      This option specifies the maximum length of generated Babel packets. To
      avoid IP fragmentation, it should not exceed the interface MTU value.
      The default value is the interface MTU value, and the value will be
      clamped to a minimum of 512 bytes + IP packet overhead.

      <tag>check link <m/switch/</tag>
      If set, the hardware link state (as reported by OS) is taken into
      consideration. When the link disappears (e.g. an ethernet cable is
      unplugged), neighbors are immediately considered unreachable and all
      routes received from them are withdrawn. It is possible that some
      hardware drivers or platforms do not implement this feature. Default:
      yes.
</descrip>


<sect><label id="sect-bfd">BFD

<sect1>Introduction
@@ -1792,9 +1899,20 @@ using the following configuration parameters:
	only. Default: disabled.

	<tag>password <m/string/</tag>
	Use this password for MD5 authentication of BGP sessions. Default: no
	authentication. Password has to be set by external utility
	(e.g. setkey(8)) on BSD systems.
	Use this password for MD5 authentication of BGP sessions (RFC 2385).
	When used on BSD systems, see also <cf/setkey/ option below. Default:
	no authentication.

	<tag>setkey <m/switch/</tag>
	On BSD systems, keys for TCP MD5 authentication are stored in the global
	SA/SP database, which can be accessed by external utilities (e.g.
	setkey(8)). BIRD configures security associations in the SA/SP database
	automatically based on <cf/password/ options (see above), this option
	allows to disable automatic updates by BIRD when manual configuration by
	external utilities is preferred. Note that automatic SA/SP database
	updates are currently implemented only for FreeBSD. Passwords have to be
	set manually by an external utility on NetBSD and OpenBSD. Default:
	enabled (ignored on non-FreeBSD).

	<tag>passive <m/switch/</tag>
	Standard BGP behavior is both initiating outgoing connections and
@@ -2189,7 +2307,7 @@ conditions, because a lower priority IGP route for the same network is not
exported to the kernel routing table. This is an issue on BSD systems only, as
on Linux systems BIRD cannot change non-BIRD route in the kernel routing table.

<p>The only configurable thing about direct is what interfaces it watches:
<p>There are just few configuration options for the Direct protocol:

<p><descrip>
	<tag>interface <m/pattern [, ...]/</tag>
@@ -2200,6 +2318,12 @@ on Linux systems BIRD cannot change non-BIRD route in the kernel routing table.
	interfaces), just use this clause. See <ref id="dsc-iface" name="interface">
	common option for detailed description. The Direct protocol uses
	extended interface clauses.

	<tag>check link <m/switch/</tag>
	If enabled, a hardware link state (reported by OS) is taken into
	consideration. Routes for directly connected networks are generated only
	if link up is reported and they are withdrawn when link disappears
	(e.g., an ethernet cable is unplugged). Default value is no.
</descrip>

<p>Direct device routes don't contain any specific attributes.
@@ -3404,6 +3528,11 @@ protocol rip [&lt;name&gt;] {
	RIP, the option is not supported for RIPng, as no further versions are
	defined.

	<tag>version only <m/switch/</tag>
	Regardless of RIP version configured for the interface, BIRD accepts
	incoming packets of any RIP version. This option restrict accepted
	packets to the configured version. Default: no.

	<tag>split horizon <m/switch/</tag>
	Split horizon is a scheme for preventing routing loops. When split
	horizon is active, routes are not regularly propagated back to the
@@ -3548,7 +3677,7 @@ default route to prevent routing loops).
packets to a neighboring router, multipath routes specifying several (possibly
weighted) neighboring routers, device routes specifying forwarding to hosts on a
directly connected network, recursive routes computing their nexthops by doing
route table lookups for a given IP and special routes (sink, blackhole etc.)
route table lookups for a given IP, and special routes (sink, blackhole etc.)
which specify a special action to be done instead of forwarding the packet.

<p>When the particular destination is not available (the interface is down or
@@ -3556,8 +3685,26 @@ the next hop of the route is not a neighbor at the moment), Static just
uninstalls the route from the table it is connected to and adds it again as soon
as the destination becomes adjacent again.

<p>The Static protocol does not have many configuration options. The definition
of the protocol contains mainly a list of static routes:
<p>There are three classes of definitions in Static protocol configuration --
global options, static route definitions, and per-route options. Usually, the
definition of the protocol contains mainly a list of static routes.

<p>Global options:

<descrip>
	<tag>check link <m/switch/</tag>
	If set, hardware link states of network interfaces are taken into
	consideration.  When link disappears (e.g. ethernet cable is unplugged),
	static routes directing to that interface are removed. It is possible
	that some hardware drivers or platforms do not implement this feature.
	Default: off.

	<tag>igp table <m/name/</tag>
	Specifies a table that is used for route table lookups of recursive
	routes. Default: the same table as the protocol is connected to.
</descrip>

<p>Route definitions (each may also contain a block of per-route options):

<descrip>
	<tag>route <m/prefix/ via <m/ip/</tag>
@@ -3565,7 +3712,7 @@ of the protocol contains mainly a list of static routes:
	interface can be specified as a part of the address (e.g.,
	<cf/via fe80::1234%eth0/).

	<tag>route <m/prefix/ multipath via <m/ip/ [weight <m/num/] [via ...]</tag>
	<tag>route <m/prefix/ multipath via <m/ip/ [weight <m/num/] [bfd <m/switch/] [via ...]</tag>
	Static multipath route. Contains several nexthops (gateways), possibly
	with their weights.

@@ -3581,17 +3728,33 @@ of the protocol contains mainly a list of static routes:
	Special routes specifying to silently drop the packet, return it as
	unreachable or return it as administratively prohibited. First two
	targets are also known as <cf/drop/ and <cf/reject/.
</descrip>

	<tag>check link <m/switch/</tag>
	If set, hardware link states of network interfaces are taken into
	consideration.  When link disappears (e.g. ethernet cable is unplugged),
	static routes directing to that interface are removed. It is possible
	that some hardware drivers or platforms do not implement this feature.
	Default: off.
<p>Per-route options:

	<tag>igp table <m/name/</tag>
	Specifies a table that is used for route table lookups of recursive
	routes. Default: the same table as the protocol is connected to.
<descrip>
	<tag>bfd <m/switch/</tag>
	The Static protocol could use BFD protocol for next hop liveness
	detection. If enabled, a BFD session to the route next hop is created
	and the static route is BFD-controlled -- the static route is announced
	only if the next hop liveness is confirmed by BFD. If the BFD session
	fails, the static route is removed. Note that this is a bit different
	compared to other protocols, which may use BFD as an advisory mechanism
	for fast failure detection but ignores it if a BFD session is not even
	established.

	This option can be used for static routes with a direct next hop, or
	also for for individual next hops in a static multipath route (see
	above). Note that BFD protocol also has to be configured, see
	<ref id="sect-bfd" name="BFD"> section for details. Default value is no.

	<tag><m/filter expression/</tag>
	This is a special option that allows filter expressions to be configured
	on per-route basis. Can be used multiple times. These expressions are
	evaluated when the route is originated, similarly to the import filter
	of the static protocol. This is especially useful for configuring route
	attributes, e.g., <cf/ospf_metric1 = 100;/ for a route that will be
	exported to the OSPF protocol.
</descrip>

<p>Static routes have no specific attributes.
@@ -3601,13 +3764,22 @@ of the protocol contains mainly a list of static routes:
<p><code>
protocol static {
	table testable;			# Connect to a non-default routing table
	check link;			# Advertise routes only if link is up
	route 0.0.0.0/0 via 198.51.100.130; # Default route
	route 10.0.0.0/8 multipath	# Multipath route
		via 198.51.100.10 weight 2
		via 198.51.100.20
		via 198.51.100.20 bfd	# BFD-controlled next hop
		via 192.0.2.1;
	route 203.0.113.0/24 unreachable; # Sink route
	route 10.2.0.0/24 via "arc0";	# Secondary network
	route 192.168.10.0/24 via 198.51.100.100 {
		ospf_metric1 = 20;	# Set extended attribute
	}
	route 192.168.10.0/24 via 198.51.100.100 {
		ospf_metric2 = 100;	# Set extended attribute
		ospf_tag = 2;		# Set extended attribute
		bfd;			# BFD-controlled route
	}
}
</code>

+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ Reply codes of BIRD command-line interface
1020	Show BFD sessions
1021	Show RIP interface
1022	Show RIP neighbors
1023	Show Babel interfaces
1024	Show Babel neighbors
1025	Show Babel entries

8000	Reply too long
8001	Route not found
Loading