Debugging down BFD sessions - unknown session id
Good morning, we have one server on which all bfd sessions are down, however the associated BGP protocols are actually up: bird> show bfd sessions bfd1: IP address Interface State Since Interval Timeout 2a0a:e5c0:10:1::122 eth0 Down 11:49:53.211 2.000 0.000 2a0a:e5c0:31:12::1 oserver120 Down 10:54:30.465 1.000 0.000 2a0a:e5c0:10:1::123 eth0 Down 11:59:53.890 2.000 0.000 bfd2: IP address Interface State Since Interval Timeout bird> bird> show protocols outgoing_server120 Name Proto Table State Since Info outgoing_server120 BGP --- up 10:54:35.058 Established bird> bird> show protocols ibgp_server122 Name Proto Table State Since Info ibgp_server122 BGP --- up 11:54:09.411 Established bird> show protocols ibgp_server123 Name Proto Table State Since Info ibgp_server123 BGP --- up 11:59:55.306 Established bird> The log of bird says: 2024-06-18 12:18:30.095 <RMT> bfd2: Bad packet from 2a0a:e5c0:10:1::123 - unknown session id (4057542731) 2024-06-18 12:18:30.288 <RMT> bfd2: Bad packet from 2a0a:e5c0:31:12::1 - unknown session id (1148668725) 2024-06-18 12:18:30.434 <RMT> bfd2: Bad packet from 2a0a:e5c0:10:1::122 - unknown session id (635122417) 2024-06-18 12:18:30.912 <RMT> bfd2: Bad packet from 2a0a:e5c0:10:1::123 - unknown session id (4057542731) 2024-06-18 12:18:31.058 <RMT> bfd2: Bad packet from 2a0a:e5c0:31:12::1 - unknown session id (1148668725) 2024-06-18 12:18:31.230 <RMT> bfd2: Bad packet from 2a0a:e5c0:10:1::122 - unknown session id (635122417) It seems like declaring 2 bfd sections is causing this issue: -------------------------------------------------------------------------------- protocol bfd { interface "o*" { interval 500 ms; idle tx interval 2 s; }; interface "i*" { interval 500 ms; idle tx interval 2 s; }; } protocol bfd { # openvpn interface "tun*" { interval 500 ms; idle tx interval 2 s; }; # transfer interface "eth0" { interval 500 ms; idle tx interval 2 s; }; } -------------------------------------------------------------------------------- Changing the bfd definition to: -------------------------------------------------------------------------------- protocol bfd { } -------------------------------------------------------------------------------- Changes the status to all sessions are up: -------------------------------------------------------------------------------- bird> show bfd sessions bfd1: IP address Interface State Since Interval Timeout 2a0a:e5c0:10:1::122 eth0 Up 12:22:52.027 0.100 0.500 2a0a:e5c0:31:12::1 oserver120 Up 12:22:52.445 0.100 0.500 2a0a:e5c0:10:1::123 eth0 Up 12:22:51.658 0.100 0.500 bird> -------------------------------------------------------------------------------- So I wonder ... is this a) a bug b) working as expected? If it is working as expected, should we add a note in the documentation saying multiple bfd instances might lead to this state / error? Best regards, Nico -- Sustainable and modern Infrastructures by ungleich.ch
Hello Nico, thanks for bringing this issue with multiple declaration of BFD protocols up. The problem happening is that BFD protocol in BIRD works by default on all interfaces and the listed interfaces only modify options for them specifically. So the sessions are not assigned to protocols based on the listed interfaces. Furthermore multiple declared BFD protocols use the same socket for communication. That means that in your case the bfd1 protocol took all the sessions and then it is fighting for packets with bfd2 on the same socket. Currently, having multiple BFD protocols is not supported in BIRD. You are, of course, right that this behavior should be described in the documentation and we will do so. PS: BFD config with the desired outcome should be the following: protocol bfd { interface "o*" { interval 500 ms; idle tx interval 2 s; }; interface "i*" { interval 500 ms; idle tx interval 2 s; }; # openvpn interface "tun*" { interval 500 ms; idle tx interval 2 s; }; # transfer interface "eth0" { interval 500 ms; idle tx interval 2 s; }; } Thank you for the report, David -- – David Petera (he/him) | BIRD Tech Support | CZ.NIC, z.s.p.o.
participants (2)
-
David Petera -
Nico Schottelius