summaryrefslogtreecommitdiff
path: root/doc/bird.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bird.sgml')
-rw-r--r--doc/bird.sgml142
1 files changed, 90 insertions, 52 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml
index 3bc0e453..46d2e026 100644
--- a/doc/bird.sgml
+++ b/doc/bird.sgml
@@ -144,13 +144,19 @@ options. The most important ones are:
nonzero if there are some errors.
<tag>-s <m/name of communication socket/</tag>
- use given filename for a socket for communications with the client, default is <it/prefix/<file>/var/run/bird.ctl</file>.
+ use given filename for a socket for communications with the client, default is <it/prefix/<file>/var/run/bird.ctl</file>.
+
+ <tag>-P <m/name of PID file/</tag>
+ create a PID file with given filename</file>.
<tag>-u <m/user/</tag>
drop privileges and use that user ID, see the next section for details.
<tag>-g <m/group/</tag>
use that group ID, see the next section for details.
+
+ <tag>-f</tag>
+ run bird in foreground.
</descrip>
<p>BIRD writes messages about its work to log files or syslog (according to config).
@@ -477,7 +483,7 @@ to zero to disable it. An empty <cf><m/switch/</cf> is equivalent to <cf/on/
using <cf/show route filtered/. Note that this option does not
work for the pipe protocol. Default: off.
- <tag>import limit [<m/number/ | off ] [action warn | block | restart | disable]</tag>
+ <tag><label id="import-limit">import limit [<m/number/ | off ] [action warn | block | restart | disable]</tag>
Specify an import route limit (a maximum number of routes
imported from the protocol) and optionally the action to be
taken when the limit is hit. Warn action just prints warning
@@ -912,56 +918,63 @@ bird>
incompatible with each other (that is to prevent you from shooting in the foot).
<descrip>
- <tag/bool/ This is a boolean type, it can have only two values, <cf/true/ and
- <cf/false/. Boolean is the only type you can use in <cf/if/
- statements.
-
- <tag/int/ This is a general integer type, you can expect it to store signed values from -2000000000
- to +2000000000. Overflows are not checked. You can use <cf/0x1234/ syntax to write hexadecimal values.
-
- <tag/pair/ This is a pair of two short integers. Each component can have values from 0 to
- 65535. Literals of this type are written as <cf/(1234,5678)/. The same syntax can also be
- used to construct a pair from two arbitrary integer expressions (for example <cf/(1+2,a)/).
-
- <tag/quad/ This is a dotted quad of numbers used to represent
- router IDs (and others). Each component can have a value
- from 0 to 255. Literals of this type are written like IPv4
- addresses.
-
- <tag/string/ This is a string of characters. There are no ways to modify strings in
- filters. You can pass them between functions, assign them to variables of type <cf/string/, print
- such variables, but you can't concatenate two strings. String literals
- are written as <cf/"This is a string constant"/.
-
- <tag/ip/ This type can hold a single IP address. Depending on the compile-time configuration of BIRD you are using, it
- is either an IPv4 or IPv6 address. IP addresses are written in the standard notation (<cf/10.20.30.40/ or <cf/fec0:3:4::1/). You can apply special operator <cf>.mask(<M>num</M>)</cf>
- on values of type ip. It masks out all but first <cf><M>num</M></cf> bits from the IP
- address. So <cf/1.2.3.4.mask(8) = 1.0.0.0/ is true.
-
- <tag/prefix/ This type can hold a network prefix consisting of IP address and prefix length. Prefix literals are written as
- <cf><M>ipaddress</M>/<M>pxlen</M></cf>, or
+ <tag/bool/ This is a boolean type, it can have only two values,
+ <cf/true/ and <cf/false/. Boolean is the only type you can use in
+ <cf/if/ statements.
+
+ <tag/int/ This is a general integer type, you can expect it to store
+ signed values from -2000000000 to +2000000000. Overflows are not
+ checked. You can use <cf/0x1234/ syntax to write hexadecimal values.
+
+ <tag/pair/ This is a pair of two short integers. Each component can have
+ values from 0 to 65535. Literals of this type are written as
+ <cf/(1234,5678)/. The same syntax can also be used to construct a pair
+ from two arbitrary integer expressions (for example <cf/(1+2,a)/).
+
+ <tag/quad/ This is a dotted quad of numbers used to represent router IDs
+ (and others). Each component can have a value from 0 to 255. Literals
+ of this type are written like IPv4 addresses.
+
+ <tag/string/ This is a string of characters. There are no ways to modify
+ strings in filters. You can pass them between functions, assign them
+ to variables of type <cf/string/, print such variables, use standard
+ string comparison operations (e.g. <cf/=, !=, &lt;, &gt;, &lt;=,
+ &gt;=/), but you can't concatenate two strings. String literals are
+ written as <cf/"This is a string constant"/. Additionaly matching
+ <cf/&tilde;/ operator could be used to match a string value against a
+ shell pattern (represented also as a string).
+
+ <tag/ip/ This type can hold a single IP address. Depending on the
+ compile-time configuration of BIRD you are using, it is either an IPv4
+ or IPv6 address. IP addresses are written in the standard notation
+ (<cf/10.20.30.40/ or <cf/fec0:3:4::1/). You can apply special
+ operator <cf>.mask(<M>num</M>)</cf> on values of type ip. It masks out
+ all but first <cf><M>num</M></cf> bits from the IP address. So
+ <cf/1.2.3.4.mask(8) = 1.0.0.0/ is true.
+
+ <tag/prefix/ This type can hold a network prefix consisting of IP
+ address and prefix length. Prefix literals are written
+ as <cf><M>ipaddress</M>/<M>pxlen</M></cf>, or
<cf><m>ipaddress</m>/<m>netmask</m></cf>. There are two special
- operators on prefixes:
- <cf/.ip/ which extracts the IP address from the pair, and <cf/.len/, which separates prefix
- length from the pair. So <cf>1.2.0.0/16.pxlen = 16</cf> is true.
-
- <tag/ec/ This is a specialized type used to represent BGP
- extended community values. It is essentially a 64bit value,
- literals of this type are usually written as <cf>(<m/kind/,
- <m/key/, <m/value/)</cf>, where <cf/kind/ is a kind of
- extended community (e.g. <cf/rt/ / <cf/ro/ for a route
- target / route origin communities), the format and possible
- values of <cf/key/ and <cf/value/ are usually integers, but
+ operators on prefixes: <cf/.ip/ which extracts the IP address from the
+ pair, and <cf/.len/, which separates prefix length from the
+ pair. So <cf>1.2.0.0/16.pxlen = 16</cf> is true.
+
+ <tag/ec/ This is a specialized type used to represent BGP extended
+ community values. It is essentially a 64bit value, literals of this
+ type are usually written as <cf>(<m/kind/, <m/key/, <m/value/)</cf>,
+ where <cf/kind/ is a kind of extended community (e.g. <cf/rt/ /
+ <cf/ro/ for a route target / route origin communities), the format and
+ possible values of <cf/key/ and <cf/value/ are usually integers, but
it depends on the used kind. Similarly to pairs, ECs can be
- constructed using expressions for <cf/key/ and
- <cf/value/ parts, (e.g. <cf/(ro, myas, 3*10)/, where
- <cf/myas/ is an integer variable).
+ constructed using expressions for <cf/key/ and <cf/value/ parts,
+ (e.g. <cf/(ro, myas, 3*10)/, where <cf/myas/ is an integer variable).
- <tag/int|pair|quad|ip|prefix|ec|enum set/
- Filters recognize four types of sets. Sets are similar to strings: you can pass them around
- but you can't modify them. Literals of type <cf>int set</cf> look like <cf>
- [ 1, 2, 5..7 ]</cf>. As you can see, both simple values and ranges are permitted in
- sets.
+ <tag/int|pair|quad|ip|prefix|ec|enum set/ Filters recognize four types
+ of sets. Sets are similar to strings: you can pass them around but you
+ can't modify them. Literals of type <cf>int set</cf> look like <cf> [
+ 1, 2, 5..7 ]</cf>. As you can see, both simple values and ranges are
+ permitted in sets.
For pair sets, expressions like <cf/(123,*)/ can be used to denote ranges (in
that case <cf/(123,0)..(123,65535)/). You can also use <cf/(123,5..100)/ for range
@@ -1071,6 +1084,8 @@ incompatible with each other (that is to prevent you from shooting in the foot).
no literals of this type. There are three special operators on
clists:
+ <cf><m/C/.len</cf> returns the length of clist <m/C/.
+
<cf>add(<m/C/,<m/P/)</cf> adds pair (or quad) <m/P/ to clist
<m/C/ and returns the result. If item <m/P/ is already in
clist <m/C/, it does nothing. <m/P/ may also be a clist,
@@ -1194,7 +1209,6 @@ undefined value is regarded as empty clist for most purposes.
what protocol has told me about this route. Possible values: <cf/RTS_DUMMY/, <cf/RTS_STATIC/, <cf/RTS_INHERIT/, <cf/RTS_DEVICE/, <cf/RTS_STATIC_DEVICE/, <cf/RTS_REDIRECT/, <cf/RTS_RIP/, <cf/RTS_OSPF/, <cf/RTS_OSPF_IA/, <cf/RTS_OSPF_EXT1/, <cf/RTS_OSPF_EXT2/, <cf/RTS_BGP/, <cf/RTS_PIPE/.
<tag><m/enum/ cast</tag>
-
Route type (Currently <cf/RTC_UNICAST/ for normal routes,
<cf/RTC_BROADCAST/, <cf/RTC_MULTICAST/, <cf/RTC_ANYCAST/ will
be used in the future for broadcast, multicast and anycast
@@ -1212,6 +1226,19 @@ undefined value is regarded as empty clist for most purposes.
only to <cf/RTD_BLACKHOLE/, <cf/RTD_UNREACHABLE/ or
<cf/RTD_PROHIBIT/.
+ <tag><m/string/ ifname</tag>
+ Name of the outgoing interface. Sink routes (like blackhole,
+ unreachable or prohibit) and multipath routes have no interface
+ associated with them, so <cf/ifname/ returns an empty string for
+ such routes. Read-only.
+
+ <tag><m/int/ ifindex</tag>
+ 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.
+
<tag><m/int/ igp_metric</tag>
The optional attribute that can be used to specify a distance
to the network for routes that do not have a native protocol
@@ -1643,6 +1670,16 @@ for each neighbor using the following configuration parameters:
This option requires that the connected routing table is
<ref id="dsc-sorted" name="sorted">. Default: off.
+ <tag>allow local as [<m/number/]</tag>
+ 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 <cf/number/ argument can
+ be used to specify the maximum number of local ASNs in the AS
+ path that is allowed for received routes. When the option is
+ used without the argument, the check is completely disabled
+ and you should ensure loop-free behavior by some other means.
+ Default: 0 (no local AS number allowed).
+
<tag>enable route refresh <m/switch/</tag> When BGP speaker
changes its import filter, it has to re-examine all routes
received from its neighbor against the new filter. As these
@@ -1689,8 +1726,9 @@ for each neighbor using the following configuration parameters:
<tag>route limit <m/number/</tag> The maximal number of routes
that may be imported from the protocol. If the route limit is
- exceeded, the connection is closed with error. Limit is currently implemented as
- <cf/import limit number exceed restart/. Default: no limit.
+ exceeded, the connection is closed with an error. Limit is currently implemented as
+ <cf/import limit <m/number/ action restart/. This option is obsolete and it is
+ replaced by <ref id="import-limit" name="import limit option">. Default: no limit.
<tag>disable after error <m/switch/</tag> When an error is encountered (either
locally or by the other side), disable the instance automatically