show ip ospf neighbor
20-30 IPv4 Routing Protocol Configuration
show ip ospf neighbor
UsethiscommandtodisplaythestateofcommunicationbetweenanOSPFrouterandits
neighborrouters.
Syntax
show ip ospf neighbor [detail] [ip-address] [vlan vlan-id]
Parameters
Defaults
Ifdetailisnotspecified,summaryinformationwillbedisplayed.
Ifip‐addressisnotspecified,OSPFneighborswillbedisplayedforallIPaddressesconfiguredfor
routing.
Ifvlan‐idisnotspecified,OSPFneighborswillbedisplayedforallVLANsconfiguredforrouting.
Mode
Anyroutermode.
Example
Thisexampleshowshowtousetheshowospfneighborcommand:
C2(su)->router#show ip ospf neighbor
ID Pri State Dead-Int Address Interface
182.127.62.1 1 FULL 40 182.127.63.1 vlan1
Table 20‐5providesanexplanationofthecommandoutput.
detail (Optional)Displaysdetailedinformationabouttheneighbors,includingthe
areainwhichtheyareneighbors,whothedesignatedrouter/backup
designatedrouterisonthesubnet,ifapplicable,andthedecimalequivalent
oftheE‐bitvaluefromthehellopacketoptionsfield.
ip‐address (Optional)DisplaysOSPF neighborsforaspecificIPaddress.
vlanvlan‐id (Optional)DisplaysOSPFneighborsforaspecificVLAN.ThisVLANmust
beconfiguredforIProutingasdescribedin“Pre‐RoutingConfiguration
Tasks”onpage18‐1.
Table 20-5 show ip ospf neighbor Output Details
Output Field What It Displays...
ID Neighbor’s router ID of the OSPF neighbor.
Pri Neighbor’s priority over this interface.
State Neighbor’s OSPF communication state.
Dead-Int Interval (in seconds) this router will wait without receiving a Hello packet from a
neighbor before declaring the neighbor is down.
Address Neighbor’s IP address.
Interface Neighbor’s interface (VLAN).