MERAprojects / ops-quagga

GNU General Public License v2.0
0 stars 0 forks source link

OSPFv2 routing table doesn't contain routes to networks with /32 mask (loopback interfaces) #11

Closed xivamar closed 7 years ago

xivamar commented 8 years ago

Problem Description:

OSPFv2 routing table doesn't contain routes to loopback interfaces.

OpenSwitch version:

OpenSwitch 0.4.0 (Build: appliance-ops-0.4.0-master-20160823125534-dev)

Test Topology:

topology_for_ospf_issue

Steps to reproduce the problem (see attached files):

  1. Configure ospfv2 via script.
  2. Check adjacency via show ip ospf neighbor on DUT1. Neighbor should be in the table:

     switch# show ip ospf neighbor 
    
         Neighbor ID Pri State           Dead Time Address         Interface            RXmtL RqstL DBsmL
     ----------------------------------------------------------------------------------------------------
     20.20.20.20       1 Full/Backup       35.987s 10.0.12.2       eth3:10.0.12.1/24        0     0     0
     40.40.40.40       1 Full/Backup       38.294s 10.0.14.4       eth1:10.0.14.1/24        0     0     0
     switch# 
  3. Check ospf routing table via sho ip ospf route and rib table on DUT1. - NOK: routes to loopback interfaces are absent.

     switch# sho ip ospf route 
     Codes: N - Network, R - Router, IA - Inter Area,
            E1 - External Type 1, E2 - External Type 2
     ============ OSPF network routing table ============
     N    10.0.14.0/24          [10] area: 0.0.0.0
                               directly attached to eth1
    N    10.0.34.0/24          [20] area: 0.0.0.0
                               via 10.0.14.4, eth1
    N    10.0.12.0/24          [10] area: 0.0.0.0
                               directly attached to eth3
    N    10.0.23.0/24          [20] area: 0.0.0.0
                               via 10.0.12.2, eth3
    N    100.0.0.4/30          [20] area: 0.0.0.0
                               via 10.0.14.4, eth1
    
     ============ OSPF router routing table =============
     ============ OSPF external routing table ===========
     switch# 
    
     switch# show rib
     Displaying ipv4 rib entries 
     '*' denotes selected
     '[x/y]' denotes [distance/metric]
    
     *1.1.1.1/32,  1 unicast next-hops 
       *via  loopback1,  [0/0],  connected
    *10.0.12.0/24,  1 unicast next-hops 
       *via  eth3,  [0/0],  connected
    10.0.12.0/24,  1 unicast next-hops 
       *via  eth3,  [110/10],  ospf
    *10.0.14.0/24,  1 unicast next-hops 
       *via  eth1,  [0/0],  connected
    10.0.14.0/24,  1 unicast next-hops 
        *via  eth1,  [110/10],  ospf
    *10.0.23.0/24,  1 unicast next-hops 
       *via  10.0.12.2,  [110/20],  ospf
    *10.0.34.0/24,  1 unicast next-hops 
       *via  10.0.12.2,  [110/61],  ospf
    *100.0.0.1/32,  1 unicast next-hops 
       *via  loopback2,  [0/0],  connected
    *100.0.0.4/30,  1 unicast next-hops 
       *via  10.0.14.4,  [110/51],  ospf
    
     No ipv6 rib entries 
     switch# 

config.txt

xivamar commented 8 years ago

If we add in ospf router command redistribute connected, loopback networks will be advertised. But we get following problem: https://tree.taiga.io/project/openswitch/issue/1634

xivamar commented 7 years ago

Fix for this issue: https://github.com/MERAprojects/ops-quagga/pull/29 https://github.com/MERAprojects/ops-cli/pull/12 https://github.com/MERAprojects/ops-portd/pull/1