diff --git a/doc/bird.sgml b/doc/bird.sgml index 3ea90920..a7f70df5 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -3,15 +3,16 @@ + Introduction What is BIRD

A -and MRTD, but their capabilities are -limited and they are relatively hard to configure and maintain. +

A and +MRTD , +but their capabilities are limited and they are relatively hard to configure +and maintain.

BIRD is an Internet Routing Daemon designed to avoid all of these shortcomings, -to support all the routing technology used in the today's Internet or planned to be -used in near future and to have a clean extensible architecture allowing new routing -protocols to be incorporated easily. Among other features, BIRD supports: +to support all the routing technology used in the today's Internet or planned to +be used in near future and to have a clean extensible architecture allowing new +routing protocols to be incorporated easily. Among other features, BIRD +supports: both IPv4 and IPv6 protocols @@ -80,50 +90,52 @@ protocols to be incorporated easily. Among other features, BIRD supports: the Routing Information Protocol (RIPv2) the Open Shortest Path First protocol (OSPFv2, OSPFv3) the Router Advertisements for IPv6 hosts - a virtual protocol for exchange of routes between different routing tables on a single host + a virtual protocol for exchange of routes between different + routing tables on a single host a command-line interface allowing on-line control and inspection of status of the daemon - soft reconfiguration (no need to use complex online commands - to change the configuration, just edit the configuration file - and notify BIRD to re-read it and it will smoothly switch itself - to the new configuration, not disturbing routing protocols - unless they are affected by the configuration changes) + soft reconfiguration (no need to use complex online commands to + change the configuration, just edit the configuration file and + notify BIRD to re-read it and it will smoothly switch itself to + the new configuration, not disturbing routing protocols unless + they are affected by the configuration changes) a powerful language for route filtering -

BIRD has been developed at the Faculty of Math and Physics, Charles University, Prague, -Czech Republic as a student project. It can be freely distributed under the terms of the GNU General -Public License. +

BIRD has been developed at the Faculty of Math and Physics, Charles +University, Prague, Czech Republic as a student project. It can be freely +distributed under the terms of the GNU General Public License. -

BIRD has been designed to work on all UNIX-like systems. It has -been developed and tested under Linux 2.0 to 2.6, and then ported to -FreeBSD, NetBSD and OpenBSD, porting to other systems (even non-UNIX -ones) should be relatively easy due to its highly modular -architecture. +

BIRD has been designed to work on all UNIX-like systems. It has been +developed and tested under Linux 2.0 to 2.6, and then ported to FreeBSD, NetBSD +and OpenBSD, porting to other systems (even non-UNIX ones) should be relatively +easy due to its highly modular architecture. + +

BIRD supports either IPv4 or IPv6 protocol, but have to be compiled separately +for each one. Therefore, a dualstack router would run two instances of BIRD (one +for IPv4 and one for IPv6), with completely separate setups (configuration +files, tools ...). -

BIRD supports either IPv4 or IPv6 protocol, but have to be compiled -separately for each one. Therefore, a dualstack router would run two -instances of BIRD (one for IPv4 and one for IPv6), with completely -separate setups (configuration files, tools ...). Installing BIRD -

On a recent UNIX system with GNU development tools (GCC, binutils, m4, make) and Perl, installing BIRD should be as easy as: +

On a recent UNIX system with GNU development tools (GCC, binutils, m4, make) +and Perl, installing BIRD should be as easy as: - ./configure - make - make install - vi /usr/local/etc/bird.conf + ./configure + make + make install + vi /usr/local/etc/bird.conf bird

You can use ./configure --help to get a list of configure -options. The most important ones are: -/usr/local. +options. The most important ones are: /usr/local. + Running BIRD @@ -140,11 +152,12 @@ options. The most important ones are: log debugging information to given file instead of stderr. -p - just parse the config file and exit. Return value is zero if the config file is valid, - nonzero if there are some errors. + just parse the config file and exit. Return value is zero if the config + file is valid, nonzero if there are some errors. -s - use given filename for a socket for communications with the client, default is /var/run/bird.ctl. + use given filename for a socket for communications with the client, + default is /var/run/bird.ctl. -P create a PID file with given filename. @@ -164,87 +177,81 @@ options. The most important ones are:

BIRD writes messages about its work to log files or syslog (according to config). + Privileges -

BIRD, as a routing daemon, uses several privileged operations (like -setting routing table and using raw sockets). Traditionally, BIRD is -executed and runs with root privileges, which may be prone to security -problems. The recommended way is to use a privilege restriction -(options BIRD, as a routing daemon, uses several privileged operations (like setting +routing table and using raw sockets). Traditionally, BIRD is executed and runs +with root privileges, which may be prone to security problems. The recommended +way is to use a privilege restriction (options A nonprivileged user (as an argument to A nonprivileged user (as an argument to Finally, there is a possibility to use external tools to run BIRD in -an environment with restricted privileges. This may need some -configuration, but it is generally easy -- BIRD needs just the -standard library, privileges to read the config file and create the -control socket and the CAP_NET_* capabilities. +

Finally, there is a possibility to use external tools to run BIRD in an +environment with restricted privileges. This may need some configuration, but it +is generally easy -- BIRD needs just the standard library, privileges to read +the config file and create the control socket and the CAP_NET_* capabilities. About routing tables -

BIRD has one or more routing tables which may or may not be -synchronized with OS kernel and which may or may not be synchronized with -each other (see the Pipe protocol). Each routing table contains a list of -known routes. Each route consists of: +

BIRD has one or more routing tables which may or may not be synchronized with +OS kernel and which may or may not be synchronized with each other (see the Pipe +protocol). Each routing table contains a list of known routes. Each route +consists of: - network prefix this route is for (network address and prefix length -- the number of bits forming the network part of the address; also known as a netmask) + network prefix this route is for (network address and prefix + length -- the number of bits forming the network part of the + address; also known as a netmask) preference of this route IP address of router which told us about this route - IP address of router we should forward the packets to - using this route + IP address of router we should forward the packets to using this + route other attributes common to all routes - dynamic attributes defined by protocols which may or - may not be present (typically protocol metrics) + dynamic attributes defined by protocols which may or may not be + present (typically protocol metrics) -Routing table maintains multiple entries -for a network, but at most one entry for one network and one -protocol. The entry with the highest preference is used for routing (we -will call such an entry the Each protocol is connected to a routing table through two filters -which can accept, reject and modify the routes. An Each protocol is connected to a routing table through two filters which can +accept, reject and modify the routes. An

BIRD is configured using a text configuration file. Upon startup, BIRD reads /etc/bird.conf (unless the -BIRD is configured using a text configuration file. Upon startup, BIRD reads +/etc/bird.conf (unless the In the config, everything on a line after /* -*/ is a comment, whitespace characters are treated as a single space. If there's a variable number of options, they are grouped using -the Here is an example of a simple config file. It enables -synchronization of routing tables with OS kernel, scans for -new network interfaces every 10 seconds and runs RIP on all network interfaces found. +

In the config, everything on a line after /* */ is +a comment, whitespace characters are treated as a single space. If there's a +variable number of options, they are grouped using the Here is an example of a simple config file. It enables synchronization of +routing tables with OS kernel, scans for new network interfaces every 10 seconds +and runs RIP on all network interfaces found. protocol kernel { @@ -312,82 +322,87 @@ protocol rip { used anywhere in the config file, not just as a top-level option. - Set global defaults of protocol debugging options. See debug commands - Control logging of client connections (0 for no logging, 1 for - logging of connects and disconnects, 2 and higher for logging of - all client commands). Default: 0. + Control logging of client connections (0 for no logging, 1 for logging + of connects and disconnects, 2 and higher for logging of all client + commands). Default: 0. mrtdump " - Set MRTdump file name. This option must be specified to allow MRTdump feature. - Default: no dump file. + Set MRTdump file name. This option must be specified to allow MRTdump + feature. Default: no dump file. mrtdump protocols all|off|{ states, messages } - Set global defaults of MRTdump options. See filter Define a filter. You can learn more about filters - in the following chapter. + filter + Define a filter. You can learn more about filters in the following + chapter. - function Define a function. You can learn more - about functions in the following chapter. + function + Define a function. You can learn more about functions in the following chapter. protocol rip|ospf|bgp|... [protocol options } - Define a protocol instance called (or with a name like "rip5" generated - automatically if you don't specify any ). You can learn more about - configuring protocols in their own chapters. When from expression is - used, initial protocol options are taken from protocol or template - You can run more than one instance of most protocols (like RIP or BGP). By default, no - instances are configured. + Define a protocol instance called (or with a name like + "rip5" generated automatically if you don't specify any + ). You can learn more about configuring protocols in + their own chapters. When from expression is used, + initial protocol options are taken from protocol or template + You can run more than one instance of most protocols + (like RIP or BGP). By default, no instances are configured. template rip|bgp|... [protocol options } - Define a protocol template instance called (or with a name like "bgp1" - generated automatically if you don't specify any ). Protocol templates can - be used to group common options when many similarly configured protocol instances are to be - defined. Protocol instances (and other templates) can use templates by using define - Define a constant. You can use it later in every place you could use a value of the same type. - Besides, there are some predefined numeric constants based on /etc/iproute2/rt_* files. - A list of defined constants can be seen (together with other symbols) using 'show symbols' command. + Define a constant. You can use it later in every place you could use a + value of the same type. Besides, there are some predefined numeric + constants based on /etc/iproute2/rt_* files. A list of defined constants + can be seen (together with other symbols) using 'show symbols' command. router id - Set BIRD's router ID. It's a world-wide unique identification - of your router, usually one of router's IPv4 addresses. - Default: in IPv4 version, the lowest IP address of a - non-loopback interface. In IPv6 version, this option is - mandatory. + Set BIRD's router ID. It's a world-wide unique identification of your + router, usually one of router's IPv4 addresses. Default: in IPv4 + version, the lowest IP address of a non-loopback interface. In IPv6 + version, this option is mandatory. router id from [-] [ " - Set BIRD's router ID based on an IP address of an interface - specified by an interface pattern. The option is applicable - for IPv4 version only. See - section for detailed description of interface patterns. + Set BIRD's router ID based on an IP address of an interface specified by + an interface pattern. The option is applicable for IPv4 version only. + See section for detailed + description of interface patterns. listen bgp [address - This option allows to specify address and port where BGP - protocol should listen. It is global option as listening - socket is common to all BGP instances. Default is to listen on - all addresses (0.0.0.0) and port 179. In IPv6 mode, option - graceful restart wait During graceful restart recovery, BIRD waits for convergence of routing @@ -396,162 +411,151 @@ protocol rip { 240 seconds. timeformat route|protocol|base|log " - This option allows to specify a format of date/time used by - BIRD. The first argument specifies for which purpose such - format is used. and - " and "table - Create a new routing table. The default routing table is - created implicitly, other routing tables have to be added by - this command. Option - description for details. + Create a new routing table. The default routing table is created + implicitly, other routing tables have to be added by this command. + Option description for details. roa table - Create a new ROA (Route Origin Authorization) table. ROA - tables can be used to validate route origination of BGP - routes. A ROA table contains ROA entries, each consist of a - network prefix, a max prefix length and an AS number. A ROA - entry specifies prefixes which could be originated by that AS - number. ROA tables could be filled with data from RPKI (RFC - 6480) or from public databases like Whois. ROA tables are - examined by roa , which - can be used to populate the ROA table with static ROA - entries. The option may be used multiple times. Other entries - can be added dynamically by roa , which can be used to populate the ROA table with static + ROA entries. The option may be used multiple times. Other entries can be + added dynamically by eval Evaluates given filter expression. It is used by us for testing of filters. + Protocol options -

For each protocol instance, you can configure a bunch of options. -Some of them (those described in this section) are generic, some are -specific to the protocol (see sections talking about the protocols). +

For each protocol instance, you can configure a bunch of options. Some of +them (those described in this section) are generic, some are specific to the +protocol (see sections talking about the protocols). -

Several options use a argument. It can be either - is equivalent to Several options use a - preference Sets the preference of routes generated by this protocol. Default: protocol dependent. + preference + Sets the preference of routes generated by this protocol. Default: + protocol dependent. - disabled Disables the protocol. You can change the disable/enable status from the command - line interface without needing to touch the configuration. Disabled protocols are not activated. Default: protocol is enabled. + disabled + Disables the protocol. You can change the disable/enable status from the + command line interface without needing to touch the configuration. + Disabled protocols are not activated. Default: protocol is enabled. debug all|off|{ states, routes, filters, interfaces, events, packets } Set protocol debugging options. If asked, each protocol is capable of writing trace messages about its work to the log (with category mrtdump all|off|{ states, messages } - Set protocol MRTdump flags. MRTdump is a standard binary - format for logging information from routing protocols and - daemons. These flags control what kind of information is - logged from the protocol to the MRTdump file (which must be - specified by global router id - This option can be used to override global router id for a - given protocol. Default: uses global router id. + This option can be used to override global router id for a given + protocol. Default: uses global router id. import all | none | filter - Specify a filter to be used for filtering routes coming from - the protocol to the routing table. export - This is similar to the import keyword, except that it - works in the direction from the routing table to the protocol. - Default: import keyword, except that it works in + the direction from the routing table to the protocol. Default: import keep filtered - Usually, if an import filter rejects a route, the route is - forgotten. When this option is active, these routes are - kept in the routing table, but they are hidden and not - propagated to other protocols. But it is possible to show them - using

You can use the command-line client birdc to talk with -a running BIRD. Communication is done using a You can use the command-line client birdc to talk with a running +BIRD. Communication is done using a There is also lightweight variant of BIRD client called -There is also lightweight variant of BIRD client called Many commands have the show status - Show router status, that is BIRD version, uptime and time from last reconfiguration. + Show router status, that is BIRD version, uptime and time from last + reconfiguration. show protocols [all] - Show list of protocol instances along with tables they are connected to and protocol status, possibly giving verbose information, if show ospf interface [ Show detailed information about OSPF interfaces. @@ -703,20 +703,20 @@ This argument can be omitted if there exists only a single instance. Show a list of OSPF neighbors and a state of adjacency to them. show ospf state [all] [ - Show detailed information about OSPF areas based on a content - of the link-state database. It shows network topology, stub - networks, aggregated networks and routers from other areas and - external routes. The command shows information about reachable - network nodes, use option show ospf topology [all] [ - Show a topology of OSPF areas based on a content of the - link-state database. It is just a stripped-down version of - 'show ospf state'. + Show a topology of OSPF areas based on a content of the link-state + database. It is just a stripped-down version of 'show ospf state'. show ospf lsadb [global | area - Show contents of an OSPF LSA database. Options could be used to filter entries. + Show contents of an OSPF LSA database. Options could be used to filter + entries. show static [ Show detailed information about static routes. @@ -725,16 +725,17 @@ This argument can be omitted if there exists only a single instance. Show information about BFD sessions. show interfaces [summary] - Show the list of interfaces. For each interface, print its type, state, MTU and addresses assigned. + Show the list of interfaces. For each interface, print its type, state, + MTU and addresses assigned. show symbols [table|filter|function|protocol|template|roa| - Show the list of symbols defined in the configuration (names of protocols, routing tables etc.). + Show the list of symbols defined in the configuration (names of + protocols, routing tables etc.). show route [[for] - Show contents of a routing table (by default of the main one or - the table attached to a respective protocol), - that is routes, their metrics and (in case the You can specify a for , you'll get @@ -753,98 +754,90 @@ This argument can be omitted if there exists only a single instance.

You can also select just routes added by a specific protocol. protocol . -

If BIRD is configured to keep filtered routes (see If BIRD is configured to keep filtered routes (see The show roa [] - Show contents of a ROA table (by default of the first one). - You can specify a for , you'll - get all entries relevant for route validation of the network - prefix; i.e., ROA entries whose prefixes cover the network - prefix. Or you can use in to get ROA entries - covered by the network prefix. You could also use for , you'll get all entries relevant for route + validation of the network prefix; i.e., ROA entries whose prefixes cover + the network prefix. Or you can use in to get ROA + entries covered by the network prefix. You could also use add roa ] - Add a new ROA entry to a ROA table. Such entry is called - delete roa ] - Delete the specified ROA entry from a ROA table. Only dynamic - ROA entries (i.e., the ones added by flush roa [table ] Remove all dynamic ROA entries from a ROA table. configure [soft] [" - Reload configuration from a given file. BIRD will smoothly - switch itself to the new configuration, protocols are - reconfigured if possible, restarted otherwise. Changes in - filters usually lead to restart of affected protocols. + Reload configuration from a given file. BIRD will smoothly switch itself + to the new configuration, protocols are reconfigured if possible, + restarted otherwise. Changes in filters usually lead to restart of + affected protocols. - If configure confirm Deactivate the config undo timer and therefore confirm the current configuration. configure undo - Undo the last configuration change and smoothly switch back to - the previous (stored) configuration. If the last configuration - change was soft, the undo change is also soft. There is only - one level of undo, but in some specific cases when several - reconfiguration requests are given immediately in a row and - the intermediate ones are skipped then the undo also skips them back. + Undo the last configuration change and smoothly switch back to the + previous (stored) configuration. If the last configuration change was + soft, the undo change is also soft. There is only one level of undo, but + in some specific cases when several reconfiguration requests are given + immediately in a row and the intermediate ones are skipped then the undo + also skips them back. configure check [" - Read and parse given config file, but do not use it. useful - for checking syntactic and some semantic validity of an config - file. + Read and parse given config file, but do not use it. useful for checking + syntactic and some semantic validity of an config file. enable|disable|restart - Enable, disable or restart a given protocol instance, - instances matching the or - or reload [in|out] - - Reload a given protocol instance, that means re-import routes - from the protocol instance and re-export preferred routes to - the instance. If eval Evaluate given expression. - + Filters Introduction -

BIRD contains a simple programming language. (No, it can't yet read mail :-). There are -two objects in this language: filters and functions. Filters are interpreted by BIRD core when a route is -being passed between protocols and routing tables. The filter language contains control structures such -as if's and switches, but it allows no loops. An example of a filter using many features can be found in filter/test.conf. +

BIRD contains a simple programming language. (No, it can't yet read mail :-). +There are two objects in this language: filters and functions. Filters are +interpreted by BIRD core when a route is being passed between protocols and +routing tables. The filter language contains control structures such as if's and +switches, but it allows no loops. An example of a filter using many features can +be found in filter/test.conf. -

Filter gets the route, looks at its attributes and -modifies some of them if it wishes. At the end, it decides whether to -pass the changed route through (using Filter gets the route, looks at its attributes and modifies some of them if +it wishes. At the end, it decides whether to pass the changed route through +(using filter not_too_far @@ -895,16 +890,18 @@ int var; } -

As you can see, a filter has a header, a list of local variables, and a body. The header consists of -the type name; pairs where each pair defines one local variable. The body consists of - { statements }. Each { statements }) which is useful if -you want to make a bigger block of code conditional. +

As you can see, a filter has a header, a list of local variables, and a body. +The header consists of the type name; +pairs where each pair defines one local variable. The body consists of +{ statements }. Each { statements }) which is useful if you want to make a bigger +block of code conditional. -

BIRD supports functions, so that you don't have to repeat the same blocks of code over and -over. Functions can have zero or more parameters and they can have local variables. Recursion is not allowed. Function definitions -look like this: +

BIRD supports functions, so that you don't have to repeat the same blocks of +code over and over. Functions can have zero or more parameters and they can have +local variables. Recursion is not allowed. Function definitions look like this: function name () @@ -919,20 +916,20 @@ function with_parameters (int parameter) } -

Unlike in C, variables are declared after the name(); -with_parameters(5);. Function may return values using the return -command. Returning a value exits from current function (this is similar to C). +

Unlike in C, variables are declared after the name(); with_parameters(5);. Function may return +values using the return command. Returning a value exits +from current function (this is similar to C). -

Filters are declared in a way similar to functions except they can't have explicit -parameters. They get a route table entry as an implicit parameter, it is also passed automatically -to any functions called. The filter must terminate with either -Filters are declared in a way similar to functions except they can't have +explicit parameters. They get a route table entry as an implicit parameter, it +is also passed automatically to any functions called. The filter must terminate +with either A nice trick to debug filters is to use show route filter - from the command line client. An example session might look -like: +

A nice trick to debug filters is to use show route filter +from the command line client. An example session might look like: pavel@bug:~/bird$ ./birdc -s bird.ctl @@ -948,85 +945,96 @@ bird> show route filter { if 127.0.0.5 ˜ net then accept; } bird> + Data types -

Each variable and each value has certain type. Booleans, integers and enums are -incompatible with each other (that is to prevent you from shooting in the foot). +

Each variable and each value has certain type. Booleans, integers and enums +are incompatible with each other (that is to prevent you from shooting in the +foot). - .mask(num) on values of type ip. It masks out - all but first num bits from the IP address. So - .mask(num) on values of type ip. It masks out all but + first num bits from the IP address. So + ipaddress/pxlen, or - ipaddress/netmask. There are two special - operators on prefixes: 1.2.0.0/16.pxlen = 16 is true. + , + or ipaddress/netmask. There are two special + operators on prefixes: 1.2.0.0/16.pxlen = 16 is true. - (, - where (, where + int set look like [ - 1, 2, 5..7 ]. As you can see, both simple values and ranges are - permitted in sets. + int + set look like [ 1, 2, 5..7 ]. As you can see, both simple + values and ranges are permitted in sets. - For pair sets, expressions like define one=1; define myas=64500; @@ -1039,158 +1047,174 @@ incompatible with each other (that is to prevent you from shooting in the foot). es = [ (rt, myas, 3*10), (rt, myas+one, 0..16*16*16-1), (ro, myas+2, *) ]; - Sets of prefixes are special: their literals does not allow ranges, but allows - prefix patterns that are written as ipaddress/pxlen{low,high}. - Prefix ip1/len1 matches prefix pattern ip2/len2{l,h} if - the first min(len1, len2) bits of len1 <= ip1 <= len2. - A valid prefix pattern has to satisfy low <= high, but ipaddress/pxlen{low,high}. + Prefix ip1/len1 matches prefix + pattern ip2/len2{l,h} if the + first min(len1, len2) bits of len1 <= ip1 <= len2. A valid prefix pattern + has to satisfy low <= high, but address/ is a shorthand for - address/ (where maxlen is 32 for IPv4 and 128 for IPv6), - that means network prefix address/ and all its subnets. address/ - is a shorthand for address/, that means network prefix address/ - and all its supernets (network prefixes that contain it). + There are also two shorthands for prefix patterns: + is a shorthand for + (where is 32 for IPv4 and 128 for IPv6), that means + network prefix and all its subnets. + is a shorthand for + , that means network prefix + and all its supernets (network prefixes + that contain it). - For example, [ 1.0.0.0/8, 2.0.0.0/8+, 3.0.0.0/8-, 4.0.0.0/8{16,24} ] matches - prefix 1.0.0.0/8, all subprefixes of 2.0.0.0/8, all superprefixes of 3.0.0.0/8 and prefixes - [ 0.0.0.0/0{20,24} ] matches all prefixes (regardless of - IP address) whose prefix length is 20 to 24, [ 1.2.3.4/32- ] matches any prefix that contains IP address - 1.2.3.4. 1.2.0.0/16 ˜ [ 1.0.0.0/8{15,17} ] is true, - but 1.0.0.0/16 ˜ [ 1.0.0.0/8- ] is false. + For example, [ 1.0.0.0/8, 2.0.0.0/8+, 3.0.0.0/8-, 4.0.0.0/8{16,24} + ] matches prefix 1.0.0.0/8, all subprefixes of + 2.0.0.0/8, all superprefixes of 3.0.0.0/8 and prefixes + [ 0.0.0.0/0{20,24} ] + matches all prefixes (regardless of IP address) whose prefix length is + 20 to 24, [ 1.2.3.4/32- ] matches any prefix that contains IP + address 1.2.3.4. 1.2.0.0/16 ˜ [ 1.0.0.0/8{15,17} ] + is true, but 1.0.0.0/16 ˜ [ 1.0.0.0/8- ] is false. - Cisco-style patterns like 10.0.0.0/8 ge 16 le 24 can be expressed - in BIRD as 10.0.0.0/8{16,24}, 192.168.0.0/16 le 24 as - 192.168.0.0/16{16,24} and 192.168.0.0/16 ge 24 as - 192.168.0.0/16{24,32}. + Cisco-style patterns like 10.0.0.0/8 ge 16 le 24 can be expressed + in BIRD as 10.0.0.0/8{16,24}, 192.168.0.0/16 le 24 as + 192.168.0.0/16{16,24} and 192.168.0.0/16 ge 24 as + 192.168.0.0/16{24,32}. returns the first ASN (the neighbor ASN) in path returns the first ASN (the neighbor ASN) in path returns the last ASN (the source ASN) in path returns the last ASN (the source ASN) in path returns the length of path returns the length of path prepend( prepends ASN prepend( prepends ASN delete( deletes all instances of ASN - delete( deletes all instances of ASN filter( deletes all ASNs from path - filter( deletes all ASNs from path can be shortened to - if can be shortened to + if path ˜ [= 2 3 5 * =] syntax). The masks - resemble wildcard patterns as used by UNIX shells. Autonomous - system numbers match themselves, bgp_path is 4 3 2 1, then: - bgp_path ˜ [= * 4 3 * =] is true, but - bgp_path ˜ [= * 4 5 * =] is false. - BGP mask expressions can also contain integer expressions enclosed in parenthesis - and integer variables, for example [= * 4 (1+2) a =]. - There is also old syntax that uses / .. / instead of [= .. =] and ? instead of *. + BGP masks are patterns used for BGP path matching (using path + ˜ [= 2 3 5 * =] syntax). The masks resemble wildcard patterns + as used by UNIX shells. Autonomous system numbers match themselves, + bgp_path + is 4 3 2 1, then: bgp_path ˜ [= * 4 3 * =] is true, + but bgp_path ˜ [= * 4 5 * =] is false. BGP mask + expressions can also contain integer expressions enclosed in parenthesis + and integer variables, for example [= * 4 (1+2) a =]. There is + also old syntax that uses / .. / instead of [= .. =] and ? instead of *. returns the length of clist returns the length of clist add( adds pair (or quad) add( adds pair (or quad) delete( deletes pair (or quad) - delete( deletes pair (or quad) filter( deletes all items from clist - filter( deletes all items from clist can be shortened to - if can be shortened to + if + Operators -

The filter language supports common integer operators (+,-,*,/), parentheses The filter language supports common integer operators (+,-,*,/), +parentheses There is one operator related to ROA infrastructure - -roa_check(, which checks current route (which -should be from BGP to have AS_PATH argument) in the specified ROA -table and returns ROA_UNKNOWN if there is no relevant ROA, ROA_VALID -if there is a matching ROA, or ROA_INVALID if there are some relevant +

There is one operator related to ROA infrastructure - roa_check(, which checks +current route (which should be from BGP to have AS_PATH argument) in the +specified ROA table and returns ROA_UNKNOWN if there is no relevant ROA, +ROA_VALID if there is a matching ROA, or ROA_INVALID if there are some relevant ROAs but none of them match. There is also an extended variant -roa_check(, which allows to -specify a prefix and an ASN as arguments. +roa_check(, which allows to specify a +prefix and an ASN as arguments. Control structures

Filters support two control structures: conditions and case switches. -

Syntax of a condition is: if -boolean expression then command1; else command2; and you can use { -command_1; command_2; ... } instead of either command. The else -clause may be omitted. If the boolean expression is true, command1 is executed, otherwise command2 is executed. +

Syntax of a condition is: if boolean expression then and you can use { ... } instead of either command. The else clause may be +omitted. If the boolean expression is true, The case is similar to case from Pascal. Syntax is case . The expression after -case can be of any type which can be on the left side of the ˜ operator and anything that could -be a member of a set is allowed before matches one of the matches neither of the The case is similar to case from Pascal. Syntax is case +. The expression after case can be of any type which can be +on the left side of the ˜ operator and anything that could be a member of +a set is allowed before matches one of the matches +neither of the Here is example that uses + Route attributes -

A filter is implicitly passed a route, and it can access its -attributes just like it accesses variables. Attempts to access undefined -attribute result in a runtime error; you can check if an attribute is -defined by using the defined( attribute ) operator. -One notable exception to this rule are attributes of clist type, where -undefined value is regarded as empty clist for most purposes. +

A filter is implicitly passed a route, and it can access its attributes just +like it accesses variables. Attempts to access undefined attribute result in a +runtime error; you can check if an attribute is defined by using the +defined( attribute ) operator. One notable exception to this +rule are attributes of clist type, where undefined value is regarded as empty +clist for most purposes. - Network the route is talking about. Read-only. (See the chapter about routing tables.) + Network the route is talking about. Read-only. (See the chapter about + routing tables.) - The scope of the route. Possible values: - Preference of the route. Valid values are 0-65535. (See the chapter about routing tables.) + Preference of the route. Valid values are 0-65535. (See the chapter + about routing tables.) The router which the route has originated from. @@ -1240,16 +1265,20 @@ undefined value is regarded as empty clist for most purposes. Next hop packets routed using this route should be forwarded to. - The name of the protocol which the route has been imported from. Read-only. + The name of the protocol which the route has been imported from. + Read-only. - what protocol has told me about this route. Possible values: Route type (Currently Type of destination the packets should be sent to @@ -1257,55 +1286,59 @@ undefined value is regarded as empty clist for most purposes. - Name of the outgoing interface. Sink routes (like blackhole, - unreachable or prohibit) and multipath routes have no interface - associated with them, so - Index of the outgoing interface. System wide index of the - interface. May be used for interface matching, however - indexes might change on interface creation/removal. Zero is - returned for routes with undefined outgoing + Index of the outgoing interface. System wide index of the interface. May + be used for interface matching, however indexes might change on interface + creation/removal. Zero is returned for routes with undefined outgoing interfaces. Read-only. - The optional attribute that can be used to specify a distance - to the network for routes that do not have a native protocol - metric attribute (like -

There also exist some protocol-specific attributes which are described in the corresponding protocol sections. +

There also exist some protocol-specific attributes which are described in the +corresponding protocol sections. + Other statements

The following statements are available: - Set variable to a given value. + + Set variable to a given value. - accept|reject [ Accept or reject the route, possibly printing expr. + accept|reject [ + Accept or reject the route, possibly printing expr. - return Return expr from the current function, the function ends at this point. + return + Return expr from the current function, the function ends + at this point. print|printn - Prints given expressions; useful mainly while debugging - filters. The quitbird Terminates BIRD. Useful when debugging the filter interpreter. + Protocols

The Border Gateway Protocol is the routing protocol used for backbone -level routing in the today's Internet. Contrary to the other protocols, its convergence -doesn't rely on all routers following the same rules for route selection, -making it possible to implement any routing policy at any router in the -network, the only restriction being that if a router advertises a route, -it must accept and forward packets according to it. +

The Border Gateway Protocol is the routing protocol used for backbone level +routing in the today's Internet. Contrary to other protocols, its convergence +does not rely on all routers following the same rules for route selection, +making it possible to implement any routing policy at any router in the network, +the only restriction being that if a router advertises a route, it must accept +and forward packets according to it. -

BGP works in terms of autonomous systems (often abbreviated as -AS). Each AS is a part of the network with common management and -common routing policy. It is identified by a unique 16-bit number -(ASN). Routers within each AS usually exchange AS-internal routing -information with each other using an interior gateway protocol (IGP, -such as OSPF or RIP). Boundary routers at the border of the AS -communicate global (inter-AS) network reachability information with -their neighbors in the neighboring AS'es via exterior BGP (eBGP) and -redistribute received information to other routers in the AS via -interior BGP (iBGP). +

BGP works in terms of autonomous systems (often abbreviated as AS). Each AS +is a part of the network with common management and common routing policy. It is +identified by a unique 16-bit number (ASN). Routers within each AS usually +exchange AS-internal routing information with each other using an interior +gateway protocol (IGP, such as OSPF or RIP). Boundary routers at the border of +the AS communicate global (inter-AS) network reachability information with their +neighbors in the neighboring AS'es via exterior BGP (eBGP) and redistribute +received information to other routers in the AS via interior BGP (iBGP). -

Each BGP router sends to its neighbors updates of the parts of its -routing table it wishes to export along with complete path information -(a list of AS'es the packet will travel through if it uses the particular -route) in order to avoid routing loops. +

Each BGP router sends to its neighbors updates of the parts of its routing +table it wishes to export along with complete path information (a list of AS'es +the packet will travel through if it uses the particular route) in order to +avoid routing loops.

BIRD supports all requirements of the BGP4 standard as defined in RFC 4271 @@ -1536,9 +1568,9 @@ RFC 2545.

BGP doesn't have any simple metric, so the rules for selection of an optimal route among multiple BGP routes with the same preference are a bit more complex -and they are implemented according to the following algorithm. It starts the first -rule, if there are more "best" routes, then it uses the second rule to choose -among them and so on. +and they are implemented according to the following algorithm. It starts the +first rule, if there are more "best" routes, then it uses the second rule to +choose among them and so on. Prefer route with the highest Local Preference attribute. @@ -1553,105 +1585,99 @@ among them and so on. IGP routing table -

BGP is mainly concerned with global network reachability and with -routes to other autonomous systems. When such routes are redistributed -to routers in the AS via BGP, they contain IP addresses of a boundary -routers (in route attribute NEXT_HOP). BGP depends on existing IGP -routing table with AS-internal routes to determine immediate next hops -for routes and to know their internal distances to boundary routers -for the purpose of BGP route selection. In BIRD, there is usually -one routing table used for both IGP routes and BGP routes. +

BGP is mainly concerned with global network reachability and with routes to +other autonomous systems. When such routes are redistributed to routers in the +AS via BGP, they contain IP addresses of a boundary routers (in route attribute +NEXT_HOP). BGP depends on existing IGP routing table with AS-internal routes to +determine immediate next hops for routes and to know their internal distances to +boundary routers for the purpose of BGP route selection. In BIRD, there is +usually one routing table used for both IGP routes and BGP routes. Configuration -

Each instance of the BGP corresponds to one neighboring router. -This allows to set routing policy and all the other parameters differently -for each neighbor using the following configuration parameters: +

Each instance of the BGP corresponds to one neighboring router. This allows +to set routing policy and all the other parameters differently for each neighbor +using the following configuration parameters: - local [ Define which AS we are part - of. (Note that contrary to other IP routers, BIRD is able to act as a - router located in multiple AS'es simultaneously, but in such cases you - need to tweak the BGP paths manually in the filters to get consistent - behavior.) Optional local [ + Define which AS we are part of. (Note that contrary to other IP routers, + BIRD is able to act as a router located in multiple AS'es simultaneously, + but in such cases you need to tweak the BGP paths manually in the filters + to get consistent behavior.) Optional neighbor Define neighboring router this - instance will be talking to and what AS it's located in. In case the - neighbor is in the same AS as we are, we automatically switch to iBGP. - This parameter is mandatory. + neighbor + Define neighboring router this instance will be talking to and what AS + it's located in. In case the neighbor is in the same AS as we are, we + automatically switch to iBGP. This parameter is mandatory. - direct Specify that the neighbor is directly connected. The - IP address of the neighbor must be from a directly reachable IP range - (i.e. associated with one of your router's interfaces), otherwise the - BGP session wouldn't start but it would wait for such interface to - appear. The alternative is the direct + Specify that the neighbor is directly connected. The IP address of the + neighbor must be from a directly reachable IP range (i.e. associated + with one of your router's interfaces), otherwise the BGP session + wouldn't start but it would wait for such interface to appear. The + alternative is the multihop [ Configure multihop BGP session to a - neighbor that isn't directly connected. Accurately, this option should - be used if the configured neighbor IP address does not match with any - local network subnets. Such IP address have to be reachable through - system routing table. The alternative is the multihop [ + Configure multihop BGP session to a neighbor that isn't directly + connected. Accurately, this option should be used if the configured + neighbor IP address does not match with any local network subnets. Such + IP address have to be reachable through system routing table. The + alternative is the source address Define local address we - should use for next hop calculation and as a source address - for the BGP session. Default: the address of the local + source address + Define local address we should use for next hop calculation and as a + source address for the BGP session. Default: the address of the local end of the interface our neighbor is connected to. - next hop self Avoid calculation of the Next Hop - attribute and always advertise our own source address as a - next hop. This needs to be used only occasionally to - circumvent misconfigurations of other routers. Default: - disabled. + next hop self + Avoid calculation of the Next Hop attribute and always advertise our own + source address as a next hop. This needs to be used only occasionally to + circumvent misconfigurations of other routers. Default: disabled. - next hop keep Forward the received Next Hop - attribute even in situations where the local address should be - used instead, like when the route is sent to an interface with - a different subnet. Default: disabled. + next hop keep + Forward the received Next Hop attribute even in situations where the + local address should be used instead, like when the route is sent to an + interface with a different subnet. Default: disabled. - missing lladdr self|drop|ignoreNext Hop attribute - in BGP-IPv6 sometimes contains just the global IPv6 address, - but sometimes it has to contain both global and link-local - IPv6 addresses. This option specifies what to do if BIRD have - to send both addresses but does not know link-local address. - This situation might happen when routes from other protocols - are exported to BGP, or when improper updates are received - from BGP peers. missing lladdr self|drop|ignore + Next Hop attribute in BGP-IPv6 sometimes contains just the global IPv6 + address, but sometimes it has to contain both global and link-local IPv6 + addresses. This option specifies what to do if BIRD have to send both + addresses but does not know link-local address. This situation might + happen when routes from other protocols are exported to BGP, or when + improper updates are received from BGP peers. gateway direct|recursiveFor received routes, their - . Default: gateway direct|recursive + For received routes, their . Default: + igp table Specifies a table that is used - as an IGP routing table. Default: the same as the table BGP is - connected to. + igp table + Specifies a table that is used as an IGP routing table. Default: the + same as the table BGP is connected to. bfd switch BGP could use BFD protocol as an advisory mechanism for neighbor @@ -1661,55 +1687,57 @@ for each neighbor using the following configuration parameters: failure. Note that BFD protocol also has to be configured, see section for details. Default: disabled. - ttl security Use GTSM (RFC 5082 - the - generalized TTL security mechanism). GTSM protects against - spoofed packets by ignoring received packets with a smaller - than expected TTL. To work properly, GTSM have to be enabled - on both sides of a BGP session. If both ttl security + Use GTSM (RFC 5082 - the generalized TTL security mechanism). GTSM + protects against spoofed packets by ignoring received packets with a + smaller than expected TTL. To work properly, GTSM have to be enabled on + both sides of a BGP session. If both password 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. + password + 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. - passive Standard BGP behavior is both - initiating outgoing connections and accepting incoming - connections. In passive mode, outgoing connections are not - initiated. Default: off. + passive + Standard BGP behavior is both initiating outgoing connections and + accepting incoming connections. In passive mode, outgoing connections + are not initiated. Default: off. - rr client Be a route reflector and treat the neighbor as - a route reflection client. Default: disabled. + rr client + Be a route reflector and treat the neighbor as a route reflection + client. Default: disabled. - rr cluster id Route reflectors use cluster id - to avoid route reflection loops. When there is one route reflector in a cluster - it usually uses its router id as a cluster id, but when there are more route - reflectors in a cluster, these need to be configured (using this option) to - use a common cluster id. Clients in a cluster need not know their cluster - id and this option is not allowed for them. Default: the same as router id. + rr cluster id + Route reflectors use cluster id to avoid route reflection loops. When + there is one route reflector in a cluster it usually uses its router id + as a cluster id, but when there are more route reflectors in a cluster, + these need to be configured (using this option) to use a common cluster + id. Clients in a cluster need not know their cluster id and this option + is not allowed for them. Default: the same as router id. - rs client Be a route server and treat the neighbor - as a route server client. A route server is used as a - replacement for full mesh EBGP routing in Internet exchange - points in a similar way to route reflectors used in IBGP routing. - BIRD does not implement obsoleted RFC 1863, but uses ad-hoc implementation, - which behaves like plain EBGP but reduces modifications to advertised route - attributes to be transparent (for example does not prepend its AS number to - AS PATH attribute and keeps MED attribute). Default: disabled. + rs client + Be a route server and treat the neighbor as a route server client. + A route server is used as a replacement for full mesh EBGP routing in + Internet exchange points in a similar way to route reflectors used in + IBGP routing. BIRD does not implement obsoleted RFC 1863, but uses + ad-hoc implementation, which behaves like plain EBGP but reduces + modifications to advertised route attributes to be transparent (for + example does not prepend its AS number to AS PATH attribute and keeps + MED attribute). Default: disabled. - secondary Usually, if an export filter - rejects a selected route, no other route is propagated for - that network. This option allows to try the next route in - order until one that is accepted is found or all routes for - that network are rejected. This can be used for route servers - that need to propagate different tables to each client but do - not want to have these tables explicitly (to conserve memory). - This option requires that the connected routing table is - . Default: off. + secondary + Usually, if an export filter rejects a selected route, no other route is + propagated for that network. This option allows to try the next route in + order until one that is accepted is found or all routes for that network + are rejected. This can be used for route servers that need to propagate + different tables to each client but do not want to have these tables + explicitly (to conserve memory). This option requires that the connected + routing table is . Default: off. add paths Standard BGP can propagate only one path (route) per destination network @@ -1721,24 +1749,22 @@ for each neighbor using the following configuration parameters: filter are advertised to the neighbor. Default: off. allow local as [ - BGP prevents routing loops by rejecting received routes with - the local AS number in the AS path. This option allows to - loose or disable the check. Optional enable route refresh When BGP speaker - changes its import filter, it has to re-examine all routes - received from its neighbor against the new filter. As these - routes might not be available, there is a BGP protocol - extension Route Refresh (specified in RFC 2918) that allows - BGP speaker to request re-advertisement of all routes from its - neighbor. This option specifies whether BIRD advertises this - capability and accepts such requests. Even when disabled, BIRD - can send route refresh requests. Default: on. + enable route refresh + When BGP speaker changes its import filter, it has to re-examine all + routes received from its neighbor against the new filter. As these + routes might not be available, there is a BGP protocol extension Route + Refresh (specified in RFC 2918) that allows BGP speaker to request + re-advertisement of all routes from its neighbor. This option specifies + whether BIRD advertises this capability and accepts such requests. Even + when disabled, BIRD can send route refresh requests. Default: on. graceful restart When a BGP speaker restarts or crashes, neighbors will discard all @@ -1760,195 +1786,209 @@ for each neighbor using the following configuration parameters: re-establish after a restart before deleting stale routes. Default: 120 seconds. - interpret communities RFC 1997 demands - that BGP speaker should process well-known communities like - no-export (65535, 65281) or no-advertise (65535, 65282). For - example, received route carrying a no-adverise community - should not be advertised to any of its neighbors. If this - option is enabled (which is by default), BIRD has such - behavior automatically (it is evaluated when a route is - exported to the BGP protocol just before the export filter). - Otherwise, this integrated processing of well-known - communities is disabled. In that case, similar behavior can be - implemented in the export filter. Default: on. + interpret communities + RFC 1997 demands that BGP speaker should process well-known communities + like no-export (65535, 65281) or no-advertise (65535, 65282). For + example, received route carrying a no-adverise community should not be + advertised to any of its neighbors. If this option is enabled (which is + by default), BIRD has such behavior automatically (it is evaluated when + a route is exported to the BGP protocol just before the export filter). + Otherwise, this integrated processing of well-known communities is + disabled. In that case, similar behavior can be implemented in the + export filter. Default: on. - enable as4 BGP protocol was designed to use 2B AS numbers - and was extended later to allow 4B AS number. BIRD supports 4B AS extension, - but by disabling this option it can be persuaded not to advertise it and - to maintain old-style sessions with its neighbors. This might be useful for - circumventing bugs in neighbor's implementation of 4B AS extension. - Even when disabled (off), BIRD behaves internally as AS4-aware BGP router. - Default: on. + enable as4 + BGP protocol was designed to use 2B AS numbers and was extended later to + allow 4B AS number. BIRD supports 4B AS extension, but by disabling this + option it can be persuaded not to advertise it and to maintain old-style + sessions with its neighbors. This might be useful for circumventing bugs + in neighbor's implementation of 4B AS extension. Even when disabled + (off), BIRD behaves internally as AS4-aware BGP router. Default: on. - capabilities Use capability advertisement - to advertise optional capabilities. This is standard behavior - for newer BGP implementations, but there might be some older - BGP implementations that reject such connection attempts. - When disabled (off), features that request it (4B AS support) - are also disabled. Default: on, with automatic fallback to - off when received capability-related error. + capabilities + Use capability advertisement to advertise optional capabilities. This is + standard behavior for newer BGP implementations, but there might be some + older BGP implementations that reject such connection attempts. When + disabled (off), features that request it (4B AS support) are also + disabled. Default: on, with automatic fallback to off when received + capability-related error. - advertise ipv4 Advertise IPv4 multiprotocol capability. - This is not a correct behavior according to the strict interpretation - of RFC 4760, but it is widespread and required by some BGP - implementations (Cisco and Quagga). This option is relevant - to IPv4 mode with enabled capability advertisement only. Default: on. + advertise ipv4 + Advertise IPv4 multiprotocol capability. This is not a correct behavior + according to the strict interpretation of RFC 4760, but it is widespread + and required by some BGP implementations (Cisco and Quagga). This option + is relevant to IPv4 mode with enabled capability advertisement + only. Default: on. - route limit The maximal number of routes - that may be imported from the protocol. If the route limit is - exceeded, the connection is closed with an error. Limit is currently implemented as - . Default: no limit. + route limit + The maximal number of routes that may be imported from the protocol. If + the route limit is exceeded, the connection is closed with an error. + Limit is currently implemented as import limit . This option is obsolete and it is replaced by + . Default: no limit. - disable after error When an error is encountered (either - locally or by the other side), disable the instance automatically - and wait for an administrator to fix the problem manually. Default: off. + disable after error + When an error is encountered (either locally or by the other side), + disable the instance automatically and wait for an administrator to fix + the problem manually. Default: off. - hold time Time in seconds to wait for a Keepalive - message from the other side before considering the connection stale. - Default: depends on agreement with the neighboring router, we prefer - 240 seconds if the other side is willing to accept it. + hold time + Time in seconds to wait for a Keepalive message from the other side + before considering the connection stale. Default: depends on agreement + with the neighboring router, we prefer 240 seconds if the other side is + willing to accept it. - startup hold time Value of the hold timer used - before the routers have a chance to exchange open messages and agree - on the real value. Default: 240 seconds. + startup hold time + Value of the hold timer used before the routers have a chance to exchange + open messages and agree on the real value. Default: 240 seconds. - keepalive time Delay in seconds between sending - of two consecutive Keepalive messages. Default: One third of the hold time. + keepalive time + Delay in seconds between sending of two consecutive Keepalive messages. + Default: One third of the hold time. - connect retry time Time in seconds to wait before - retrying a failed attempt to connect. Default: 120 seconds. + connect retry time + Time in seconds to wait before retrying a failed attempt to connect. + Default: 120 seconds. - start delay time Delay in seconds between protocol - startup and the first attempt to connect. Default: 5 seconds. + start delay time + Delay in seconds between protocol startup and the first attempt to + connect. Default: 5 seconds. - error wait time Minimum and maximum delay in seconds between a protocol - failure (either local or reported by the peer) and automatic restart. - Doesn't apply when error wait time + Minimum and maximum delay in seconds between a protocol failure (either + local or reported by the peer) and automatic restart. Doesn't apply + when error forget time Maximum time in seconds between two protocol - failures to treat them as a error sequence which makes the error forget time + Maximum time in seconds between two protocol failures to treat them as a + error sequence which makes path metric Enable comparison of path lengths - when deciding which BGP route is the best one. Default: on. + path metric + Enable comparison of path lengths when deciding which BGP route is the + best one. Default: on. - med metric Enable comparison of MED - attributes (during best route selection) even between routes - received from different ASes. This may be useful if all MED - attributes contain some consistent metric, perhaps enforced in - import filters of AS boundary routers. If this option is - disabled, MED attributes are compared only if routes are - received from the same AS (which is the standard behavior). + med metric + Enable comparison of MED attributes (during best route selection) even + between routes received from different ASes. This may be useful if all + MED attributes contain some consistent metric, perhaps enforced in + import filters of AS boundary routers. If this option is disabled, MED + attributes are compared only if routes are received from the same AS + (which is the standard behavior). Default: off. + + deterministic med + BGP route selection algorithm is often viewed as a comparison between + individual routes (e.g. if a new route appears and is better than the + current best one, it is chosen as the new best one). But the proper + route selection, as specified by RFC 4271, cannot be fully implemented + in that way. The problem is mainly in handling the MED attribute. BIRD, + by default, uses an simplification based on individual route comparison, + which in some cases may lead to temporally dependent behavior (i.e. the + selection is dependent on the order in which routes appeared). This + option enables a different (and slower) algorithm implementing proper + RFC 4271 route selection, which is deterministic. Alternative way how to + get deterministic behavior is to use . Default: off. - deterministic med BGP route selection - algorithm is often viewed as a comparison between individual - routes (e.g. if a new route appears and is better than the - current best one, it is chosen as the new best one). But the - proper route selection, as specified by RFC 4271, cannot be - fully implemented in that way. The problem is mainly in - handling the MED attribute. BIRD, by default, uses an - simplification based on individual route comparison, which in - some cases may lead to temporally dependent behavior (i.e. the - selection is dependent on the order in which routes appeared). - This option enables a different (and slower) algorithm - implementing proper RFC 4271 route selection, which is - deterministic. Alternative way how to get deterministic - behavior is to use . - Default: off. + igp metric + Enable comparison of internal distances to boundary routers during best + route selection. Default: on. - igp metric Enable comparison of internal - distances to boundary routers during best route selection. Default: on. + prefer older + Standard route selection algorithm breaks ties by comparing router IDs. + This changes the behavior to prefer older routes (when both are external + and from different peer). For details, see RFC 5004. Default: off. - prefer older Standard route selection algorithm - breaks ties by comparing router IDs. This changes the behavior - to prefer older routes (when both are external and from different - peer). For details, see RFC 5004. Default: off. + default bgp_med + Value of the Multiple Exit Discriminator to be used during route + selection when the MED attribute is missing. Default: 0. - default bgp_med Value of the Multiple Exit - Discriminator to be used during route selection when the MED attribute - is missing. Default: 0. - - default bgp_local_pref A default value - for the Local Preference attribute. It is used when a new - Local Preference attribute is attached to a route by the BGP - protocol itself (for example, if a route is received through - eBGP and therefore does not have such attribute). Default: 100 - (0 in pre-1.2.0 versions of BIRD). + default bgp_local_pref + A default value for the Local Preference attribute. It is used when + a new Local Preference attribute is attached to a route by the BGP + protocol itself (for example, if a route is received through eBGP and + therefore does not have such attribute). Default: 100 (0 in pre-1.2.0 + versions of BIRD). Attributes -

BGP defines several route attributes. Some of them (those marked with `BGP defines several route attributes. Some of them (those marked with +` - bgppath Sequence of AS numbers describing the AS path - the packet will travel through when forwarded according to the particular route. - In case of internal BGP it doesn't contain the number of the local AS. + bgppath + Sequence of AS numbers describing the AS path the packet will travel + through when forwarded according to the particular route. In case of + internal BGP it doesn't contain the number of the local AS. - int Local preference value used for - selection among multiple BGP routes (see the selection rules above). It's - used as an additional metric which is propagated through the whole local AS. + int + Local preference value used for selection among multiple BGP routes (see + the selection rules above). It's used as an additional metric which is + propagated through the whole local AS. - int The Multiple Exit Discriminator of the route - is an optional attribute which is used on external (inter-AS) links to - convey to an adjacent AS the optimal entry point into the local AS. - The received attribute is also propagated over internal BGP links. - The attribute value is zeroed when a route is exported to an external BGP - instance to ensure that the attribute received from a neighboring AS is - not propagated to other neighboring ASes. A new value might be set in - the export filter of an external BGP instance. - See RFC 4451 + int + The Multiple Exit Discriminator of the route is an optional attribute + which is used on external (inter-AS) links to convey to an adjacent AS + the optimal entry point into the local AS. The received attribute is + also propagated over internal BGP links. The attribute value is zeroed + when a route is exported to an external BGP instance to ensure that the + attribute received from a neighboring AS is not propagated to other + neighboring ASes. A new value might be set in the export filter of an + external BGP instance. See RFC 4451 for further discussion of BGP MED attribute. - enum Origin of the route: either EGP protocol - (nowadays it seems to be obsolete) or enum + Origin of the route: either EGP protocol (nowadays it seems to be obsolete) or + ip Next hop to be used for forwarding of packets - to this destination. On internal BGP connections, it's an address of the - originating router if it's inside the local AS or a boundary router the - packet will leave the AS through if it's an exterior route, so each BGP - speaker within the AS has a chance to use the shortest interior path - possible to this point. + ip + Next hop to be used for forwarding of packets to this destination. On + internal BGP connections, it's an address of the originating router if + it's inside the local AS or a boundary router the packet will leave the + AS through if it's an exterior route, so each BGP speaker within the AS + has a chance to use the shortest interior path possible to this point. - void This is an optional attribute - which carries no value, but the sole presence of which indicates that the route - has been aggregated from multiple routes by some router on the path from - the originator. + void + This is an optional attribute which carries no value, but the sole + presence of which indicates that the route has been aggregated from + multiple routes by some router on the path from the originator. - clist List of community values associated - with the route. Each such value is a pair (represented as a clist + List of community values associated with the route. Each such value is a + pair (represented as a eclist List of extended community - values associated with the route. Extended communities have similar usage - as plain communities, but they have an extended range (to allow 4B ASNs) - and a nontrivial structure with a type field. Individual community values are - represented using an eclist + List of extended community values associated with the route. Extended + communities have similar usage as plain communities, but they have an + extended range (to allow 4B ASNs) and a nontrivial structure with a type + field. Individual community values are represented using an quad This attribute is created by the - route reflector when reflecting the route and contains the router ID of the - originator of the route in the local AS. + quad + This attribute is created by the route reflector when reflecting the + route and contains the router ID of the originator of the route in the + local AS. - clist This attribute contains a list - of cluster IDs of route reflectors. Each route reflector prepends its - cluster ID when reflecting the route. + clist + This attribute contains a list of cluster IDs of route reflectors. Each + route reflector prepends its cluster ID when reflecting the route. Example @@ -1975,41 +2015,42 @@ protocol bgp { } + Device -

The Device protocol is not a real routing protocol. It doesn't generate -any routes and it only serves as a module for getting information about network +

The Device protocol is not a real routing protocol. It doesn't generate any +routes and it only serves as a module for getting information about network interfaces from the kernel. -

Except for very unusual circumstances, you probably should include -this protocol in the configuration since almost all other protocols -require network interfaces to be defined for them to work with. +

Except for very unusual circumstances, you probably should include this +protocol in the configuration since almost all other protocols require network +interfaces to be defined for them to work with. Configuration

- scan time Time in seconds between two scans - of the network interface list. On systems where we are notified about - interface status changes asynchronously (such as newer versions of - Linux), we need to scan the list only in order to avoid confusion by lost - notification messages, so the default time is set to a large value. - primary [ " - If a network interface has more than one network address, BIRD - has to choose one of them as a primary one. By default, BIRD - chooses the lexicographically smallest address as the primary - one. + scan time - This option allows to specify which network address should be - chosen as a primary one. Network addresses that match - primary [ " + If a network interface has more than one network address, BIRD has to + choose one of them as a primary one. By default, BIRD chooses the + lexicographically smallest address as the primary one. + + This option allows to specify which network address should be chosen as + a primary one. Network addresses that match

As the Device protocol doesn't generate any routes, it cannot have @@ -2023,40 +2064,39 @@ protocol device { } + Direct

The Direct protocol is a simple generator of device routes for all the -directly connected networks according to the list of interfaces provided -by the kernel via the Device protocol. +directly connected networks according to the list of interfaces provided by the +kernel via the Device protocol. -

The question is whether it is a good idea to have such device -routes in BIRD routing table. OS kernel usually handles device routes -for directly connected networks by itself so we don't need (and don't -want) to export these routes to the kernel protocol. OSPF protocol -creates device routes for its interfaces itself and BGP protocol is -usually used for exporting aggregate routes. Although there are some -use cases that use the direct protocol (like abusing eBGP as an IGP -routing protocol), in most cases it is not needed to have these device +

The question is whether it is a good idea to have such device routes in BIRD +routing table. OS kernel usually handles device routes for directly connected +networks by itself so we don't need (and don't want) to export these routes to +the kernel protocol. OSPF protocol creates device routes for its interfaces +itself and BGP protocol is usually used for exporting aggregate routes. Although +there are some use cases that use the direct protocol (like abusing eBGP as an +IGP routing protocol), in most cases it is not needed to have these device routes in BIRD routing table and to use the direct protocol. -

There is one notable case when you definitely want to use the -direct protocol -- running BIRD on BSD systems. Having high priority -device routes for directly connected networks from the direct protocol -protects kernel device routes from being overwritten or removed by IGP -routes during some transient network 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. +

There is one notable case when you definitely want to use the direct protocol +-- running BIRD on BSD systems. Having high priority device routes for directly +connected networks from the direct protocol protects kernel device routes from +being overwritten or removed by IGP routes during some transient network +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.

The only configurable thing about direct is what interfaces it watches:

- interface By default, the Direct - protocol will generate device routes for all the interfaces - available. If you want to restrict it to some subset of interfaces - (for example if you're using multiple routing tables for policy - routing and some of the policy domains don't contain all interfaces), - just use this clause. + interface + By default, the Direct protocol will generate device routes for all the + interfaces available. If you want to restrict it to some subset of + interfaces (for example if you're using multiple routing tables for + policy routing and some of the policy domains don't contain all + interfaces), just use this clause.

Direct device routes don't contain any specific attributes. @@ -2069,40 +2109,38 @@ protocol direct { } + Kernel

The Kernel protocol is not a real routing protocol. Instead of communicating with other routers in the network, it performs synchronization of BIRD's routing -tables with the OS kernel. Basically, it sends all routing table updates to the kernel -and from time to time it scans the kernel tables to see whether some routes have -disappeared (for example due to unnoticed up/down transition of an interface) -or whether an `alien' route has been added by someone else (depending on the -Unfortunately, there is one thing that makes the routing table -synchronization a bit more complicated. In the kernel routing table -there are also device routes for directly connected networks. These -routes are usually managed by OS itself (as a part of IP address -configuration) and we don't want to touch that. They are completely -ignored during the scan of the kernel tables and also the export of -device routes from BIRD tables to kernel routing tables is restricted -to prevent accidental interference. This restriction can be disabled using +

Unfortunately, there is one thing that makes the routing table synchronization +a bit more complicated. In the kernel routing table there are also device routes +for directly connected networks. These routes are usually managed by OS itself +(as a part of IP address configuration) and we don't want to touch that. They +are completely ignored during the scan of the kernel tables and also the export +of device routes from BIRD tables to kernel routing tables is restricted to +prevent accidental interference. This restriction can be disabled using If your OS supports only a single routing table, you can configure -only one instance of the Kernel protocol. If it supports multiple -tables (in order to allow policy routing; such an OS is for example -Linux), you can run as many instances as you want, but each of them -must be connected to a different BIRD routing table and to a different -kernel table. +

If your OS supports only a single routing table, you can configure only one +instance of the Kernel protocol. If it supports multiple tables (in order to +allow policy routing; such an OS is for example Linux), you can run as many +instances as you want, but each of them must be connected to a different BIRD +routing table and to a different kernel table. -

Because the kernel protocol is partially integrated with the -connected routing table, there are two limitations - it is not -possible to connect more kernel protocols to the same routing table -and changing route destination/gateway in an export -filter of a kernel protocol does not work. Both limitations can be -overcome using another routing table and the pipe protocol. +

Because the kernel protocol is partially integrated with the connected +routing table, there are two limitations - it is not possible to connect more +kernel protocols to the same routing table and changing route destination +(gateway) in an export filter of a kernel protocol does not work. Both +limitations can be overcome using another routing table and the pipe protocol. Configuration @@ -2141,27 +2179,27 @@ overcome using another routing table and the pipe protocol. Attributes -

The Kernel protocol defines several attributes. These attributes -are translated to appropriate system (and OS-specific) route attributes. -We support these attributes: +

The Kernel protocol defines several attributes. These attributes are +translated to appropriate system (and OS-specific) route attributes. We support +these attributes: - int The original source of the imported - kernel route. The value is system-dependent. On Linux, it is - a value of the protocol field of the route. See - /etc/iproute2/rt_protos for common values. On BSD, it is + int + The original source of the imported kernel route. The value is + system-dependent. On Linux, it is a value of the protocol field of the + route. See /etc/iproute2/rt_protos for common values. On BSD, it is based on STATIC and PROTOx flags. The attribute is read-only. - int The kernel metric of - the route. When multiple same routes are in a kernel routing - table, the Linux kernel chooses one with lower metric. + int + The kernel metric of the route. When multiple same routes are in a + kernel routing table, the Linux kernel chooses one with lower metric. - ip (Linux) The preferred source address. - Used in source address selection for outgoing packets. Have to - be one of IP addresses of the router. + ip (Linux) + The preferred source address. Used in source address selection for + outgoing packets. Have to be one of IP addresses of the router. - int (Linux) The realm of the route. Can be - used for traffic classification. + int (Linux) + The realm of the route. Can be used for traffic classification. Example @@ -2192,50 +2230,50 @@ protocol kernel { # Secondary routing table } + OSPF Introduction

Open Shortest Path First (OSPF) is a quite complex interior gateway -protocol. The current IPv4 version (OSPFv2) is defined in RFC -2328 and -the current IPv6 version (OSPFv3) is defined in RFC 5340 It's a link state -(a.k.a. shortest path first) protocol -- each router maintains a -database describing the autonomous system's topology. Each participating -router has an identical copy of the database and all routers run the -same algorithm calculating a shortest path tree with themselves as a -root. OSPF chooses the least cost path as the best path. +protocol. The current IPv4 version (OSPFv2) is defined in RFC 2328 + +and the current IPv6 version (OSPFv3) is defined in RFC 5340 + +It's a link state (a.k.a. shortest path first) protocol -- each router maintains +a database describing the autonomous system's topology. Each participating +router has an identical copy of the database and all routers run the same +algorithm calculating a shortest path tree with themselves as a root. OSPF +chooses the least cost path as the best path. -

In OSPF, the autonomous system can be split to several areas in order -to reduce the amount of resources consumed for exchanging the routing -information and to protect the other areas from incorrect routing data. -Topology of the area is hidden to the rest of the autonomous system. +

In OSPF, the autonomous system can be split to several areas in order to +reduce the amount of resources consumed for exchanging the routing information +and to protect the other areas from incorrect routing data. Topology of the area +is hidden to the rest of the autonomous system. -

Another very important feature of OSPF is that -it can keep routing information from other protocols (like Static or BGP) -in its link state database as external routes. Each external route can -be tagged by the advertising router, making it possible to pass additional -information between routers on the boundary of the autonomous system. +

Another very important feature of OSPF is that it can keep routing information +from other protocols (like Static or BGP) in its link state database as external +routes. Each external route can be tagged by the advertising router, making it +possible to pass additional information between routers on the boundary of the +autonomous system. -

OSPF quickly detects topological changes in the autonomous system (such -as router interface failures) and calculates new loop-free routes after a short -period of convergence. Only a minimal amount of -routing traffic is involved. +

OSPF quickly detects topological changes in the autonomous system (such as +router interface failures) and calculates new loop-free routes after a short +period of convergence. Only a minimal amount of routing traffic is involved.

Each router participating in OSPF routing periodically sends Hello messages -to all its interfaces. This allows neighbors to be discovered dynamically. -Then the neighbors exchange theirs parts of the link state database and keep it -identical by flooding updates. The flooding process is reliable and ensures -that each router detects all changes. +to all its interfaces. This allows neighbors to be discovered dynamically. Then +the neighbors exchange theirs parts of the link state database and keep it +identical by flooding updates. The flooding process is reliable and ensures that +each router detects all changes. Configuration -

In the main part of configuration, there can be multiple definitions of -OSPF areas, each with a different id. These definitions includes many other -switches and multiple definitions of interfaces. Definition of interface -may contain many switches and constant definitions and list of neighbors -on nonbroadcast networks. +

In the main part of configuration, there can be multiple definitions of OSPF +areas, each with a different id. These definitions includes many other switches +and multiple definitions of interfaces. Definition of interface may contain many +switches and constant definitions and list of neighbors on nonbroadcast +networks. protocol ospf <name> { @@ -2321,173 +2359,165 @@ protocol ospf <name> { rfc1583compat switch - This option controls compatibility of routing table - calculation with RFC 1583. Default - value is no. + This option controls compatibility of routing table calculation with + RFC 1583 . + Default value is no. stub router switch - This option configures the router to be a stub router, i.e., - a router that participates in the OSPF topology but does not - allow transit traffic. In OSPFv2, this is implemented by - advertising maximum metric for outgoing links, as suggested - by RFC 3137. - In OSPFv3, the stub router behavior is announced by clearing - the R-bit in the router LSA. Default value is no. + This option configures the router to be a stub router, i.e., a router + that participates in the OSPF topology but does not allow transit + traffic. In OSPFv2, this is implemented by advertising maximum metric + for outgoing links, as suggested by + RFC 3137 . + In OSPFv3, the stub router behavior is announced by clearing the R-bit + in the router LSA. Default value is no. tick num - The routing table calculation and clean-up of areas' databases - is not performed when a single link state - change arrives. To lower the CPU utilization, it's processed later - at periodical intervals of ecmp switch [limit number] - This option specifies whether OSPF is allowed to generate - ECMP (equal-cost multipath) routes. Such routes are used when - there are several directions to the destination, each with - the same (computed) cost. This option also allows to specify - a limit on maximal number of nexthops in one route. By - default, ECMP is disabled. If enabled, default value of the - limit is 16. + This option specifies whether OSPF is allowed to generate ECMP + (equal-cost multipath) routes. Such routes are used when there are + several directions to the destination, each with the same (computed) + cost. This option also allows to specify a limit on maximal number of + nexthops in one route. By default, ECMP is disabled. If enabled, + default value of the limit is 16. area id - This defines an OSPF area with given area ID (an integer or an IPv4 - address, similarly to a router ID). The most important area is - the backbone (ID 0) to which every other area must be connected. + This defines an OSPF area with given area ID (an integer or an IPv4 + address, similarly to a router ID). The most important area is the + backbone (ID 0) to which every other area must be connected. stub - This option configures the area to be a stub area. External - routes are not flooded into stub areas. Also summary LSAs can be - limited in stub areas (see option nssa - This option configures the area to be a NSSA (Not-So-Stubby - Area). NSSA is a variant of a stub area which allows a - limited way of external route propagation. Global external - routes are not propagated into a NSSA, but an external route - can be imported into NSSA as a (area-wide) NSSA-LSA (and - possibly translated and/or aggregated on area boundary). - By default, the area is not NSSA. + This option configures the area to be a NSSA (Not-So-Stubby Area). NSSA + is a variant of a stub area which allows a limited way of external route + propagation. Global external routes are not propagated into a NSSA, but + an external route can be imported into NSSA as a (area-wide) NSSA-LSA + (and possibly translated and/or aggregated on area boundary). By + default, the area is not NSSA. summary switch - This option controls propagation of summary LSAs into stub or - NSSA areas. If enabled, summary LSAs are propagated as usual, - otherwise just the default summary route (0.0.0.0/0) is - propagated (this is sometimes called totally stubby area). If - a stub area has more area boundary routers, propagating - summary LSAs could lead to more efficient routing at the cost - of larger link state database. Default value is no. + This option controls propagation of summary LSAs into stub or NSSA + areas. If enabled, summary LSAs are propagated as usual, otherwise just + the default summary route (0.0.0.0/0) is propagated (this is sometimes + called totally stubby area). If a stub area has more area boundary + routers, propagating summary LSAs could lead to more efficient routing + at the cost of larger link state database. Default value is no. default nssa switch - When default cost num - This option controls the cost of a default route propagated to - stub and NSSA areas. Default value is 1000. + This option controls the cost of a default route propagated to stub and + NSSA areas. Default value is 1000. default cost2 num - When a default route is originated as NSSA-LSA, its cost - can use either type 1 or type 2 metric. This option allows - to specify the cost of a default route in type 2 metric. - By default, type 1 metric (option translator switch - This option controls translation of NSSA-LSAs into external - LSAs. By default, one translator per NSSA is automatically - elected from area boundary routers. If enabled, this area - boundary router would unconditionally translate all NSSA-LSAs - regardless of translator election. Default value is no. + This option controls translation of NSSA-LSAs into external LSAs. By + default, one translator per NSSA is automatically elected from area + boundary routers. If enabled, this area boundary router would + unconditionally translate all NSSA-LSAs regardless of translator + election. Default value is no. translator stability num - This option controls the translator stability interval (in - seconds). When the new translator is elected, the old one - keeps translating until the interval is over. Default value - is 40. + This option controls the translator stability interval (in seconds). + When the new translator is elected, the old one keeps translating until + the interval is over. Default value is 40. networks { - Definition of area IP ranges. This is used in summary LSA origination. - Hidden networks are not propagated into other areas. + Definition of area IP ranges. This is used in summary LSA origination. + Hidden networks are not propagated into other areas. external { - Definition of external area IP ranges for NSSAs. This is used - for NSSA-LSA translation. Hidden networks are not translated - into external LSAs. Networks can have configured route tag. + Definition of external area IP ranges for NSSAs. This is used for + NSSA-LSA translation. Hidden networks are not translated into external + LSAs. Networks can have configured route tag. stubnet - Stub networks are networks that are not transit networks - between OSPF routers. They are also propagated through an - OSPF area as a part of a link state database. By default, - BIRD generates a stub network record for each primary network - address on each OSPF interface that does not have any OSPF - neighbors, and also for each non-primary network address on - each OSPF interface. This option allows to alter a set of - stub networks propagated by this router. + Stub networks are networks that are not transit networks between OSPF + routers. They are also propagated through an OSPF area as a part of a + link state database. By default, BIRD generates a stub network record + for each primary network address on each OSPF interface that does not + have any OSPF neighbors, and also for each non-primary network address + on each OSPF interface. This option allows to alter a set of stub + networks propagated by this router. - Each instance of this option adds a stub network with given - network prefix to the set of propagated stub network, unless - option On BSD systems, older versions of BIRD supported OSPFv2 only for the @@ -2515,72 +2545,65 @@ protocol ospf <name> { cannot be splitted (e.g. when one large LSA is propagated). type broadcast|bcast - BIRD detects a type of a connected network automatically, but - sometimes it's convenient to force use of a different type - manually. On broadcast networks (like ethernet), flooding - and Hello messages are sent using multicasts (a single packet - for all the neighbors). A designated router is elected and it - is responsible for synchronizing the link-state databases and - originating network LSAs. This network type cannot be used on - physically NBMA networks and on unnumbered networks (networks - without proper IP prefix). + BIRD detects a type of a connected network automatically, but sometimes + it's convenient to force use of a different type manually. On broadcast + networks (like ethernet), flooding and Hello messages are sent using + multicasts (a single packet for all the neighbors). A designated router + is elected and it is responsible for synchronizing the link-state + databases and originating network LSAs. This network type cannot be used + on physically NBMA networks and on unnumbered networks (networks without + proper IP prefix). type pointopoint|ptp - Point-to-point networks connect just 2 routers together. No - election is performed and no network LSA is originated, which - makes it simpler and faster to establish. This network type - is useful not only for physically PtP ifaces (like PPP or - tunnels), but also for broadcast networks used as PtP links. - This network type cannot be used on physically NBMA networks. + Point-to-point networks connect just 2 routers together. No election is + performed and no network LSA is originated, which makes it simpler and + faster to establish. This network type is useful not only for physically + PtP ifaces (like PPP or tunnels), but also for broadcast networks used + as PtP links. This network type cannot be used on physically NBMA + networks. type nonbroadcast|nbma - On NBMA networks, the packets are sent to each neighbor - separately because of lack of multicast capabilities. - Like on broadcast networks, a designated router is elected, - which plays a central role in propagation of LSAs. - This network type cannot be used on unnumbered networks. + On NBMA networks, the packets are sent to each neighbor separately + because of lack of multicast capabilities. Like on broadcast networks, + a designated router is elected, which plays a central role in propagation + of LSAs. This network type cannot be used on unnumbered networks. type pointomultipoint|ptmp - This is another network type designed to handle NBMA - networks. In this case the NBMA network is treated as a - collection of PtP links. This is useful if not every pair of - routers on the NBMA network has direct communication, or if - the NBMA network is used as an (possibly unnumbered) PtP - link. + This is another network type designed to handle NBMA networks. In this + case the NBMA network is treated as a collection of PtP links. This is + useful if not every pair of routers on the NBMA network has direct + communication, or if the NBMA network is used as an (possibly + unnumbered) PtP link. strict nonbroadcast switch - If set, don't send hello to any undefined neighbor. This switch - is ignored on other than NBMA or PtMP networks. Default value is no. + If set, don't send hello to any undefined neighbor. This switch is + ignored on other than NBMA or PtMP networks. Default value is no. real broadcast - In ptp netmask - In check link switch - If set, a hardware link state (reported by OS) is taken into - consideration. When a link disappears (e.g. an ethernet cable is - unplugged), neighbors are immediately considered unreachable - and only the address of the iface (instead of whole network - prefix) is propagated. It is possible that some hardware - drivers or platforms do not implement this feature. Default value is no. + If set, a hardware link state (reported by OS) is taken into consideration. + When a link disappears (e.g. an ethernet cable is unplugged), neighbors + are immediately considered unreachable and only the address of the iface + (instead of whole network prefix) is propagated. It is possible that + some hardware drivers or platforms do not implement this feature. + Default value is no. bfd switch OSPF could use BFD protocol as an advisory mechanism for neighbor @@ -2591,84 +2614,79 @@ protocol ospf <name> { section for details. Default value is no. ttl security [ - TTL security is a feature that protects routing protocols - from remote spoofed packets by using TTL 255 instead of TTL 1 - for protocol packets destined to neighbors. Because TTL is - decremented when packets are forwarded, it is non-trivial to - spoof packets with TTL 255 from remote locations. Note that - this option would interfere with OSPF virtual links. + TTL security is a feature that protects routing protocols from remote + spoofed packets by using TTL 255 instead of TTL 1 for protocol packets + destined to neighbors. Because TTL is decremented when packets are + forwarded, it is non-trivial to spoof packets with TTL 255 from remote + locations. Note that this option would interfere with OSPF virtual + links. - If this option is enabled, the router will send OSPF packets - with TTL 255 and drop received packets with TTL less than - 255. If this option si set to tx class|dscp|priority - These options specify the ToS/DiffServ/Traffic class/Priority - of the outgoing OSPF packets. See common option for detailed description. + These options specify the ToS/DiffServ/Traffic class/Priority of the + outgoing OSPF packets. See common + option for detailed description. ecmp weight num - When ECMP (multipath) routes are allowed, this value specifies - a relative weight used for nexthops going through the iface. - Allowed values are 1-256. Default value is 1. + When ECMP (multipath) routes are allowed, this value specifies a + relative weight used for nexthops going through the iface. Allowed + values are 1-256. Default value is 1. authentication none - No passwords are sent in OSPF packets. This is the default value. + No passwords are sent in OSPF packets. This is the default value. authentication simple - Every packet carries 8 bytes of password. Received packets - lacking this password are ignored. This authentication mechanism is - very weak. + Every packet carries 8 bytes of password. Received packets lacking this + password are ignored. This authentication mechanism is very weak. authentication cryptographic - 16-byte long MD5 digest is appended to every packet. For the digest - generation 16-byte long passwords are used. Those passwords are - not sent via network, so this mechanism is quite secure. - Packets can still be read by an attacker. + 16-byte long MD5 digest is appended to every packet. For the digest + generation 16-byte long passwords are used. Those passwords are not sent + via network, so this mechanism is quite secure. Packets can still be + read by an attacker. password "text" - An 8-byte or 16-byte password used for authentication. - See common option for detailed description. + An 8-byte or 16-byte password used for authentication. See + common option for detailed + description. neighbors { - A set of neighbors to which Hello messages on NBMA or PtMP - networks are to be sent. For NBMA networks, some of them - could be marked as eligible. In OSPFv3, link-local addresses - should be used, using global ones is possible, but it is - nonstandard and might be problematic. And definitely, - link-local and global addresses should not be mixed. - + A set of neighbors to which Hello messages on NBMA or PtMP networks are + to be sent. For NBMA networks, some of them could be marked as eligible. + In OSPFv3, link-local addresses should be used, using global ones is + possible, but it is nonstandard and might be problematic. And definitely, + link-local and global addresses should not be mixed. Attributes

OSPF defines four route attributes. Each internal route has a Metric is ranging from 1 to infinity (65535). External routes use +Each external route can also carry attribute Example -

- protocol ospf MyOSPF { - rfc1583compat yes; - tick 2; + rfc1583compat yes; + tick 2; export filter { if source = RTS_BGP then { ospf_metric1 = 100; @@ -2728,49 +2746,52 @@ protocol ospf MyOSPF { } + Pipe Introduction -

The Pipe protocol serves as a link between two routing tables, allowing routes to be -passed from a table declared as primary (i.e., the one the pipe is connected to using the -The Pipe protocol serves as a link between two routing tables, allowing +routes to be passed from a table declared as primary (i.e., the one the pipe is +connected to using the The Pipe protocol may work in the transparent mode mode or in the opaque mode. -In the transparent mode, the Pipe protocol retransmits all routes from -one table to the other table, retaining their original source and -attributes. If import and export filters are set to accept, then both -tables would have the same content. The transparent mode is the default mode. +

The Pipe protocol may work in the transparent mode mode or in the opaque +mode. In the transparent mode, the Pipe protocol retransmits all routes from +one table to the other table, retaining their original source and attributes. +If import and export filters are set to accept, then both tables would have +the same content. The transparent mode is the default mode. -

In the opaque mode, the Pipe protocol retransmits optimal route -from one table to the other table in a similar way like other -protocols send and receive routes. Retransmitted route will have the -source set to the Pipe protocol, which may limit access to protocol -specific route attributes. This mode is mainly for compatibility, it -is not suggested for new configs. The mode can be changed by +

In the opaque mode, the Pipe protocol retransmits optimal route from one +table to the other table in a similar way like other protocols send and receive +routes. Retransmitted route will have the source set to the Pipe protocol, which +may limit access to protocol specific route attributes. This mode is mainly for +compatibility, it is not suggested for new configs. The mode can be changed by The primary use of multiple routing tables and the Pipe protocol is for policy routing, -where handling of a single packet doesn't depend only on its destination address, but also -on its source address, source interface, protocol type and other similar parameters. -In many systems (Linux being a good example), the kernel allows to enforce routing policies -by defining routing rules which choose one of several routing tables to be used for a packet -according to its parameters. Setting of these rules is outside the scope of BIRD's work -(on Linux, you can use the The primary use of multiple routing tables and the Pipe protocol is for +policy routing, where handling of a single packet doesn't depend only on its +destination address, but also on its source address, source interface, protocol +type and other similar parameters. In many systems (Linux being a good example), +the kernel allows to enforce routing policies by defining routing rules which +choose one of several routing tables to be used for a packet according to its +parameters. Setting of these rules is outside the scope of BIRD's work (on +Linux, you can use the Configuration

- peer table Defines secondary routing table to connect to. The - primary one is selected by the peer table + Defines secondary routing table to connect to. The primary one is + selected by the mode opaque|transparent Specifies the mode for the pipe to work in. Default is transparent. + mode opaque|transparent + Specifies the mode for the pipe to work in. Default is transparent. Attributes @@ -2779,19 +2800,20 @@ another one. Example -

Let's consider a router which serves as a boundary router of two different autonomous -systems, each of them connected to a subset of interfaces of the router, having its own -exterior connectivity and wishing to use the other AS as a backup connectivity in case -of outage of its own exterior line. +

Let's consider a router which serves as a boundary router of two different +autonomous systems, each of them connected to a subset of interfaces of the +router, having its own exterior connectivity and wishing to use the other AS as +a backup connectivity in case of outage of its own exterior line. -

Probably the simplest solution to this situation is to use two routing tables (we'll -call them Probably the simplest solution to this situation is to use two routing tables +(we'll call them table as1; # Define the tables @@ -2845,149 +2867,140 @@ protocol pipe { # The Pipe } + RAdv Introduction -

The RAdv protocol is an implementation of Router Advertisements, -which are used in the IPv6 stateless autoconfiguration. IPv6 routers -send (in irregular time intervals or as an answer to a request) -advertisement packets to connected networks. These packets contain -basic information about a local network (e.g. a list of network -prefixes), which allows network hosts to autoconfigure network -addresses and choose a default route. BIRD implements router behavior -as defined in -RFC 4861 +

The RAdv protocol is an implementation of Router Advertisements, which are +used in the IPv6 stateless autoconfiguration. IPv6 routers send (in irregular +time intervals or as an answer to a request) advertisement packets to connected +networks. These packets contain basic information about a local network (e.g. a +list of network prefixes), which allows network hosts to autoconfigure network +addresses and choose a default route. BIRD implements router behavior as defined +in RFC 4861 and also the DNS extensions from RFC 6106. Configuration -

There are several classes of definitions in RAdv configuration -- -interface definitions, prefix definitions and DNS definitions: +

There are several classes of definitions in RAdv configuration -- interface +definitions, prefix definitions and DNS definitions: - interface + interface Interface definitions specify a set of interfaces on which the protocol is activated and contain interface specific options. See common options for detailed description. prefix - Prefix definitions allow to modify a list of advertised - prefixes. By default, the advertised prefixes are the same as - the network prefixes assigned to the interface. For each - network prefix, the matching prefix definition is found and - its options are used. If no matching prefix definition is - found, the prefix is used with default options. + Prefix definitions allow to modify a list of advertised prefixes. By + default, the advertised prefixes are the same as the network prefixes + assigned to the interface. For each network prefix, the matching prefix + definition is found and its options are used. If no matching prefix + definition is found, the prefix is used with default options. - Prefix definitions can be either global or interface-specific. - The second ones are part of interface options. The prefix - definition matching is done in the first-match style, when - interface-specific definitions are processed before global - definitions. As expected, the prefix definition is matching if - the network prefix is a subnet of the prefix in prefix - definition. + Prefix definitions can be either global or interface-specific. The + second ones are part of interface options. The prefix definition + matching is done in the first-match style, when interface-specific + definitions are processed before global definitions. As expected, the + prefix definition is matching if the network prefix is a subnet of the + prefix in prefix definition. rdnss { - RDNSS definitions allow to specify a list of advertised - recursive DNS servers together with their options. As options - are seldom necessary, there is also a short variant rdnss - that just specifies one DNS server. Multiple - definitions are cumulative. RDNSS definitions may also be - interface-specific when used inside interface options. By - default, interface uses both global and interface-specific + RDNSS definitions allow to specify a list of advertised recursive DNS + servers together with their options. As options are seldom necessary, + there is also a short variant rdnss that just + specifies one DNS server. Multiple definitions are cumulative. RDNSS + definitions may also be interface-specific when used inside interface + options. By default, interface uses both global and interface-specific options, but that can be changed by dnssl { - DNSSL definitions allow to specify a list of advertised DNS - search domains together with their options. Like dnssl that just specifies one DNS - search domain. + DNSSL definitions allow to specify a list of advertised DNS search + domains together with their options. Like dnssl that just + specifies one DNS search domain.

Interface specific options: max ra interval - Unsolicited router advertisements are sent in irregular time - intervals. This option specifies the maximum length of these - intervals, in seconds. Valid values are 4-1800. Default: 600 + Unsolicited router advertisements are sent in irregular time intervals. + This option specifies the maximum length of these intervals, in seconds. + Valid values are 4-1800. Default: 600 min ra interval - This option specifies the minimum length of that intervals, in - seconds. Must be at least 3 and at most 3/4 * min delay - The minimum delay between two consecutive router advertisements, - in seconds. Default: 3 + The minimum delay between two consecutive router advertisements, in + seconds. Default: 3 managed - This option specifies whether hosts should use DHCPv6 for - IP address configuration. Default: no + This option specifies whether hosts should use DHCPv6 for IP address + configuration. Default: no other config - This option specifies whether hosts should use DHCPv6 to - receive other configuration information. Default: no + This option specifies whether hosts should use DHCPv6 to receive other + configuration information. Default: no link mtu - This option specifies which value of MTU should be used by - hosts. 0 means unspecified. Default: 0 + This option specifies which value of MTU should be used by hosts. 0 + means unspecified. Default: 0 reachable time - This option specifies the time (in milliseconds) how long - hosts should assume a neighbor is reachable (from the last - confirmation). Maximum is 3600000, 0 means unspecified. - Default 0. + This option specifies the time (in milliseconds) how long hosts should + assume a neighbor is reachable (from the last confirmation). Maximum is + 3600000, 0 means unspecified. Default 0. retrans timer - This option specifies the time (in milliseconds) how long - hosts should wait before retransmitting Neighbor Solicitation - messages. 0 means unspecified. Default 0. + This option specifies the time (in milliseconds) how long hosts should + wait before retransmitting Neighbor Solicitation messages. 0 means + unspecified. Default 0. current hop limit - This option specifies which value of Hop Limit should be used - by hosts. Valid values are 0-255, 0 means unspecified. Default: 64 + This option specifies which value of Hop Limit should be used by + hosts. Valid values are 0-255, 0 means unspecified. Default: 64 default lifetime - This option specifies the time (in seconds) how long (after - the receipt of RA) hosts may use the router as a default - router. 0 means do not use as a default router. For - . - Default: 3 * . + Default: 3 * rdnss local Use only local (interface-specific) RDNSS definitions for this - interface. Otherwise, both global and local definitions are - used. Could also be used to disable RDNSS for given interface - if no local definitons are specified. Default: no. + interface. Otherwise, both global and local definitions are used. Could + also be used to disable RDNSS for given interface if no local definitons + are specified. Default: no. dnssl local - Use only local DNSSL definitions for this interface. See - @@ -2996,33 +3009,33 @@ interface definitions, prefix definitions and DNS definitions: skip This option allows to specify that given prefix should not be - advertised. This is useful for making exceptions from a - default policy of advertising all prefixes. Note that for - withdrawing an already advertised prefix it is more useful to - advertise it with zero valid lifetime. Default: no + advertised. This is useful for making exceptions from a default policy + of advertising all prefixes. Note that for withdrawing an already + advertised prefix it is more useful to advertise it with zero valid + lifetime. Default: no onlink - This option specifies whether hosts may use the advertised - prefix for onlink determination. Default: yes + This option specifies whether hosts may use the advertised prefix for + onlink determination. Default: yes autonomous - This option specifies whether hosts may use the advertised - prefix for stateless autoconfiguration. Default: yes + This option specifies whether hosts may use the advertised prefix for + stateless autoconfiguration. Default: yes valid lifetime - This option specifies the time (in seconds) how long (after - the receipt of RA) the prefix information is valid, i.e., - autoconfigured IP addresses can be assigned and hosts with - that IP addresses are considered directly reachable. 0 means - the prefix is no longer valid. For . Default: 86400 (1 day), . + Default: 86400 (1 day), preferred lifetime - This option specifies the time (in seconds) how long (after - the receipt of RA) IP addresses generated from the prefix - using stateless autoconfiguration remain preferred. For - . - Default: 14400 (4 hours), . Default: 14400 (4 hours), + @@ -3030,18 +3043,17 @@ interface definitions, prefix definitions and DNS definitions: ns - This option specifies one recursive DNS server. Can be used - multiple times for multiple servers. It is mandatory to have - at least one lifetime [mult] - This option specifies the time how long the RDNSS information - may be used by clients after the receipt of RA. It is - expressed either in seconds or (when @@ -3049,15 +3061,14 @@ interface definitions, prefix definitions and DNS definitions: domain - This option specifies one DNS search domain. Can be used - multiple times for multiple domains. It is mandatory to have - at least one lifetime [mult] - This option specifies the time how long the DNSSL information - may be used by clients after the receipt of RA. Details are - the same as for RDNSS @@ -3099,108 +3110,123 @@ protocol radv { } + RIP Introduction -

The RIP protocol (also sometimes called Rest In Pieces) is a simple protocol, where each router broadcasts (to all its neighbors) -distances to all networks it can reach. When a router hears distance to another network, it increments -it and broadcasts it back. Broadcasts are done in regular intervals. Therefore, if some network goes -unreachable, routers keep telling each other that its distance is the original distance plus 1 (actually, plus -interface metric, which is usually one). After some time, the distance reaches infinity (that's 15 in -RIP) and all routers know that network is unreachable. RIP tries to minimize situations where -counting to infinity is necessary, because it is slow. Due to infinity being 16, you can't use -RIP on networks where maximal distance is higher than 15 hosts. You can read more about RIP at . Both IPv4 -(RFC 1723) -and IPv6 (RFC 2080) versions of RIP are supported by BIRD, historical RIPv1 (RFC 1058)is -not currently supported. RIPv4 MD5 authentication (RFC 2082) is supported. +

The RIP protocol (also sometimes called Rest In Pieces) is a simple protocol, +where each router broadcasts (to all its neighbors) distances to all networks it +can reach. When a router hears distance to another network, it increments it and +broadcasts it back. Broadcasts are done in regular intervals. Therefore, if some +network goes unreachable, routers keep telling each other that its distance is +the original distance plus 1 (actually, plus interface metric, which is usually +one). After some time, the distance reaches infinity (that's 15 in RIP) and all +routers know that network is unreachable. RIP tries to minimize situations where +counting to infinity is necessary, because it is slow. Due to infinity being 16, +you can't use RIP on networks where maximal distance is higher than 15 +hosts. You can read more about RIP at +. Both IPv4 +(RFC 1723 ) and IPv6 +(RFC 2080 ) versions +of RIP are supported by BIRD, historical RIPv1 +(RFC 1058 ) is not +currently supported. RIPv4 MD5 authentication +(RFC 2082 ) is +supported.

RIP is a very simple protocol, and it has a lot of shortcomings. Slow -convergence, big network load and inability to handle larger networks -makes it pretty much obsolete. (It is still usable on very small networks.) +convergence, big network load and inability to handle larger networks makes it +pretty much obsolete. It is still usable on very small networks. Configuration -

In addition to options common for all to other protocols, RIP supports the following ones: +

In addition to options common for all to other protocols, RIP supports the +following ones: - password - section. Default: none. + authentication none|plaintext|md5 + Selects authentication method to be used. password + section. Default: none. - honor always|neighbor|never specifies when should requests for dumping routing table - be honored. (Always, when sent from a host on a directly connected - network or never.) Routing table updates are honored only from - neighbors, that is not configurable. Default: never. + honor always|neighbor|never + Specifies when should requests for dumping routing table be honored. + (Always, when sent from a host on a directly connected network or + never.) Routing table updates are honored only from neighbors, that is + not configurable. Default: never.

There are some options that can be specified per-interface: metric - This option specifies the metric of the interface. Valid + This option specifies the metric of the interface. Valid mode multicast|broadcast|quiet|nolisten|version1 - This option selects the mode for RIP to work in. If nothing is - specified, RIP runs in multicast mode. ttl security [ - TTL security is a feature that protects routing protocols - from remote spoofed packets by using TTL 255 instead of TTL 1 - for protocol packets destined to neighbors. Because TTL is - decremented when packets are forwarded, it is non-trivial to - spoof packets with TTL 255 from remote locations. + TTL security is a feature that protects routing protocols from remote + spoofed packets by using TTL 255 instead of TTL 1 for protocol packets + destined to neighbors. Because TTL is decremented when packets are + forwarded, it is non-trivial to spoof packets with TTL 255 from remote + locations. - If this option is enabled, the router will send RIP packets - with TTL 255 and drop received packets with TTL less than - 255. If this option si set to tx class|dscp|priority - These options specify the ToS/DiffServ/Traffic class/Priority - of the outgoing RIP packets. See common option for detailed description. + These options specify the ToS/DiffServ/Traffic class/Priority of the + outgoing RIP packets. See common + option for detailed description. -

The following options generally override behavior specified in RFC. If you use any of these -options, BIRD will no longer be RFC-compliant, which means it will not be able to talk to anything -other than equally configured BIRD. I have warned you. +

The following options generally override behavior specified in RFC. If you +use any of these options, BIRD will no longer be RFC-compliant, which means it +will not be able to talk to anything other than equally configured BIRD. I have +warned you. port number - selects IP port to operate on, default 520. (This is useful when testing BIRD, if you - set this to an address >1024, you will not need to run bird with UID==0). + Selects IP port to operate on, default 520. (This is useful when testing + BIRD, if you set this to an address >1024, you will not need to run + bird with UID==0). infinity number - selects the value of infinity, default is 16. Bigger values will make protocol convergence - even slower. + Selects the value of infinity, default is 16. Bigger values will make + protocol convergence even slower. - period number - specifies the number of seconds between periodic updates. Default is 30 seconds. A lower - number will mean faster convergence but bigger network - load. Do not use values lower than 12. + period number + Specifies the number of seconds between periodic updates. Default is 30 + seconds. A lower number will mean faster convergence but bigger network + load. Do not use values lower than 12. - timeout time number - specifies how old route has to be to be considered unreachable. Default is 4*timeout time number + Specifies how old route has to be to be considered unreachable. + Default is 4*garbage time number - specifies how old route has to be to be discarded. Default is 10*garbage time number + Specifies how old route has to be to be discarded. Default is + 10* Attributes @@ -3208,14 +3234,17 @@ other than equally configured BIRD. I have warned you.

RIP defines two route attributes: - int RIP metric of the route (ranging from 0 to int + RIP metric of the route (ranging from 0 to int RIP route tag: a 16-bit number which can be used - to carry additional information with the route (for example, an originating AS number - in case of external routes). When importing a non-RIP route, the tag defaults to 0. + int + RIP route tag: a 16-bit number which can be used to carry additional + information with the route (for example, an originating AS number in + case of external routes). When importing a non-RIP route, the tag + defaults to 0. Example @@ -3235,57 +3264,63 @@ protocol rip MyRIP_test { } + Static

The Static protocol doesn't communicate with other routers in the network, but instead it allows you to define routes manually. This is often used for specifying how to forward packets to parts of the network which don't use -dynamic routing at all and also for defining sink routes (i.e., those -telling to return packets as undeliverable if they are in your IP block, -you don't have any specific destination for them and you don't want to send -them out through the default route to prevent routing loops). +dynamic routing at all and also for defining sink routes (i.e., those telling to +return packets as undeliverable if they are in your IP block, you don't have any +specific destination for them and you don't want to send them out through the +default route to prevent routing loops). -

There are five types of static routes: `classical' routes telling -to forward 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.) which specify -a special action to be done instead of forwarding the packet. +

There are five types of static routes: `classical' routes telling to forward +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.) +which specify a special action to be done instead of forwarding the packet.

When the particular destination is not available (the interface is down or 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. -

The Static protocol does not have many configuration options. The -definition of the protocol contains mainly a list of static routes: +

The Static protocol does not have many configuration options. The definition +of the protocol contains mainly a list of static routes: - route Static route through - a neighboring router. + route + Static route through a neighboring router. + route Static multipath route. Contains several nexthops (gateways), possibly with their weights. - route Static device - route through an interface to hosts on a directly connected network. - route Static recursive route, - its nexthop depends on a route table lookup for given IP address. - route 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 route + Static device route through an interface to hosts on a directly + connected network. + + route + Static recursive route, its nexthop depends on a route table lookup for + given IP address. + + route + 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 check link - 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. + 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. - igp table Specifies a table that is used - for route table lookups of recursive routes. Default: the - same table as the protocol is connected to. + igp table + Specifies a table that is used for route table lookups of recursive + routes. Default: the same table as the protocol is connected to.

Static routes have no specific attributes. @@ -3305,13 +3340,14 @@ protocol static { } + Conclusions Future work -

Although BIRD supports all the commonly used routing protocols, -there are still some features which would surely deserve to be -implemented in future versions of BIRD: +

Although BIRD supports all the commonly used routing protocols, there are +still some features which would surely deserve to be implemented in future +versions of BIRD: Opaque LSA's @@ -3321,6 +3357,7 @@ implemented in future versions of BIRD: Ports to other systems + Getting more help

If you use BIRD, you're welcome to join the bird-users mailing list @@ -3331,15 +3368,18 @@ your problems with the authors. To subscribe to the list, just send a (). The home page of BIRD can be found at . -

BIRD is a relatively young system and it probably contains some -bugs. You can report any problems to the bird-users list and the authors -will be glad to solve them, but before you do so, -please make sure you have read the available documentation and that you are running the latest version (available at ). (Of course, a patch -which fixes the bug is always welcome as an attachment.) +

BIRD is a relatively young system and it probably contains some bugs. You can +report any problems to the bird-users list and the authors will be glad to solve +them, but before you do so, please make sure you have read the available +documentation and that you are running the latest version (available at +). +(Of course, a patch which fixes the bug is always welcome as an attachment.) -

If you want to understand what is going inside, Internet standards are -a good and interesting reading. You can get them from (or a nicely sorted version from ). +

If you want to understand what is going inside, Internet standards are a good +and interesting reading. You can get them from + (or a +nicely sorted version from ).