PacketLab
OSPF · Network types and elections

Passive interfaces

Advertise an edge prefix while keeping neighbor discovery on router-facing links.

Understand

A passive OSPF interface remains part of the advertised topology, but does not send Hellos or form adjacencies. This is useful for user LANs and loopbacks. OSPF must still be enabled on the interface: passive status alone does not originate a prefix.

A deny-by-default policy uses passive-interface default, then explicitly activates only intended transit interfaces with no passive-interface. It limits accidental neighbor formation when a new interface joins OSPF. This does not encrypt traffic or replace control-plane filtering and authentication.

Lab setup

Use a fresh lab for this lesson; changes from other lessons are not cumulative. All outputs are illustrative excerpts, not recorded router tests. Transit cost is explicitly 10 and Loopback0 cost is 1. Interface names may vary by image.

Lab topologyIllustrative topology
192.0.2.0/30area 0R1Lo0 · 10.255.0.1/32R2Lo0 · 10.255.0.2/32
Solid lines are physical links, configured as point-to-point. Interfaces and areas are listed below. Router symbol: GNS3, GPL-2.0. Original layout.
RouterInterfaceIPv4 addressArea
R1Gi1192.0.2.1/300
R2Gi1192.0.2.2/300

Loopback0 is 10.255.0.<router number>/32; area assignments: R1: area 0, R2: area 0.

Complete baseline configurations

R1

Configuration
configure terminal
hostname R1
router ospf 1
 router-id 10.255.0.1
 passive-interface Loopback0
 exit
interface Loopback0
 ip address 10.255.0.1 255.255.255.255
 ip ospf 1 area 0
 ip ospf cost 1
 exit
interface GigabitEthernet1
 ip address 192.0.2.1 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 10
 ip ospf 1 area 0
 no shutdown
 exit
end

R2

Configuration
configure terminal
hostname R2
router ospf 1
 router-id 10.255.0.2
 passive-interface Loopback0
 exit
interface Loopback0
 ip address 10.255.0.2 255.255.255.255
 ip ospf 1 area 0
 ip ospf cost 1
 exit
interface GigabitEthernet1
 ip address 192.0.2.2 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 10
 ip ospf 1 area 0
 no shutdown
 exit
end

Apply

Apply passive-by-default to both baseline routers; explicitly exempt Gi1. Add a simulated edge LAN on R1 Loopback10. Point-to-point loopback network type is used only to advertise the configured /24 rather than the usual loopback /32; passive operation prevents any neighbor discovery there.

R1

Configuration
configure terminal
router ospf 1
 passive-interface default
 no passive-interface GigabitEthernet1
 exit
interface Loopback10
 ip address 10.10.10.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf cost 1
 ip ospf 1 area 0
end

R2

Configuration
configure terminal
router ospf 1
 passive-interface default
 no passive-interface GigabitEthernet1
end

Verify and interpret

Illustrative output · excerpt
R1# show ip ospf interface Loopback10
  Internet Address 10.10.10.1/24, Area 0
  No Hellos (Passive interface)
R2# show ip route ospf
O 10.10.10.0/24 [110/11] via 192.0.2.1, GigabitEthernet1
O 10.255.0.1/32 [110/11] via 192.0.2.1, GigabitEthernet1

The prefix remains reachable even though there is no adjacency on the edge interface.

As an isolated fault, remove the Gi1 exception on R1. The adjacency expires but Loopback10 remains in R1’s own LSDB. Restore no passive-interface GigabitEthernet1, then verify Full and the /24 at R2. Advertising a prefix and transmitting it to another router are separate requirements.

Technical references

OSPFv2 standard · Router configuration guide

Key Takeaways

  • Passive prevents OSPF neighbor formation on an interface.
  • The interface prefix is still advertised when enabled in OSPF.
  • Passive default needs explicit transit exceptions.
  • Loopback /24 advertisement needs deliberate network-type handling on this platform.
  • A local LSA alone does not prove another router learned it.

Passive interfaces Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. Does passive remove an enabled prefix from OSPF?
2. What activates a neighbor-facing exception?
3. Does passive status alone enable OSPF?
4. Why use passive-interface default?
5. Why change the simulated loopback network type?
6. What happens if the only transit exception is removed?