Page MenuHomeVyOS Platform

OSPF : virtual-link and passive-interface default parameters does not work together
Closed, ResolvedPublicBUG

Description

The below topology has three areas (area 0, 1, 2) and area 0 and 2 are not directly connected to each other. In order to reach each other, virtual link is configured for area 1. But when passive interface default is also added to the configuration, then the communication disconnects between each other.

Configuration:
Without passive-interface default
R1:

set interfaces ethernet eth0 address '4.0.0.1/24'
set interfaces ethernet eth1 address '5.0.0.1/24'
set interfaces loopback lo address '1.1.1.1/32'
set protocols ospf area 0 network '5.0.0.0/24'
set protocols ospf area 1 network '4.0.0.0/24'
set protocols ospf area 1 virtual-link 2.2.2.2
set protocols ospf log-adjacency-changes
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '1.1.1.1'

R2:

set interfaces ethernet eth0 address '4.0.0.2/24'
set interfaces ethernet eth1 address '6.0.0.2/24'
set interfaces loopback lo address '2.2.2.2/32'
set protocols ospf area 1 network '4.0.0.0/24'
set protocols ospf area 1 virtual-link 1.1.1.1
set protocols ospf area 2 network '6.0.0.0/24'
set protocols ospf log-adjacency-changes
set protocols ospf parameters router-id '2.2.2.2'

Output:

vyos@vyos:~$ sh ip ospf neighbor

Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
1.1.1.1           1 Full/Backup       37.778s 4.0.0.1         eth0:4.0.0.2                         0     0     0
1.1.1.1           1 Full/DROther      33.870s 4.0.0.1         VLINK0                               0     0     0
vyos@vyos# ping 6.0.0.2
PING 6.0.0.2 (6.0.0.2) 56(84) bytes of data.
64 bytes from 6.0.0.2: icmp_seq=1 ttl=63 time=1.59 ms
64 bytes from 6.0.0.2: icmp_seq=2 ttl=63 time=1.86 ms
64 bytes from 6.0.0.2: icmp_seq=3 ttl=63 time=1.69 ms

When the following lines are added in both routers, then the config breaks:

set proto ospf passive-interface default
set proto ospf passive-interface-exclude eth0
set proto ospf passive-interface-exclude eth1

The vlink0 disappears from the ospf neighborship, and vlink0 option does not show below passive-interface-exclude interface options.

vyos@vyos# run sh ip ospf neigh

Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
1.1.1.1           1 Full/Backup       31.925s 4.0.0.1         eth0:4.0.0.2                         0     0     0
vyos@vyos# ping 6.0.0.2
connect: Network is unreachable

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.5, vyos rolling release
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

SrividyaA renamed this task from virtual-link and passive-interface default parameters does not work together to OSPF : virtual-link and passive-interface default parameters does not work together.Nov 5 2020, 3:53 PM

@Viacheslav , I tested in the 1.4 version, it seems that the neighborship is stuck in ExStart state with basic config. This behavior is not seen in 1.2.5 and 1.3
And also no frr.log is created.

vyos@R1# sudo ls -ltr /var/log/frr/
total 8
-rw-r--r-- 1 root vyattacfg 6491 Feb  3 14:24 frr-reload.log
[edit]
vyos@R1# run sh ip ospf neigh

Neighbor ID     Pri State           Dead Time Address         Interface        L
2.2.2.2           1 ExStart/DR        32.383s 192.168.0.2     eth1:192.168.0.1 0
4.4.4.4           1 Full/DR           38.653s 10.118.1.2      eth0:10.118.1.1  0

vyos@R1# run sh ver

Version:          VyOS 1.4-rolling-202102020218
Release Train:    sagitta

OSPF Config:

R1:

vyos@R1:~$ sh conf comm | grep ospf
set protocols ospf area 1 network '192.168.0.0/30'
set protocols ospf area 1 virtual-link 2.2.2.2
set protocols ospf area 118 network '10.118.1.0/24'
set protocols ospf log-adjacency-changes
set protocols ospf parameters router-id '1.1.1.1'

R2:

set protocols ospf area 0 network '10.1.3.0/24'
set protocols ospf area 1 network '192.168.0.0/30'
set protocols ospf area 1 virtual-link 1.1.1.1
set protocols ospf log-adjacency-changes
set protocols ospf parameters router-id '2.2.2.2'

The pull request is created to fix this issue:

https://github.com/vyos/vyos-1x/pull/723

Post the modification, the configuration looks like this:

vyos@R1# run sh conf comm | grep ospf
set protocols ospf area 1 network '192.168.0.0/30'
set protocols ospf area 1 virtual-link 2.2.2.2
set protocols ospf area 118 network '10.118.1.0/24'
set protocols ospf log-adjacency-changes
set protocols ospf parameters router-id '1.1.1.1'
set protocols ospf passive-interface 'default'
set protocols ospf passive-interface-exclude 'eth0'
set protocols ospf passive-interface-exclude 'eth1'
set protocols ospf passive-interface-exclude 'VLINK0'


vyos@R1# run sh ip ospf neighbor

Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
2.2.2.2           1 Full/DR           35.420s 192.168.0.2     eth1:192.168.0.1                     0     0     0
4.4.4.4           1 Full/DR           34.812s 10.118.1.2      eth0:10.118.1.1                      0     0     0
2.2.2.2           1 Full/DROther      33.732s 192.168.0.2     VLINK0                               0     0     0

NOTE: frr.log has been moved to the messages file.

This issue has been fixed in this commit: https://github.com/vyos/vyos-1x/commit/0fb5cc02c6c16ef410c1b1f746c1fbfbc40a0da0

Tested in the version: VyOS 1.4-rolling-202102171100

Config on routers:
R1:

vyos@R1:~$ sh conf comm | grep ospf
set protocols ospf area 1 network '192.168.0.0/30'
set protocols ospf area 1 virtual-link 2.2.2.2
set protocols ospf area 118 network '10.118.1.0/24'
set protocols ospf log-adjacency-changes
set protocols ospf parameters router-id '1.1.1.1'
set protocols ospf passive-interface 'default'
set protocols ospf passive-interface-exclude 'eth1'
set protocols ospf passive-interface-exclude 'eth0'
set protocols ospf passive-interface-exclude 'vlink0'

R2

set protocols ospf area 0 network '10.1.3.0/24'
set protocols ospf area 1 network '192.168.0.0/30'
set protocols ospf area 1 virtual-link 1.1.1.1
set protocols ospf log-adjacency-changes
set protocols ospf parameters router-id '2.2.2.2'
set protocols ospf passive-interface 'default'
set protocols ospf passive-interface-exclude 'eth1'
set protocols ospf passive-interface-exclude 'eth3'
set protocols ospf passive-interface-exclude 'vlink0'

Output:

vyos@R1:~$ sh ip ospf neighbor

Neighbor ID     Pri State           Dead Time Address         Interface        L
2.2.2.2           1 Full/DR           30.303s 192.168.0.2     eth1:192.168.0.1 0
2.2.2.2           1 Full/DROther      30.508s 192.168.0.2     VLINK0           0
4.4.4.4           1 Full/DR           30.557s 10.118.1.2      eth0:10.118.1.1  0

R2:

vyos@vyos:~$ sh ip ospf neighbor

Neighbor ID     Pri State           Dead Time Address         Interface        L
3.3.3.3           1 Full/DR           39.287s 10.1.3.2        eth3:10.1.3.1    0
1.1.1.1           1 Full/Backup       33.257s 192.168.0.1     eth1:192.168.0.2 0
1.1.1.1           1 Full/DROther      36.944s 192.168.0.1     VLINK0           0