Page MenuHomePhabricator

OSPF routing problem - route looping
Open, NormalPublicBUG

Description

If on two routers with the redistribution of static routes enabled, create the same routes and then delete them, the route will loop.

сonfiguration router 1 (vyos1):

interfaces {
    ethernet eth0 {
        address 192.168.0.1/24
    }
    loopback lo {
    }
}
protocols {
    ospf {
        area 0 {
            network 192.168.0.0/24
        }
        redistribute {
            static {
            }
        }
    }
}
service {
    ssh {

сonfiguration router 2 (vyos2):

interfaces {
    ethernet eth0 {
        address 192.168.0.2/24
    }
    loopback lo {
    }
}
protocols {
    ospf {
        area 0 {
            network 192.168.0.0/24
        }
        redistribute {
            static {
            }
        }
    }
}
service {
    ssh {
vyos@vyos1:~$ show ip ospf neighbor 

Neighbor ID     Pri State           Dead Time Address         Interface            RXmtL RqstL DBsmL
192.168.0.2       1 Full/DR           31.039s 192.168.0.2     eth0:192.168.0.1         0     0     0

Create a route on a router 1:

vyos@vyos1:~$ conf
vyos@vyos1# set protocols static route 192.168.100.0/24 blackhole 
vyos@vyos1# commit
vyos@vyos1# exit
vyos@vyos2:~$ show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route

O   192.168.0.0/24 [110/1] is directly connected, eth0, 00:08:04
C>* 192.168.0.0/24 is directly connected, eth0, 00:09:19
O>* 192.168.100.0/24 [110/20] via 192.168.0.1, eth0, 00:01:03

Create a route on a router 2:

vyos@vyos2:~$ conf
vyos@vyos2# set protocols static route 192.168.100.0/24 blackhole
vyos@vyos2:~$ show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route

O   192.168.0.0/24 [110/1] is directly connected, eth0, 00:09:59
C>* 192.168.0.0/24 is directly connected, eth0, 00:11:14
S>* 192.168.100.0/24 [1/0] unreachable (blackhole), 00:00:30
O   192.168.100.0/24 [110/20] via 192.168.0.1, eth0, 00:00:40

Remove the route on both routers:

vyos@vyos1# delete protocols static route 192.168.100.0/24
vyos@vyos1# commit
vyos@vyos2# delete protocols static route 192.168.100.0/24
vyos@vyos2# commit

And show:

vyos@vyos1:~$ show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route

O   192.168.0.0/24 [110/1] is directly connected, eth0, 00:11:31
C>* 192.168.0.0/24 is directly connected, eth0, 00:13:28
O>* 192.168.100.0/24 [110/20] via 192.168.0.2, eth0, 00:02:47
vyos@vyos2:~$ show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route

O   192.168.0.0/24 [110/1] is directly connected, eth0, 00:11:28
C>* 192.168.0.0/24 is directly connected, eth0, 00:12:43
O>* 192.168.100.0/24 [110/20] via 192.168.0.1, eth0, 00:02:09

Now I got a route loop. The problem is solved by rebooting routers.

Details

Difficulty level
Unknown (require assessment)
Version
1.2
Why the issue appeared?
Will be filled on close
daniil created this task.Jan 31 2019, 4:41 PM
daniil updated the task description. (Show Details)Jan 31 2019, 4:53 PM
daniil updated the task description. (Show Details)
daniil updated the task description. (Show Details)Jan 31 2019, 4:56 PM
syncer assigned this task to dmbaturin.Feb 5 2019, 2:21 PM
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
syncer triaged this task as Normal priority.
pasik added a subscriber: pasik.Feb 5 2019, 7:43 PM