Command
Passive-Interface
Use
This command prevents OSPF from forming adjacencies on specified interfaces on the router. Using no passive-interface is used to allow all OSPF communication.
Syntax
Router(config-router)#passive-interface <interface>
Example

In this example, we will use passive-interface default to block all OSPF adjacencies. After that, we will allow communication through R2’s Fa0/0.
R2(config)#do show ip route ospf |
Here we enable passive-interface default on R2
R2(config)#router ospf 1 |
We can see there are no longer any OSPF routes on R2.
R2(config-router)#do show ip route OSPF R2(config-router)# |
Now we will use no passive-interface fa0/0 to allow communication through R2’s Fa0/0.
R2(config-router)#no passive-interface fa0/0 |
Finally, we have routes coming in from Fa0/0 but not any other interface.
R2(config-router)#do show ip route ospf |