[quagga-dev 4119] Inconsistent "inactive" route in OSPF

Erik Tromp erik_tromp at hotmail.com
Fri May 5 16:14:21 BST 2006


Hello,

I am testing interworking of OSPF with other routing protocols.

I found a strange problem that seems to me a bug in OSPF. Short summary: if i add a route to a certain network via a specific host, then add a route to that specific host, all works fine.

But if I add a route to a specific host, then a route to that same network via that host, the route to the network is marked "inactive".

I believe this behaviour is also causing the problem described by Boris Cock  subject "[quagga-users 6060] zebra/ospf6d route redistribution problem", for which I have seen no response yet (see http://marc.theaimsgroup.com/?l=quagga-users&m=113335908014146&w=2)

I copied the logs of the two routers I worked on into this e-mail. For easy reading I suggest you open two windows (one for each log) and place them side by side.

Have fun reading,

Erik Tromp



Log for router 'OspfNode'
=============================


Here are the conf files:

  root at OspfNode:~# cat /etc/quagga/zebra.conf
  hostname OspfNode
  password zebra
  interface eth0
    ip address 192.168.148.23/24
  interface eth2
    ip address 192.168.11.1/24
  log file /var/log/quagga/zebra.log

  root at OspfNode:~# cat /etc/quagga/ospfd.conf
  password zebra
  router ospf
    network 192.168.148.0/24 area 0
  redistribute connected
  log file /var/log/quagga/ospf.log


Step 1.)
We begin with no Quagga daemons running. The only routes are those
to the directly connected networks.

  root at OspfNode:~# ip route
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.23
  192.168.11.0/24 dev eth2  proto kernel  scope link  src 192.168.11.1


Step 2.)
Next, start Quagga. We're running zebra and ospf.

  root at OspfNode:~# /etc/init.d/quagga start
  Loading capability module if not yet done.
  Starting Quagga daemons (prio:10): zebra ospfd.


Step 3.)
After a while, the remote routes are visible.

  root at OspfNode:~# ip route
  10.0.3.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.23
  192.168.11.0/24 dev eth2  proto kernel  scope link  src 192.168.11.1
  10.0.42.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize


Step 4.)
Let's see what Zebra thinks of it.

  root at OspfNode:~# telnet localhost 2601
  Trying 127.0.0.1...
  Connected to localhost.localdomain.
  Escape character is '^]'.

  Hello, this is Quagga (version 0.98.3).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.


  User Access Verification

  Password:
  OspfNode> show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route

  O>* 10.0.3.0/24 [110/20] via 192.168.148.22, eth0, 00:00:45
  O>* 10.0.42.0/24 [110/20] via 192.168.148.22, eth0, 00:00:45
  C>* 127.0.0.0/8 is directly connected, lo
  C>* 192.168.11.0/24 is directly connected, eth2
  O   192.168.148.0/24 [110/10] is directly connected, eth0, 00:02:36
  C>* 192.168.148.0/24 is directly connected, eth0

  OspfNode> quit
  Connection closed by foreign host.

That is OK.


Step 5.)
On the peer router we add a static route to the network 10.0.43.0/24. The result
is as follows:

  root at OspfNode:~# ip route
  10.0.3.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.23
  192.168.11.0/24 dev eth2  proto kernel  scope link  src 192.168.11.1
  10.0.43.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  10.0.42.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize


Step 6.)
On the peer router we add a static route to the host 10.0.3.3. This is the
result:

  root at OspfNode:~# ip route
  10.0.3.3 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  10.0.3.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.23
  192.168.11.0/24 dev eth2  proto kernel  scope link  src 192.168.11.1
  10.0.43.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  10.0.42.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize

As we see, all works fine.


Step 7.)
Now start all over again. Stop the Quagga daemons.

  root at OspfNode:~# /etc/init.d/quagga stop
  Stopping Quagga daemons (prio:0): ospfd zebra (bgpd) (ripd) (ripngd) (ospf6d).
  Removing all routes made by zebra.
  Nothing to flush.


Step 8.)
Start the Quagga daemons.

  root at OspfNode:~# /etc/init.d/quagga start
  Loading capability module if not yet done.
  Starting Quagga daemons (prio:10): zebra ospfd.


Step 9.)
After a while, the remote routes are visible again.

  root at OspfNode:~# ip route
  10.0.3.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.23
  192.168.11.0/24 dev eth2  proto kernel  scope link  src 192.168.11.1
  10.0.42.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize

Step 12.)

After adding the kernel route to host 10.0.3.3 and then the static route
to network 10.0.43.0/24 on the peer router, let's look at the result.

  root at OspfNode:~# ip route
  10.0.3.3 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  10.0.3.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.23
  192.168.11.0/24 dev eth2  proto kernel  scope link  src 192.168.11.1
  10.0.42.0/24 via 192.168.148.22 dev eth0  proto zebra  metric 20 equalize

Result:
The network route to 10.0.43.0/24 is not redistributed!!



Log for router 'OspfOlsrNode'
=============================


Here are the conf files:

  root at OspfOlsrNode:/etc/rc2.d# cat /etc/quagga/zebra.conf
  hostname OspfOlsrNode
  password zebra
  interface eth0
    ip address 192.168.148.22/24
  interface eth1
    ip address 10.0.3.2/24
  interface eth2
    ip address 10.0.42.1/24
  log file /var/log/quagga/zebra.log

  root at OspfOlsrNode:/etc/rc2.d# cat /etc/quagga/ospfd.conf
  password zebra
  router ospf
    network 192.168.148.0/24 area 0
  redistribute connected
  redistribute kernel
  redistribute static
  log file /var/log/quagga/ospf.log


Step 1.)
We begin with no Quagga daemons running. The only routes are those
to the directly connected networks.

  root at OspfOlsrNode:/etc/rc2.d# ip route
  10.0.3.0/24 dev eth1  proto kernel  scope link  src 10.0.3.2
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.22
  10.0.42.0/24 dev eth2  proto kernel  scope link  src 10.0.42.1


Step 2.)
Next, start Quagga. We're running zebra and ospf.

  root at OspfOlsrNode:/etc/rc2.d# /etc/init.d/quagga start
  Loading capability module if not yet done.
  Starting Quagga daemons (prio:10): zebra ospfd.


Step 3.)
After a while, the remote routes are visible.

  root at OspfOlsrNode:/etc/rc2.d# ip route
  10.0.3.0/24 dev eth1  proto kernel  scope link  src 10.0.3.2
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.22
  192.168.11.0/24 via 192.168.148.23 dev eth0  proto zebra  metric 20 equalize
  10.0.42.0/24 dev eth2  proto kernel  scope link  src 10.0.42.1


Step 4.)
Let's see what Zebra thinks of it.

  root at OspfOlsrNode:/etc/rc2.d# telnet localhost 2601
  Trying 127.0.0.1...
  Connected to localhost.localdomain.
  Escape character is '^]'.

  Hello, this is Quagga (version 0.98.3).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.


  User Access Verification

  Password:
  OspfOlsrNode> show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route

  C>* 10.0.3.0/24 is directly connected, eth1
  C>* 10.0.42.0/24 is directly connected, eth2
  C>* 127.0.0.0/8 is directly connected, lo
  O>* 192.168.11.0/24 [110/20] via 192.168.148.23, eth0, 00:00:34
  O   192.168.148.0/24 [110/10] is directly connected, eth0, 00:01:13
  C>* 192.168.148.0/24 is directly connected, eth0

That is OK.


Step 5.)
Now we add a static route to the network 10.0.43.0/24.

  OspfOlsrNode> en
  OspfOlsrNode# conf t
  OspfOlsrNode(config)# ip route 10.0.43.0/24 10.0.3.3
  OspfOlsrNode(config)# quit
  OspfOlsrNode# show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route

  C>* 10.0.3.0/24 is directly connected, eth1
  C>* 10.0.42.0/24 is directly connected, eth2
  S>* 10.0.43.0/24 [1/0] via 10.0.3.3, eth1
  C>* 127.0.0.0/8 is directly connected, lo
  O>* 192.168.11.0/24 [110/20] via 192.168.148.23, eth0, 00:01:07
  O   192.168.148.0/24 [110/10] is directly connected, eth0, 00:01:46
  C>* 192.168.148.0/24 is directly connected, eth0
  OspfOlsrNode(config)# quit
  OspfOlsrNode# quit


Step 6.)
Now we add a static route to the host 10.0.3.3.

  root at OspfOlsrNode:/etc/rc2.d# route add -host 10.0.3.3 eth1
  root at OspfOlsrNode:/etc/rc2.d# route
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  10.0.3.3        *               255.255.255.255 UH    0      0        0 eth1
  10.0.3.0        *               255.255.255.0   U     0      0        0 eth1
  192.168.148.0   *               255.255.255.0   U     0      0        0 eth0
  192.168.11.0    192.168.148.23  255.255.255.0   UG    20     0        0 eth0
  10.0.43.0       10.0.3.3        255.255.255.0   UG    0      0        0 eth1
  10.0.42.0       *               255.255.255.0   U     0      0        0 eth2

Let's see what Zebra thinks of it.

  root at OspfOlsrNode:/etc/rc2.d# telnet localhost 2601
  Trying 127.0.0.1...
  Connected to localhost.localdomain.
  Escape character is '^]'.

  Hello, this is Quagga (version 0.98.3).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.


  User Access Verification

  Password:
  OspfOlsrNode>
    echo      Echo a message back to the vty
    enable    Turn on privileged mode command
    exit      Exit current mode and down to previous mode
    help      Description of the interactive help system
    list      Print command list
    quit      Exit current mode and down to previous mode
    show      Show running system information
    terminal  Set terminal line parameters
    who       Display who is on vty
  OspfOlsrNode> show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route

  C>* 10.0.3.0/24 is directly connected, eth1
  K>* 10.0.3.3/32 is directly connected, eth1
  C>* 10.0.42.0/24 is directly connected, eth2
  S>* 10.0.43.0/24 [1/0] via 10.0.3.3, eth1
  C>* 127.0.0.0/8 is directly connected, lo
  O>* 192.168.11.0/24 [110/20] via 192.168.148.23, eth0, 00:02:40
  O   192.168.148.0/24 [110/10] is directly connected, eth0, 00:03:27
  C>* 192.168.148.0/24 is directly connected, eth0

  OspfOlsrNode> quit
  Connection closed by foreign host.

Zebra also likes what we did. Both 10.0.3.3 and 10.0.43.0/24 are listed,
marked as FIB routes and selected routes.


Step 7.)
Now start all over again. Remove any added routes and stop the Quagga
daemons.

  root at OspfOlsrNode:/etc/rc2.d# route del -host 10.0.3.3 eth1
  root at OspfOlsrNode:/etc/rc2.d# /etc/init.d/quagga stop
  Stopping Quagga daemons (prio:0): ospfd zebra (bgpd) (ripd) (ripngd) (ospf6d).
  Removing all routes made by zebra.
  Nothing to flush.

Check if indeed all routes are back in their default.

  root at OspfOlsrNode:/etc/rc2.d# route
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  10.0.3.0        *               255.255.255.0   U     0      0        0 eth1
  192.168.148.0   *               255.255.255.0   U     0      0        0 eth0
  10.0.42.0       *               255.255.255.0   U     0      0        0 eth2


Step 8.)
Start the Quagga daemons.

  root at OspfOlsrNode:/etc/rc2.d# /etc/init.d/quagga start
  Loading capability module if not yet done.
  Starting Quagga daemons (prio:10): zebra ospfd.


Step 9.)
After a while, the remote routes are visible again.

  root at OspfOlsrNode:/etc/rc2.d# ip route
  10.0.3.0/24 dev eth1  proto kernel  scope link  src 10.0.3.2
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.22
  192.168.11.0/24 via 192.168.148.23 dev eth0  proto zebra  metric 20 equalize
  10.0.42.0/24 dev eth2  proto kernel  scope link  src 10.0.42.1


Step 10.)
Now, we add the route to host 10.0.3.3 *first*

  root at OspfOlsrNode:/etc/rc2.d# route add -host 10.0.3.3 eth1
  root at OspfOlsrNode:/etc/rc2.d# ip route
  10.0.3.3 dev eth1  scope link
  10.0.3.0/24 dev eth1  proto kernel  scope link  src 10.0.3.2
  192.168.148.0/24 dev eth0  proto kernel  scope link  src 192.168.148.22
  192.168.11.0/24 via 192.168.148.23 dev eth0  proto zebra  metric 20 equalize
  10.0.42.0/24 dev eth2  proto kernel  scope link  src 10.0.42.1


Step 11.)
Let's see what Zebra thinks of it.

  root at OspfOlsrNode:/etc/rc2.d# telnet localhost 2601
  Trying 127.0.0.1...
  Connected to localhost.localdomain.
  Escape character is '^]'.

  Hello, this is Quagga (version 0.98.3).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.


  User Access Verification

  Password:
  OspfOlsrNode> show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route

  C>* 10.0.3.0/24 is directly connected, eth1
  K>* 10.0.3.3/32 is directly connected, eth1
  C>* 10.0.42.0/24 is directly connected, eth2
  C>* 127.0.0.0/8 is directly connected, lo
  O>* 192.168.11.0/24 [110/20] via 192.168.148.23, eth0, 00:00:59
  O   192.168.148.0/24 [110/10] is directly connected, eth0, 00:01:52
  C>* 192.168.148.0/24 is directly connected, eth0

Zebra says that is ok. We have a kernel route to host 10.0.3.3.


Step 12.)
Now we add the static route to network 10.0.43.0/24 again.

  OspfOlsrNode> en
  OspfOlsrNode# conf t
  OspfOlsrNode(config)# ip route 10.0.43.0/24 10.0.3.3
  OspfOlsrNode(config)# quit

  OspfOlsrNode# show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route

  C>* 10.0.3.0/24 is directly connected, eth1
  K>* 10.0.3.3/32 is directly connected, eth1
  C>* 10.0.42.0/24 is directly connected, eth2
  S   10.0.43.0/24 [1/0] via 10.0.3.3 inactive
  C>* 127.0.0.0/8 is directly connected, lo
  O>* 192.168.11.0/24 [110/20] via 192.168.148.23, eth0, 00:02:31
  O   192.168.148.0/24 [110/10] is directly connected, eth0, 00:03:24
  C>* 192.168.148.0/24 is directly connected, eth0

What do we see??

  S   10.0.43.0/24 [1/0] via 10.0.3.3 inactive
                                      ^^^^^^^^

Why is this???

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20060505/85e713f8/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Why-is-this-spam.txt
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20060505/85e713f8/attachment.txt>


More information about the Quagga-dev mailing list