Page MenuHomeVyOS Platform

OSPF routing problem - route looping
Closed, ResolvedPublicBUG

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

Event Timeline

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 triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
pasik added a subscriber: pasik.Feb 5 2019, 7:43 PM
byabcz added a subscriber: byabcz.May 1 2019, 5:55 PM
Viacheslav closed this task as Resolved.Jul 27 2020, 2:29 PM
Viacheslav added a subscriber: Viacheslav.

Fixed, VyOS 1.3-rolling-202007270117

vyos@r1-roll# run show ip route

S>* 0.0.0.0/0 [1/0] via 192.168.122.1, eth0, 00:23:35
O   10.0.0.0/30 [110/1] is directly connected, eth1, 00:02:06
C>* 10.0.0.0/30 is directly connected, eth1, 00:03:21
S>* 192.168.100.0/24 [1/0] unreachable (blackhole), 00:00:03
O   192.168.100.0/24 [110/20] via 10.0.0.2, eth1, 00:00:20
C>* 192.168.122.0/24 is directly connected, eth0, 00:23:39

on R2 delete route

delete protocols static route 192.168.100.0/24
commit

On R1 route not present

vyos@r1-roll# run show ip route

S>* 0.0.0.0/0 [1/0] via 192.168.122.1, eth0, 00:24:14
O   10.0.0.0/30 [110/1] is directly connected, eth1, 00:02:45
C>* 10.0.0.0/30 is directly connected, eth1, 00:04:00
C>* 192.168.122.0/24 is directly connected, eth0, 00:24:18
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.Aug 3 2020, 2:15 PM