OSPF stuck in 2-way state

Ondrej Zajicek santiago at crfreenet.org
Thu Oct 3 18:36:05 CEST 2019


On Thu, Oct 03, 2019 at 03:28:45PM +0000, Kenth Eriksson wrote:
> On Thu, 2019-10-03 at 16:46 +0200, Ondrej Zajicek wrote:
> > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> > 
> > 
> > On Thu, Oct 03, 2019 at 01:49:23PM +0000, Kenth Eriksson wrote:
> > > 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;
> > 
> > Hi
> > 
> > I do not get why do you think that it is added with the address of zero.
> > There is a line above specifying local address is used:
> > 
> >   me.ip = ifa->addr->ip;
> > 
> me.dr is 0 because ifa->drip is 0, but should it have declared itself
> as an eligible DR? 

Oh, you meant DR IP, not neghbor IP. I think that it is correct - the
process should start with the node idea of DR IP, which is initially
zero (RFC 2328 9.4. the first paragraph).

It should also be fixed by the second election:

  /* 9.4. (4) */
  if (((ifa->drid == myid) && (ndr != &me))
      || ((ifa->drid != myid) && (ndr == &me))
      || ((ifa->bdrid == myid) && (nbdr != &me))
      || ((ifa->bdrid != myid) && (nbdr == &me)))
  {
    me.dr = ndr ? neigh_get_id(p, ndr) : 0;
    me.bdr = nbdr ? neigh_get_id(p, nbdr) : 0;

    nbdr = elect_bdr(p, ifa->neigh_list);
    ndr = elect_dr(p, ifa->neigh_list);

    if (ndr == NULL)
      ndr = nbdr;
  }


-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at 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."


More information about the Bird-users mailing list