35e3d5af44d567d07e99f6b46dd28c28d45175f4
howto/Bird2.md
... | ... | @@ -186,10 +186,11 @@ First, make sure the /etc/bird/peers directory exists: |
186 | 186 | # mkdir -p /etc/bird/peers |
187 | 187 | ``` |
188 | 188 | |
189 | -Then for each peer, create a configuration file similar to this one: |
|
190 | - |
|
191 | -`/etc/bird/peers/<NEIGHBOR_NAME>.conf`: |
|
189 | +Each peer can use different methods to peer. Most usually this is either two seperate sessions, |
|
190 | +one for ipv4 and one for ipv6, or Multi protocol BGP with Extended Next Hop, as detailed below. |
|
192 | 191 | |
192 | +`/etc/bird/peers/<NEIGHBOR>.conf`: |
|
193 | +For the case with seperate BGP sessions |
|
193 | 194 | ```conf |
194 | 195 | protocol bgp <NEIGHBOR_NAME> from dnpeers { |
195 | 196 | neighbor <NEIGHBOR_IP> as <NEIGHBOR_ASN>; |
... | ... | @@ -202,6 +203,19 @@ protocol bgp <NEIGHBOR_NAME>_v6 from dnpeers { |
202 | 203 | # interface <NEIGHBOR_INTERFACE>;**** |
203 | 204 | } |
204 | 205 | ``` |
206 | +And for the case of MP-BGP over IPV6 with ENH |
|
207 | +```conf |
|
208 | +protocol bgp <NEIGHBOR_NAME> from dnpeers { |
|
209 | + enable extended messages on; |
|
210 | + neighbor <NEIGHBOR_IPv6>%<NEIGHBOR_INTERFACE> as <NEIGHBOR_ASN>; |
|
211 | + # Or: |
|
212 | + # neighbor <NEIGHBOR_IPv6> as <NEIGHBOR_ASN>; |
|
213 | + # interface <NEIGHBOR_INTERFACE>;**** |
|
214 | + ipv4 { |
|
215 | + extended next hop on; |
|
216 | + }; |
|
217 | +}; |
|
218 | +``` |
|
205 | 219 | |
206 | 220 | Due to the special link local addresses of IPv6, an interface has to be specified using the `%<if>` or the `interface <if>;` syntax if a link local address is used (Which is recommended) |
207 | 221 | |
... | ... | @@ -413,3 +427,30 @@ protocol rpki rpki_dn42{ |
413 | 427 | expire keep 172800; |
414 | 428 | } |
415 | 429 | ``` |
430 | +### Use BFD in bird2 |
|
431 | +BFD is an additional protocol with extremely low overhead to detect failures in the switching plane between peers, |
|
432 | +it is used widely by cleanet peerings and some networks already have enabled it globally. |
|
433 | +To do a basic configuration you need to add 1 line to your bird.conf and enable it per peer or globally by defining it in the |
|
434 | +template. |
|
435 | +It is currently recommended that you only enable it for each peer that supports it and has it enabled. |
|
436 | +Add this above the template for dnpeers. |
|
437 | +```conf |
|
438 | +protocol bfd {}; |
|
439 | +``` |
|
440 | +And below is an example for a MP-BGP over IPV6 with ENH peering |
|
441 | +`/etc/bird/peers/<NEIGHBOR>.conf` |
|
442 | +Note bfd graceful; only activates when both sides have bfd configured and does not cause issues in peerings without BFD |
|
443 | +```conf |
|
444 | +protocol bgp <NEIGHBOR_NAME> from dnpeers { |
|
445 | + enable extended messages on; |
|
446 | + bfd graceful; |
|
447 | + neighbor <NEIGHBOR_IPv6>%<NEIGHBOR_INTERFACE> as <NEIGHBOR_ASN>; |
|
448 | + # Or: |
|
449 | + # neighbor <NEIGHBOR_IPv6> as <NEIGHBOR_ASN>; |
|
450 | + # interface <NEIGHBOR_INTERFACE>;**** |
|
451 | + ipv4 { |
|
452 | + extended next hop on; |
|
453 | + }; |
|
454 | +}; |
|
455 | +``` |
|
456 | +Additional documentation about the BFD protocol is available at [the BIRD2 documentation](https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.3) . |
|
... | ... | \ No newline at end of file |