[quagga-dev 5018] Problem with OSPF on some startups.

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Fri Aug 3 15:27:28 BST 2007


I have encountered a problem with OSPF in 0.99.6, where once in a while
when I start OSPF, it doesn't start correctly.  The result is that it
correctly advertises routes to its neighbours, but doesn't show any
routes itself.  All the routes for the network are shown in the ospf
database, but the ospf router table doesn't show the neighbour routers,
only the router itself.

R1 is 192.168.1.1 (ID 1.1.1.1) connected to R2 which is 192.168.1.2
(ID 2.2.2.2) through eth1 on both routers.  Each router has 500 static
routes set through eth2 in this test case.

State when not working:

R2> show ip ospf route
============ OSPF network routing table ============
N    192.168.22.0/24       [10] area: 0.0.0.0
                           directly attached to eth2

============ OSPF router routing table =============

============ OSPF external routing table ===========


R1> show ip ospf route
============ OSPF network routing table ============
N    192.168.1.0/24        [10] area: 0.0.0.0
                           directly attached to eth1
N    192.168.2.0/24        [10] area: 0.0.0.0
                           directly attached to eth2
N    192.168.22.0/24       [20] area: 0.0.0.0
                           via 192.168.1.2, eth1

============ OSPF router routing table =============
R    2.2.2.2               [10] area: 0.0.0.0, ASBR
                           via 192.168.1.2, eth1

============ OSPF external routing table ===========
N E2 22.1.1.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.2.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.3.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.4.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.5.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.6.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.7.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.8.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.9.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
etc...



I then restart OSPF on both routers (since doing just the broken one
doesn't seem to work).

R2> show ip ospf route
============ OSPF network routing table ============
N    192.168.1.0/24        [10] area: 0.0.0.0
                           directly attached to eth1
N    192.168.2.0/24        [20] area: 0.0.0.0
                           via 192.168.1.1, eth1
N    192.168.22.0/24       [10] area: 0.0.0.0
                           directly attached to eth2

============ OSPF router routing table =============
R    1.1.1.1               [10] area: 0.0.0.0, ASBR
                           via 192.168.1.1, eth1

============ OSPF external routing table ===========
N E2 11.1.1.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.2.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.3.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.4.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.5.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.6.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.7.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.8.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
N E2 11.1.9.0/24           [20/20] tag: 0
                           via 192.168.1.1, eth1
etc...


R1> show ip ospf route
============ OSPF network routing table ============
N    192.168.1.0/24        [10] area: 0.0.0.0
                           directly attached to eth1
N    192.168.2.0/24        [10] area: 0.0.0.0
                           directly attached to eth2
N    192.168.22.0/24       [20] area: 0.0.0.0
                           via 192.168.1.2, eth1

============ OSPF router routing table =============
R    2.2.2.2               [10] area: 0.0.0.0, ASBR
                           via 192.168.1.2, eth1

============ OSPF external routing table ===========
N E2 22.1.1.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.2.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.3.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.4.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.5.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.6.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.7.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.8.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.9.0/24           [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.10.0/24          [20/20] tag: 0
                           via 192.168.1.2, eth1
N E2 22.1.11.0/24          [20/20] tag: 0
                           via 192.168.1.2, eth1
etc...

So in this case, everything is working fine.

It seems the problem occours for this particular setup, maybe 1% to 5%
of the time.  I get the impression that the more routes there are the
advertise, the more likely the problem is to occour, but I am not sure
about that at this time.

The DR and BDR states look good on both routers, and they agree on that.

Any suggestions for where to look to debug this and what debug options
would be good to try to capture the cause of the problem?

I have also seen in some cases when it is broken, the database on both
routers shows every route twice, once listed by the router id
(1.1.1.1/2.2.2.2) and once by the highest IP on each router
(192.168.4.1/192.168.4.2).  This doesn't happen everytime though.  When
it works though, it only lists routes by router id in the ospf database
though.

--
Len Sorensen



More information about the Quagga-dev mailing list