BFD session between BIRD and Extreme Networks switch can't be established.
So, src port for outgoing BFD-packet from BIRD is 39156, when RFC5881 contains:
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
4. Encapsulation
BFD Control packets MUST be transmitted in UDP packets with
destination port 3784, within an IPv4 or IPv6 packet. The source
port MUST be in the range 49152 through 65535.
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ok, fixing (only for test purposes):
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
root@debian-1:~# sysctl net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768 61000
root@debian-1:~# sysctl -w net.ipv4.ip_local_port_range="49152 65535"
net.ipv4.ip_local_port_range = 49152 65535
root@debian-1:~# sysctl net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 49152 65535
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
After this BFD session was estabilished.
Of course, net.ipv4.ip_local_port_range tuning seems to be not usable in production environment, and need to be fixed in BIRD, I think. Just because some network hardware vendors interprets RFC's exactly as written ;)
But now - second thing: 'protocol bfd' block in bird.conf useless. Here part of config:
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
protocol bfd FOR_OSPF {
interface <BIRD_BOX_IP>/32 {
interval 50 ms;
min rx interval 50 ms; # presence of this string by the docs does not matter
min tx interval 50 ms; # presence of this string by the docs does not matter
multiplier 3;
};
neighbor <EXTREME_SW_IP> dev "<BIRD_BOX_IP>" local <BIRD_BOX_IP>; # presence of this string by the docs does not matter
};
protocol ospf OSPF1 {
...
area 0.0.0.0 {
interface <BIRD_BOX_IP>/32 {
...
bfd;
};
};
...
};
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
And what I see with tcpdump:
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
13:09:05.433336 <BIRD_BOX_MAC> > <EXTREME_SW_MAC>, ethertype 802.1Q (0x8100), length 70: vlan <vlan>, p 0, ethertype IPv4, (tos 0xc0, ttl 255, id 6662, offset 0, flags [none], proto UDP (17), length 52)
<BIRD_BOX_IP>.62698 > <EXTREME_SW_IP>.3784: BFDv1, length: 24
Control, State Up, Flags: [none], Diagnostic: No Diagnostic (0x00)
Detection Timer Multiplier: 5 (500 ms Detection time), BFD Length: 24
My Discriminator: 0x35e75227, Your Discriminator: 0x00000007
Desired min Tx Interval: 100 ms
Required min Rx Interval: 10 ms
Required min Echo Interval: 0 ms
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
There is no any configured intervals and multiplier. Just default values. I think this is not correct.
Maybe I misconfigure BIRD? Please advise.
Thanks for attention.