]>
Commit | Line | Data |
---|---|---|
3b522a1e OZ |
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. | |
906b0170 | 8 | |
8aecbf16 | 9 | # Configure logging |
3b522a1e OZ |
10 | log syslog all; |
11 | # log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; | |
a0c37b45 | 12 | |
3b522a1e OZ |
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; | |
c74c0e3c | 16 | |
3b522a1e OZ |
17 | # Turn on global debugging of all protocols (all messages or just selected classes) |
18 | # debug protocols all; | |
19 | # debug protocols { events, states }; | |
0b62c3a7 | 20 | |
3b522a1e OZ |
21 | # Turn on internal watchdog |
22 | # watchdog warning 5 s; | |
23 | # watchdog timeout 30 s; | |
8aecbf16 | 24 | |
3b522a1e OZ |
25 | # You can define your own constants |
26 | # define my_asn = 65000; | |
27 | # define my_addr = 198.51.100.1; | |
529c4149 | 28 | |
3b522a1e OZ |
29 | # Tables master4 and master6 are defined by default |
30 | # ipv4 table master4; | |
31 | # ipv6 table master6; | |
48ec367a | 32 | |
3b522a1e OZ |
33 | # Define more tables, e.g. for policy routing or as MRIB |
34 | # ipv4 table mrib4; | |
35 | # ipv6 table mrib6; | |
0e02abfd | 36 | |
3b522a1e OZ |
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 | } | |
50d8424a | 42 | |
3b522a1e OZ |
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 | } | |
980ffedb | 51 | |
3b522a1e OZ |
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. | |
980ffedb | 55 | protocol kernel { |
3b522a1e OZ |
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) | |
980ffedb | 63 | } |
a1bf6440 | 64 | |
3b522a1e OZ |
65 | # Another instance for IPv6, skipping default options |
66 | protocol kernel { | |
67 | ipv6 { export all; }; | |
7e5f5ffd MM |
68 | } |
69 | ||
3b522a1e OZ |
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). | |
a1bf6440 | 72 | protocol static { |
3b522a1e OZ |
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; | |
80a9cadc | 77 | # route 10.0.0.0/8 unreachable; |
3b522a1e OZ |
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; }; | |
a1bf6440 | 83 | } |
9c11ec9e | 84 | |
3b522a1e OZ |
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 ]; | |
a6806653 | 99 | # }; |
3b522a1e OZ |
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 | # } | |
8aecbf16 | 107 | |
3b522a1e OZ |
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 { | |
ab698fc5 | 115 | # interface "eth*" { |
3b522a1e OZ |
116 | # type broadcast; # Detected by default |
117 | # cost 10; # Interface metric | |
118 | # hello 5; # Default hello perid 10 is too long | |
ab698fc5 | 119 | # }; |
3b522a1e OZ |
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 | |
7d68e18b | 124 | # }; |
3b522a1e OZ |
125 | # interface "dummy0" { |
126 | # stub; # Stub interface, just propagate it | |
ab698fc5 OF |
127 | # }; |
128 | # }; | |
129 | #} | |
8bcb5fb1 | 130 | |
3b522a1e OZ |
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 { | |
a6806653 | 143 | # description "My BGP uplink"; |
3b522a1e OZ |
144 | # local 198.51.100.1 as 65000; |
145 | # neighbor 198.51.100.10 as 64496; | |
146 | # hold time 90; # Default is 240 | |
a6806653 | 147 | # password "secret"; # Password used for MD5 authentication |
3b522a1e OZ |
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; | |
8aecbf16 | 167 | # }; |
8bcb5fb1 | 168 | # |
3b522a1e OZ |
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; | |
a7f23f58 OZ |
180 | # rr client; |
181 | # rr cluster id 1.0.0.1; | |
a7f23f58 | 182 | # |
3b522a1e OZ |
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 | # } |