OSPF stuck in 2-way state
Kenth Eriksson
Kenth.Eriksson at infinera.com
Thu Oct 3 15:49:23 CEST 2019
Hi!
We are having a problem were sometimes bird ospf neighbor state machine
becomes stuck in a 2-way state. This happens when two broadcast
interfaces are connected, one of them is running quagga and the other
end is running bird. The quagga router has prio 0 and bird prio 5, i.e.
quagga is not eligible to become DR.
Why does not bird transition from 2-way to ExStart?
I believe the following lines causes me.dr to become 0.0.0.0. Bird adds
itself as an eligible router as described in section 10.4, but with the
address of zero?
me.dr = ospf_is_v2(p) ? ipa_to_u32(ifa->drip) : ifa->drid;
me.bdr = ospf_is_v2(p) ? ipa_to_u32(ifa->bdrip) : ifa->bdrid;
me.iface_id = ifa->iface_id;
add_tail(&ifa->neigh_list, NODE & me);
nbdr = elect_bdr(p, ifa->neigh_list);
ndr = elect_dr(p, ifa->neigh_list);
Due to the above, I believe later in "can_do_adj" the following will
not become true;
case OSPF_IS_DROTHER:
if (((n->rid == ifa->drid) || (n->rid == ifa->bdrid))
&& (n->state >= NEIGHBOR_2WAY))
i = 1;
The quagga router says that bird is the DR, see tcpdump below and bird
logs below;
bird> show ospf interface
ospfv2_1:
Interface eth1 (10.210.138.68/30)
Type: broadcast
Area: 2.2.2.2 (33686018)
State: DROther
Priority: 5
Cost: 10
Hello timer: 10
Wait timer: 40
Dead timer: 40
Retransmit timer: 5
Designated router (ID): 0.0.0.0
Designated router (IP): 0.0.0.0
Backup designated router (ID): 0.0.0.0
Backup designated router (IP): 0.0.0.0
bird> show ospf neighbors
ospfv2_1:
Router ID Pri State DTime Interface Router IP
10.210.138.70 0 2-Way/Other 35.744 eth1 10.210.138.7
0
A tcpdump showing the OSPF hellos between the two routers.
10.210.138.69 is running bird and 10.210.138.70 is running quagga.
# tcpdump -r ospf_bird.pcap -Z root -v
reading from file ospf_bird.pcap, link-type EN10MB (Ethernet)
09:16:31.311431 IP (tos 0xc0, ttl 1, id 44687, offset 0, flags [none],
proto OSPF (89), length 52) 10.210.138.70 > 10.210.138.69: OSPFv2,
Database Description, length: 32
Router-ID: 10.210.138.70, Area 2.2.2.2, Authentication Type:
none (0)
Options: [External], DD Flags: [Init, More, Master]
09:16:34.705820 IP (tos 0xc0, ttl 1, id 55304, offset 0, flags [none],
proto OSPF (89), length 68) 10.210.138.69 > 224.0.0.5: OSPFv2, Hello,
length: 48
Router-ID: 10.210.138.69, Area 2.2.2.2, Authentication Type:
none (0)
Options: [External]
Hello Timer: 10s, Dead Timer 40s, Mask: 255.255.255.252,
Priority: 5
Neighbor List:
10.210.138.70
09:16:36.292044 IP (tos 0xc0, ttl 1, id 44688, offset 0, flags [none],
proto OSPF (89), length 68) 10.210.138.70 > 224.0.0.5: OSPFv2, Hello,
length: 48
Router-ID: 10.210.138.70, Area 2.2.2.2, Authentication Type:
none (0)
Options: [External]
Hello Timer: 10s, Dead Timer 40s, Mask: 255.255.255.252,
Priority: 0
Designated Router 10.210.138.69, Backup Designated Router
10.210.138.69
Neighbor List:
10.210.138.69
09:16:36.311317 IP (tos 0xc0, ttl 1, id 44689, offset 0, flags [none],
proto OSPF (89), length 52) 10.210.138.70 > 10.210.138.69: OSPFv2,
Database Description, length: 32
Router-ID: 10.210.138.70, Area 2.2.2.2, Authentication Type:
none (0)
Options: [External], DD Flags: [Init, More, Master]
#
More information about the Bird-users
mailing list