Annotation of embedaddon/bird2/doc/bird.conf.example, revision 1.1.1.1
1.1 misho 1: # This is a basic configuration file, which contains boilerplate options and
2: # some basic examples. It allows the BIRD daemon to start but will not cause
3: # anything else to happen.
4: #
5: # Please refer to the BIRD User's Guide documentation, which is also available
6: # online at http://bird.network.cz/ in HTML format, for more information on
7: # configuring BIRD and adding routing protocols.
8:
9: # Configure logging
10: log syslog all;
11: # log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug };
12:
13: # Set router ID. It is a unique identification of your router, usually one of
14: # IPv4 addresses of the router. It is recommended to configure it explicitly.
15: # router id 198.51.100.1;
16:
17: # Turn on global debugging of all protocols (all messages or just selected classes)
18: # debug protocols all;
19: # debug protocols { events, states };
20:
21: # Turn on internal watchdog
22: # watchdog warning 5 s;
23: # watchdog timeout 30 s;
24:
25: # You can define your own constants
26: # define my_asn = 65000;
27: # define my_addr = 198.51.100.1;
28:
29: # Tables master4 and master6 are defined by default
30: # ipv4 table master4;
31: # ipv6 table master6;
32:
33: # Define more tables, e.g. for policy routing or as MRIB
34: # ipv4 table mrib4;
35: # ipv6 table mrib6;
36:
37: # The Device protocol is not a real routing protocol. It does not generate any
38: # routes and it only serves as a module for getting information about network
39: # interfaces from the kernel. It is necessary in almost any configuration.
40: protocol device {
41: }
42:
43: # The direct protocol is not a real routing protocol. It automatically generates
44: # direct routes to all network interfaces. Can exist in as many instances as you
45: # wish if you want to populate multiple routing tables with direct routes.
46: protocol direct {
47: disabled; # Disable by default
48: ipv4; # Connect to default IPv4 table
49: ipv6; # ... and to default IPv6 table
50: }
51:
52: # The Kernel protocol is not a real routing protocol. Instead of communicating
53: # with other routers in the network, it performs synchronization of BIRD
54: # routing tables with the OS kernel. One instance per table.
55: protocol kernel {
56: ipv4 { # Connect protocol to IPv4 table by channel
57: # table master4; # Default IPv4 table is master4
58: # import all; # Import to table, default is import all
59: export all; # Export to protocol. default is export none
60: };
61: # learn; # Learn alien routes from the kernel
62: # kernel table 10; # Kernel table to synchronize with (default: main)
63: }
64:
65: # Another instance for IPv6, skipping default options
66: protocol kernel {
67: ipv6 { export all; };
68: }
69:
70: # Static routes (Again, there can be multiple instances, for different address
71: # families and to disable/enable various groups of static routes on the fly).
72: protocol static {
73: ipv4; # Again, IPv4 channel with default options
74:
75: # route 0.0.0.0/0 via 198.51.100.10;
76: # route 192.0.2.0/24 blackhole;
77: # route 10.0.0.0/8 unreachable;
78: # route 10.2.0.0/24 via "eth0";
79: # # Static routes can be defined with optional attributes
80: # route 10.1.1.0/24 via 198.51.100.3 { rip_metric = 3; };
81: # route 10.1.2.0/24 via 198.51.100.3 { ospf_metric1 = 100; };
82: # route 10.1.3.0/24 via 198.51.100.4 { ospf_metric2 = 100; };
83: }
84:
85: # Pipe protocol connects two routing tables. Beware of loops.
86: # protocol pipe {
87: # table master4; # No ipv4/ipv6 channel definition like in other protocols
88: # peer table mrib4;
89: # import all; # Direction peer table -> table
90: # export all; # Direction table -> peer table
91: # }
92:
93: # RIP example, both RIP and RIPng are supported
94: # protocol rip {
95: # ipv4 {
96: # # Export direct, static routes and ones from RIP itself
97: # import all;
98: # export where source ~ [ RTS_DEVICE, RTS_STATIC, RTS_RIP ];
99: # };
100: # interface "eth*" {
101: # update time 10; # Default period is 30
102: # timeout time 60; # Default timeout is 180
103: # authentication cryptographic; # No authentication by default
104: # password "hello" { algorithm hmac sha256; }; # Default is MD5
105: # };
106: # }
107:
108: # OSPF example, both OSPFv2 and OSPFv3 are supported
109: # protocol ospf v3 {
110: # ipv6 {
111: # import all;
112: # export where source = RTS_STATIC;
113: # };
114: # area 0 {
115: # interface "eth*" {
116: # type broadcast; # Detected by default
117: # cost 10; # Interface metric
118: # hello 5; # Default hello perid 10 is too long
119: # };
120: # interface "tun*" {
121: # type ptp; # PtP mode, avoids DR selection
122: # cost 100; # Interface metric
123: # hello 5; # Default hello perid 10 is too long
124: # };
125: # interface "dummy0" {
126: # stub; # Stub interface, just propagate it
127: # };
128: # };
129: #}
130:
131: # Define simple filter as an example for BGP import filter
132: # See https://gitlab.labs.nic.cz/labs/bird/wikis/BGP_filtering for more examples
133: # filter rt_import
134: # {
135: # if bgp_path.first != 64496 then accept;
136: # if bgp_path.len > 64 then accept;
137: # if bgp_next_hop != from then accept;
138: # reject;
139: # }
140:
141: # BGP example, explicit name 'uplink1' is used instead of default 'bgp1'
142: # protocol bgp uplink1 {
143: # description "My BGP uplink";
144: # local 198.51.100.1 as 65000;
145: # neighbor 198.51.100.10 as 64496;
146: # hold time 90; # Default is 240
147: # password "secret"; # Password used for MD5 authentication
148: #
149: # ipv4 { # regular IPv4 unicast (1/1)
150: # import filter rt_import;
151: # export where source ~ [ RTS_STATIC, RTS_BGP ];
152: # };
153: #
154: # ipv6 { # regular IPv6 unicast (2/1)
155: # import filter rt_import;
156: # export filter { # The same as 'where' expression above
157: # if source ~ [ RTS_STATIC, RTS_BGP ]
158: # then accept;
159: # else reject;
160: # };
161: # };
162: #
163: # ipv4 multicast { # IPv4 multicast topology (1/2)
164: # table mrib4; # explicit IPv4 table
165: # import filter rt_import;
166: # export all;
167: # };
168: #
169: # ipv6 multicast { # IPv6 multicast topology (2/2)
170: # table mrib6; # explicit IPv6 table
171: # import filter rt_import;
172: # export all;
173: # };
174: #}
175:
176: # Template example. Using templates to define IBGP route reflector clients.
177: # template bgp rr_clients {
178: # local 10.0.0.1 as 65000;
179: # neighbor as 65000;
180: # rr client;
181: # rr cluster id 1.0.0.1;
182: #
183: # ipv4 {
184: # import all;
185: # export where source = RTS_BGP;
186: # };
187: #
188: # ipv6 {
189: # import all;
190: # export where source = RTS_BGP;
191: # };
192: # }
193: #
194: # protocol bgp client1 from rr_clients {
195: # neighbor 10.0.1.1;
196: # }
197: #
198: # protocol bgp client2 from rr_clients {
199: # neighbor 10.0.2.1;
200: # }
201: #
202: # protocol bgp client3 from rr_clients {
203: # neighbor 10.0.3.1;
204: # }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>