The passive-interface default command makes every OSPF-enabled interface passive by default. Passive interfaces remain OSPF-enabled and advertise their networks, but they do not send OSPF hello messages to form neighbors. section 18.2.3 section 18.5
Use the command sequence when only a few interfaces should form OSPF neighbor relationships:
- Enter OSPF router configuration mode with router ospf process-id. section 18.2.3
- Apply passive-interface default to make all interfaces passive. section 18.2.3
- Use no passive-interface interface-name on each interface that must establish OSPF neighbors. section 18.2.3 section 18.5
R2 with selective OSPF neighbors
R2(config)# router ospf 1 R2(config-router)# passive-interface default R2(config-router)# no passive-interface g0/0 R2(config-router)# no passive-interface g0/1 G0/0 and G0/1 can form OSPF neighbor relationships, while Loopback0 remains passive.
