RE: Bird bfd configuration
Hello, I am trying to configure BFD protocol. If configure 2 instances with below, it doesn't work. So I have to configure one instance, and put all the neighbors list to it. Is it possible to configure separate instance ? The below doesn't work protocol bfd Test1 { interface "eth2" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; } protocol bfd Test2 { interface "eth0" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; } Below it is working, protocol bfd Test { interface "eth*" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; } With best regards, Chris Thales is in the process of carving out its Transportation activity (GTS) from other Thales' activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
Anyone comment this issue ? From: Bird-users <bird-users-bounces@network.cz> On Behalf Of LIU Chris via Bird-users Sent: Tuesday, January 24, 2023 4:01 PM To: bird-users@network.cz Subject: RE: Bird bfd configuration Hello, I am trying to configure BFD protocol. If configure 2 instances with below, it doesn't work. So I have to configure one instance, and put all the neighbors list to it. Is it possible to configure separate instance ? The below doesn't work protocol bfd Test1 { interface "eth2" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; } protocol bfd Test2 { interface "eth0" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; } Below it is working, protocol bfd Test { interface "eth*" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; } With best regards, Chris Thales is in the process of carving out its Transportation activity (GTS) from other Thales' activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid. Thales is in the process of carving out its Transportation activity (GTS) from other Thales' activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
On 10.02.23 16:58, LIU Chris via Bird-users wrote:
Anyone comment this issue ?
Hey Chris, I can not say much on your case, just general "advise"/recommendations... first: I have not encountered a case where I needed to "tune" or explicit set BFD settings/parameter. Just enable BFD on the protocol, and on the BFD protocol the interfaces. (To start with. On high latency links of course there is a need, but on local? Keep it simple and use defaults till you encounter issues...) second: No need to set neighbor and local (as far as I'm aware of). Like with the other point; just set the interface on the bfd protocol. I don't know the specific implementations details, but source address selection and stuff are just set "correct" and bird "is clever enough" to sort out the rest. (which is btw a big prop to the core team that this "just works"(tm)!!) I.e. on protocol ospf, enable bdf and on the proto bfd set the same interfaces. You just get bfd awareness on ospf for each neighbor. No need to configure any neighbors. Maybe this somehow helps you... Bernd
Thanks Bernd, really good advice, I will try. -----Original Message----- From: Bernd Naumann <bernd@kr217.de> Sent: Friday, February 10, 2023 3:34 PM To: LIU Chris <chris-zq.liu@urbanandmainlines.com>; bird-users@network.cz Subject: Re: Bird bfd configuration [You don't often get email from bernd@kr217.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] On 10.02.23 16:58, LIU Chris via Bird-users wrote:
Anyone comment this issue ?
Hey Chris, I can not say much on your case, just general "advise"/recommendations... first: I have not encountered a case where I needed to "tune" or explicit set BFD settings/parameter. Just enable BFD on the protocol, and on the BFD protocol the interfaces. (To start with. On high latency links of course there is a need, but on local? Keep it simple and use defaults till you encounter issues...) second: No need to set neighbor and local (as far as I'm aware of). Like with the other point; just set the interface on the bfd protocol. I don't know the specific implementations details, but source address selection and stuff are just set "correct" and bird "is clever enough" to sort out the rest. (which is btw a big prop to the core team that this "just works"(tm)!!) I.e. on protocol ospf, enable bdf and on the proto bfd set the same interfaces. You just get bfd awareness on ospf for each neighbor. No need to configure any neighbors. Maybe this somehow helps you... Bernd Thales is in the process of carving out its Transportation activity (GTS) from other Thales’ activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
On Fri, Feb 10, 2023 at 03:58:04PM +0000, LIU Chris via Bird-users wrote:
Anyone comment this issue ?
From: Bird-users <bird-users-bounces@network.cz> On Behalf Of LIU Chris via Bird-users Sent: Tuesday, January 24, 2023 4:01 PM To: bird-users@network.cz Subject: RE: Bird bfd configuration
Hello,
I am trying to configure BFD protocol. If configure 2 instances with below, it doesn't work. So I have to configure one instance, and put all the neighbors list to it. Is it possible to configure separate instance ?
Hi Generally, multiple BFD instances are not that useful, as BFD sessions are assigned to the first one that is acceptable, and unless the BFD instance is limited to specific VRF, address family, direct/multihop mode, it accepts all sessions. Note that in contrast to other protocols, you do not need to specify interfaces, all interfaces are allowed by default. If you specify interfaces, it is just for changing per-iface values. So even if you specify just 'interface "eth2"', it will accept BFD sessions for all interfaces. Explicit neighbor statements allow you to define BFD session requests manually in addition to automatic session requests from OSPF, BGP and other protocols. But these are processed in the same way - put to the pool of BFD session requests and then assigned to a matching BFD instance.
The below doesn't work protocol bfd Test1 { interface "eth2" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; }
protocol bfd Test2 { interface "eth0" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; }
Below it is working, protocol bfd Test { interface "eth*" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; }
With best regards,
Chris
-- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Zajicek, Thanks for your reply, fairly enough, -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Saturday, February 11, 2023 10:58 AM To: LIU Chris <chris-zq.liu@urbanandmainlines.com> Cc: bird-users@network.cz Subject: Re: Bird bfd configuration On Fri, Feb 10, 2023 at 03:58:04PM +0000, LIU Chris via Bird-users wrote:
Anyone comment this issue ?
From: Bird-users <bird-users-bounces@network.cz> On Behalf Of LIU Chris via Bird-users Sent: Tuesday, January 24, 2023 4:01 PM To: bird-users@network.cz Subject: RE: Bird bfd configuration
Hello,
I am trying to configure BFD protocol. If configure 2 instances with below, it doesn't work. So I have to configure one instance, and put all the neighbors list to it. Is it possible to configure separate instance ?
Hi Generally, multiple BFD instances are not that useful, as BFD sessions are assigned to the first one that is acceptable, and unless the BFD instance is limited to specific VRF, address family, direct/multihop mode, it accepts all sessions. Note that in contrast to other protocols, you do not need to specify interfaces, all interfaces are allowed by default. If you specify interfaces, it is just for changing per-iface values. So even if you specify just 'interface "eth2"', it will accept BFD sessions for all interfaces. Explicit neighbor statements allow you to define BFD session requests manually in addition to automatic session requests from OSPF, BGP and other protocols. But these are processed in the same way - put to the pool of BFD session requests and then assigned to a matching BFD instance.
The below doesn't work protocol bfd Test1 { interface "eth2" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; }
protocol bfd Test2 { interface "eth0" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; }
Below it is working, protocol bfd Test { interface "eth*" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; }
With best regards,
Chris
-- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." Thales is in the process of carving out its Transportation activity (GTS) from other Thales’ activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
Hi Zajicek, Many thanks for your reply. No any problem to set just one BFD instance. In my case, I have multiple BGP instances, I set bfd on inside each BGP instance. If just one bfd instance, how do bird correlate with BGP instances ? And also, if want to set different min/max Rx interval value for each BGP session in BFD instance configuration, how to distinguish them ? Chris. -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Saturday, February 11, 2023 10:58 AM To: LIU Chris <chris-zq.liu@urbanandmainlines.com> Cc: bird-users@network.cz Subject: Re: Bird bfd configuration On Fri, Feb 10, 2023 at 03:58:04PM +0000, LIU Chris via Bird-users wrote:
Anyone comment this issue ?
From: Bird-users <bird-users-bounces@network.cz> On Behalf Of LIU Chris via Bird-users Sent: Tuesday, January 24, 2023 4:01 PM To: bird-users@network.cz Subject: RE: Bird bfd configuration
Hello,
I am trying to configure BFD protocol. If configure 2 instances with below, it doesn't work. So I have to configure one instance, and put all the neighbors list to it. Is it possible to configure separate instance ?
Hi Generally, multiple BFD instances are not that useful, as BFD sessions are assigned to the first one that is acceptable, and unless the BFD instance is limited to specific VRF, address family, direct/multihop mode, it accepts all sessions. Note that in contrast to other protocols, you do not need to specify interfaces, all interfaces are allowed by default. If you specify interfaces, it is just for changing per-iface values. So even if you specify just 'interface "eth2"', it will accept BFD sessions for all interfaces. Explicit neighbor statements allow you to define BFD session requests manually in addition to automatic session requests from OSPF, BGP and other protocols. But these are processed in the same way - put to the pool of BFD session requests and then assigned to a matching BFD instance.
The below doesn't work protocol bfd Test1 { interface "eth2" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; }
protocol bfd Test2 { interface "eth0" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; }
Below it is working, protocol bfd Test { interface "eth*" { min rx interval 1000000 us; min tx interval 1000000 us; idle tx interval 3000000 us; multiplier 3; }; neighbor X1.Y1.Z1.A1 local X1.Y1.Z1.B1; neighbor X2.Y2.Z2.A2 local X2.Y2.Z2.B2; }
With best regards,
Chris
-- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." Thales is in the process of carving out its Transportation activity (GTS) from other Thales’ activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
On Mon, Feb 13, 2023 at 02:56:56PM +0000, LIU Chris wrote:
Hi Zajicek,
Many thanks for your reply. No any problem to set just one BFD instance. In my case, I have multiple BGP instances, I set bfd on inside each BGP instance. If just one bfd instance, how do bird correlate with BGP instances ?
The BFD instance knows which BGP instance requested that peer, so it notified appropriate BGP instance if something happens with that peer.
And also, if want to set different min/max Rx interval value for each BGP session in BFD instance configuration, how to distinguish them ?
If they are on different ifaces (like in your example), you can have multiple interface statements in one BFD instance. But in general, you can specify BFD parameters also directly in BGP protocol as options of 'bfd' switch: https://bird.network.cz/?get_doc&v=20&f=bird-6.html#bgp-bfd protocol bfd { } protocol bgp { ... bfd { min rx interval 1000000 us; min tx interval 1000000 us; }; } -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Oh, wonderful, nice configuration. Will try -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Monday, February 13, 2023 10:45 AM To: LIU Chris <chris-zq.liu@urbanandmainlines.com> Cc: bird-users@network.cz Subject: Re: Bird bfd configuration On Mon, Feb 13, 2023 at 02:56:56PM +0000, LIU Chris wrote:
Hi Zajicek,
Many thanks for your reply. No any problem to set just one BFD instance. In my case, I have multiple BGP instances, I set bfd on inside each BGP instance. If just one bfd instance, how do bird correlate with BGP instances ?
The BFD instance knows which BGP instance requested that peer, so it notified appropriate BGP instance if something happens with that peer.
And also, if want to set different min/max Rx interval value for each BGP session in BFD instance configuration, how to distinguish them ?
If they are on different ifaces (like in your example), you can have multiple interface statements in one BFD instance. But in general, you can specify BFD parameters also directly in BGP protocol as options of 'bfd' switch: https://bird.network.cz/?get_doc&v=20&f=bird-6.html#bgp-bfd protocol bfd { } protocol bgp { ... bfd { min rx interval 1000000 us; min tx interval 1000000 us; }; } -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." Thales is in the process of carving out its Transportation activity (GTS) from other Thales’ activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
Classified as: {Hitachi Rail – Public} Hi Zajicek, It seems this nice configuration doesn’t work, have to set bfd instance Below configuration bfd doesn’t work protocol bgp BGP_INSTANCE_1 { local 10.64.0.2 as 65002; neighbor 10.64.0.50 as 65050; ipv4 { import filter export2Kernel; export filter export2BgpPeer; preference 200; }; hold time 3; bfd { min rx interval 1 s; min tx interval 1 s; idle tx interval 3000 ms; multiplier 3; }; } protocol bgp BGP_INSTANCE_2 { local 192.168.0.50 as 65002; neighbor 192.168.0.51 as 65001; ipv4 { import filter export2Kernel; export filter export2BgpPeer; preference 100; }; hold time 3; bfd { min rx interval 1 s; min tx interval 1 s; idle tx interval 3000 ms; multiplier 3; }; } protocol bfd { } below configuration works: protocol bgp BGP_PA_CTI_LTE { local 10.64.0.2 as 65002; neighbor 10.64.0.50 as 65050; ipv4 { import filter export2Kernel; export filter export2BgpPeer; preference 200; }; hold time 3; bfd on; } protocol bgp BGP_PA_CTI_FM { local 192.168.0.50 as 65002; neighbor 192.168.0.51 as 65001; ipv4 { import filter export2Kernel; export filter export2BgpPeer; preference 100; }; hold time 3; bfd on; } protocol bfd { interface "*" { min rx interval 1 s; min tx interval 1 s; idle tx interval 3000 ms; multiplier 3; }; neighbor 10.64.0.50 local 10.64.0.2; neighbor 192.168.0.51 local 192.168.0.50; } With Best Regards, Chris LIU {Hitachi Rail – Public} -----Original Message----- From: Bird-users <bird-users-bounces@network.cz> On Behalf Of LIU Chris via Bird-users Sent: Monday, February 13, 2023 10:50 AM To: Ondrej Zajicek <santiago@crfreenet.org> Cc: bird-users@network.cz Subject: RE: Bird bfd configuration Oh, wonderful, nice configuration. Will try -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Monday, February 13, 2023 10:45 AM To: LIU Chris <chris-zq.liu@urbanandmainlines.com> Cc: bird-users@network.cz Subject: Re: Bird bfd configuration On Mon, Feb 13, 2023 at 02:56:56PM +0000, LIU Chris wrote:
Hi Zajicek,
Many thanks for your reply. No any problem to set just one BFD instance. In my case, I have multiple BGP instances, I set bfd on inside each BGP instance. If just one bfd instance, how do bird correlate with BGP instances ?
The BFD instance knows which BGP instance requested that peer, so it notified appropriate BGP instance if something happens with that peer.
And also, if want to set different min/max Rx interval value for each BGP session in BFD instance configuration, how to distinguish them ?
If they are on different ifaces (like in your example), you can have multiple interface statements in one BFD instance. But in general, you can specify BFD parameters also directly in BGP protocol as options of 'bfd' switch: https://bird.network.cz/?get_doc&v=20&f=bird-6.html#bgp-bfd protocol bfd { } protocol bgp { ... bfd { min rx interval 1000000 us; min tx interval 1000000 us; }; } -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." Thales is in the process of carving out its Transportation activity (GTS) from other Thales’ activities. In order to prepare this internal restructuring, a new e-mail address has been adopted and your GTS contacts now use urbanandmainlines.com. Please note that their Thales e-mail address remains also valid.
Classified as: {Hitachi Rail – Public}
From bird docs: You can use the command-line client birdc to talk with a running BIRD. You do not necessarily need to use birdc to talk to BIRD, your own applications could do that, too.
Now I want to write application, which could get inform/posted when bgp/bfd failover, Is there hook or event? With Best Regards, Chris LIU {Hitachi Rail – Public}
Hello! On Fri, Jun 14, 2024 at 05:50:41PM +0000, LIU Chris via Bird-users wrote:
Now I want to write application, which could get inform/posted when bgp/bfd failover, Is there hook or event?
No. Mechanisms like this are currently in a design and prototyping phase. Also, we are very much first aiming to implement a working API for route dumps as this is the most critical thing requested from us by most of the customers of BIRD Support. It's not easy to implement these hooks properly without impeding performance on hot paths. It also takes a lot of time and effort to design it all maintainable for the next, let's say, another 25 years. We're very thankful for every company willing to get BIRD Support. These companies are moving the development forward while also getting direct line for resolving their technical problems discreetly and with priority. The most convenient way for now is to set `debug { states };` in the bfd and bgp and then just parse logs by some ugly regexes. Hoping that this helps. Maria -- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
participants (4)
-
Bernd Naumann -
LIU Chris -
Maria Matejka -
Ondrej Zajicek