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