[BFD] BFD is Not working after system reboot.
Hello. BFD is Not working normally. My configuration is shown below. OS: Ubuntu 18.04 Kernel: 4.15.0-54-generic BIRD ver: 1.6.8 ================================== protocol bfd { multihop { min rx interval 300 ms; min tx interval 300 ms; multiplier 3; }; } protocol bgp as1 { import all; export all; local ~ as ~; neighbor ~ as ~; enable route refresh off; hold time 90; bfd on; } protocol bgp as2 { import all; export all; local ~ as ~; neighbor ~ as ~; enable route refresh off; hold time 90; bfd on; } ================================== After system reboot(# shutdown -r now), BGP neighbor is established, But BFD sessions are stuck in 'INIT' status. And BIRD does not send BFD packets. BFD sessions have recovered after restart protocol bfd1(# birdc restart bfd1). Is it a normal situation? I think BFD has to start the mechanism after BGP neighbor is UP. Is there any missing part of my configurations? Please check it. Regards
Hi Seunghwan, It might be your problem isn't BIRD but packet filter related. Please check the BFD packets are allowed in iptables c.q. netfilter using the correct ports and/or addresses. A possible reason why it starts working after a manual protocol restart is a ESTABLISHED, RELATED rule. References: * https://tools.ietf.org/html/rfc5881 (Encapsulation, IANA Considerations) * https://tools.ietf.org/html/rfc5883 (IANA Considerations) K. On 16-07-2020 11:00, seunghwan hwang wrote:
Hello. BFD is Not working normally. My configuration is shown below.
OS: Ubuntu 18.04 Kernel: 4.15.0-54-generic BIRD ver: 1.6.8 ================================== protocol bfd { multihop { min rx interval 300 ms; min tx interval 300 ms; multiplier 3; }; }
protocol bgp as1 { import all; export all;
local ~ as ~; neighbor ~ as ~; enable route refresh off; hold time 90; bfd on; }
protocol bgp as2 { import all; export all;
local ~ as ~; neighbor ~ as ~; enable route refresh off; hold time 90; bfd on; } ==================================
After system reboot(# shutdown -r now), BGP neighbor is established, But BFD sessions are stuck in 'INIT' status. And BIRD does not send BFD packets. BFD sessions have recovered after restart protocol bfd1(# birdc restart bfd1).
Is it a normal situation? I think BFD has to start the mechanism after BGP neighbor is UP. Is there any missing part of my configurations? Please check it.
Regards
Hello K. Thanks for checking in this issue. But, I can't understand. If it was because of the iptables, it would have been a problem for BGP as well. And I'm not using iptables rules, So Any packets weren't dropped. * iptables status ============================================================ # iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ============================================================ * Port status ============================================================ # netstat -lnp | grep bird tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN 44890/bird udp 0 0 0.0.0.0:3784 0.0.0.0:* 44890/bird udp 0 0 0.0.0.0:4784 0.0.0.0:* 44890/bird unix 2 [ ACC ] STREAM LISTENING 320049 44890/bird /run/bird/bird.ctl unix 2 [ ACC ] STREAM LISTENING 398938 44893/bird6 /run/bird/bird6.ctl ============================================================ * BIRD Status ============================================================ # birdc show bfd sessions BIRD 1.6.8 ready. bfd1: IP address Interface State Since Interval Timeout 10.11.251.4 --- Init 09:37:57 2.000 6.000 10.11.250.4 --- Init 09:37:56 2.000 6.000 # birdc show protocols BIRD 1.6.8 ready. name proto table state since info kernel1 Kernel master up 09:37:52 direct1 Direct master up 09:37:52 device1 Device master up 09:37:52 static1 Static master up 09:37:52 bfd1 BFD master up 09:37:52 as1 BGP master up 09:37:56 Established as2 BGP master up 09:37:57 Established ============================================================ Is it related to the increase in this value? ============================================================ # netstat -s ... Udp: 52759 packets received 0 packets to unknown port received 0 packet receive errors 34365164 packets sent 0 receive buffer errors 0 send buffer errors IgnoredMulti: 3399 ... ============================================================ Please check it. Regards. 2020년 7월 16일 (목) 오후 8:05, Kees Meijs | Nefos <kees@nefos.nl>님이 작성:
Hi Seunghwan,
It might be your problem isn't BIRD but packet filter related.
Please check the BFD packets are allowed in iptables c.q. netfilter using the correct ports and/or addresses.
A possible reason why it starts working after a manual protocol restart is a ESTABLISHED, RELATED rule.
References:
- https://tools.ietf.org/html/rfc5881 (Encapsulation, IANA Considerations) - https://tools.ietf.org/html/rfc5883 (IANA Considerations)
K.
On 16-07-2020 11:00, seunghwan hwang wrote:
Hello. BFD is Not working normally. My configuration is shown below.
OS: Ubuntu 18.04 Kernel: 4.15.0-54-generic BIRD ver: 1.6.8 ================================== protocol bfd { multihop { min rx interval 300 ms; min tx interval 300 ms; multiplier 3; }; }
protocol bgp as1 { import all; export all;
local ~ as ~; neighbor ~ as ~; enable route refresh off; hold time 90; bfd on; }
protocol bgp as2 { import all; export all;
local ~ as ~; neighbor ~ as ~; enable route refresh off; hold time 90; bfd on; } ==================================
After system reboot(# shutdown -r now), BGP neighbor is established, But BFD sessions are stuck in 'INIT' status. And BIRD does not send BFD packets. BFD sessions have recovered after restart protocol bfd1(# birdc restart bfd1).
Is it a normal situation? I think BFD has to start the mechanism after BGP neighbor is UP. Is there any missing part of my configurations? Please check it.
Regards
Hi Seunghwan, If you're sure no packets were dropped, it might make sense to use tcpdump(8) or alike to ensure the BFD packets are really there. Regards, Kees On 17-07-2020 04:16, seunghwan hwang wrote:
Thanks for checking in this issue. But, I can't understand. If it was because of the iptables, it would have been a problem for BGP as well. And I'm not using iptables rules, So Any packets weren't dropped.
Hi K. I've already tried capturing tcpdump. BIRD's BFD neighbor was captured sending packets, but the packets sent by BIRD were not captured. In this state, BIRD's BFD packets were captured after restarting BFD protocol. The BFD packet was captured Only after restarting the BFD protocol . Is there an issue with BFD Protocol? Please Check it. Regards 2020년 7월 17일 (금) 오후 10:57, Kees Meijs | Nefos <kees@nefos.nl>님이 작성:
Hi Seunghwan,
If you're sure no packets were dropped, it might make sense to use tcpdump(8) or alike to ensure the BFD packets are really there.
Regards, Kees
On 17-07-2020 04:16, seunghwan hwang wrote:
Thanks for checking in this issue. But, I can't understand. If it was because of the iptables, it would have been a problem for BGP as well. And I'm not using iptables rules, So Any packets weren't dropped.
On Thu, Jul 16, 2020 at 06:00:07PM +0900, seunghwan hwang wrote:
Hello. BFD is Not working normally. My configuration is shown below. ... After system reboot(# shutdown -r now), BGP neighbor is established, But BFD sessions are stuck in 'INIT' status. And BIRD does not send BFD packets. BFD sessions have recovered after restart protocol bfd1(# birdc restart bfd1).
Hello Do you have any error message in log?
Is it a normal situation? I think BFD has to start the mechanism after BGP neighbor is UP. Is there any missing part of my configurations?
Your config seems ok. -- 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."
Sorry, I was unable to respond yet. In our config I explicitely defined what interfaces should use bfd, for example:
protocol bfd { interface "eth0" { };
interface "eth1" { };
interface "eth4" { authentication keyed sha1; password "BLADIEBLA"; };
multihop { interval 300 ms; multiplier 3; }; }
K. On 24-07-2020 13:55, Ondrej Zajicek wrote:
Is it a normal situation? I think BFD has to start the mechanism after BGP neighbor is UP. Is there any missing part of my configurations? Your config seems ok.
Hello K. Is not working. Have you ever rebooted(# shutdown -r now) with your settings? Still, only the BGP is established and the BFD state remains in Init. Regards. 2020년 7월 24일 (금) 오후 9:09, Kees Meijs | Nefos <kees@nefos.nl>님이 작성:
Sorry, I was unable to respond yet.
In our config I explicitely defined what interfaces should use bfd, for example:
protocol bfd { interface "eth0" { };
interface "eth1" { };
interface "eth4" { authentication keyed sha1; password "BLADIEBLA"; };
multihop { interval 300 ms; multiplier 3; }; }
K.
On 24-07-2020 13:55, Ondrej Zajicek wrote:
Is it a normal situation? I think BFD has to start the mechanism after BGP neighbor is UP. Is there any missing part of my configurations?
Your config seems ok.
Hi, Yes we have; multiple times. Could you please provide a full configuration? (Feel free to remove passwords and such, obviously.) Cheers, Kees On 29-07-2020 09:45, seunghwan hwang wrote:
Is not working. Have you ever rebooted(# shutdown -r now) with your settings? Still, only the BGP is established and the BFD state remains in Init.
Hello K. Sorry, I'm late. Here is my full configuration =================================================================== log "/var/log/bird/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; debug protocols all; # Loopback IP router id [bird-server lo ip]; protocol kernel { persist; # Don't remove routes on bird shutdown scan time 20; # Scan kernel routing table every 20 seconds import none; # Default is import all export all; # Default is export none merge paths on; # Enable ECMP Multi path. } protocol direct { interface "lo"; } protocol device { scan time 10; # Scan interfaces every 10 seconds } protocol bfd { multihop { min rx interval 300 ms; min tx interval 300 ms; multiplier 3; }; } protocol static { route [swich A router-id] via [interface IP to switch A]; route [swich B router-id] via [interface IP to switch B] ; } # BGP Configuration protocol bgp as1 { import all; export all; # local Loopback IP # neighbor (tchy loopback ip) local [bird-server lo ip] as 65001; neighbor [swich A router-id] as 65001; hold time 30; enable route refresh off; bfd on; } protocol bgp as2 { import all; export all; local [bird-server lo ip] as 65001; neighbor [swich B router-id] as 65001; hold time 30; enable route refresh off; bfd on; } =================================================================== Please check it. Regards. 2020년 7월 29일 (수) 오후 4:46, Kees Meijs | Nefos <kees@nefos.nl>님이 작성:
Hi,
Yes we have; multiple times.
Could you please provide a full configuration? (Feel free to remove passwords and such, obviously.)
Cheers, Kees
On 29-07-2020 09:45, seunghwan hwang wrote:
Is not working. Have you ever rebooted(# shutdown -r now) with your settings? Still, only the BGP is established and the BFD state remains in Init.
Hi Seunghwan, Sorry for my late response (had two weeks of holiday). Your BFD protocol block doesn't mention any interfaces. The documentation states (see https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.2) that shouldn't be needed however:
Note that contrary to the behavior of interface definitions of other protocols, BFD protocol would accept sessions (in default configuration) even on interfaces not covered by such definitions.
That would suggest your configuration is valid (as far as I can tell) so you're either hitting a bug or I misinterpreted the documentation. What you might do is adding the interfaces carrying the BGP packets anyway. Feels a little like a workaround, but it might help you. Adding could be as simple as:
protocol bfd { interface "eth0" { }; }
(In this example your multihop configuration should be added again, obviously.) Regards, Kees On 03-08-2020 03:56, seunghwan hwang wrote:
Hello K.
Sorry, I'm late. Here is my full configuration
===================================================================
log "/var/log/bird/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; debug protocols all;
# Loopback IP router id [bird-server lo ip];
protocol kernel { persist; # Don't remove routes on bird shutdown scan time 20; # Scan kernel routing table every 20 seconds import none; # Default is import all export all; # Default is export none merge paths on; # Enable ECMP Multi path. }
protocol direct { interface "lo"; }
protocol device { scan time 10; # Scan interfaces every 10 seconds }
protocol bfd { multihop { min rx interval 300 ms; min tx interval 300 ms; multiplier 3; }; }
protocol static {
route [swich A router-id] via [interface IP to switch A]; route [swich B router-id] via [interface IP to switch B] ; }
# BGP Configuration protocol bgp as1 { import all; export all;
# local Loopback IP # neighbor (tchy loopback ip) local [bird-server lo ip] as 65001; neighbor [swich A router-id] as 65001; hold time 30; enable route refresh off; bfd on; }
protocol bgp as2 { import all; export all;
local [bird-server lo ip] as 65001; neighbor [swich B router-id] as 65001; hold time 30; enable route refresh off; bfd on; }
===================================================================
Please check it.
Regards.
2020년 7월 29일 (수) 오후 4:46, Kees Meijs | Nefos <kees@nefos.nl <mailto:kees@nefos.nl>>님이 작성:
Hi,
Yes we have; multiple times.
Could you please provide a full configuration? (Feel free to remove passwords and such, obviously.)
Cheers, Kees
On 29-07-2020 09:45, seunghwan hwang wrote: > Is not working. > Have you ever rebooted(# shutdown -r now) with your settings? > Still, only the BGP is established and the BFD state remains in Init. >
participants (3)
-
Kees Meijs | Nefos -
Ondrej Zajicek -
seunghwan hwang