show ip ospf neighbors
Syntax
show ip ospf [ ] neighbors [ ] [interface ] [detail | summary] [all-vrfs | vrf ] [vsx-peer]
Description
显示关于OSPF邻居信息。
Command context
操作符r (>
) or Manager (#
)
Parameters
-
-
Enter an OSPF process ID to display OSPF neighbor information for the particular OSPF process. Range: 1 to 63.
-
neighbors
-
Select to display information about a particular neighbor, specified in IPv4 format (A.B.C.D).
-
interface
-
Select to display neighbor information only for the specified interface.
-
detail
-
Select to display detailed information for all the neighbors.
-
summary
-
Select to display summary information for the neighbors.
-
all-vrfs
-
Select to display neighbor information for all VRFs.
-
vrf
-
Specify the name of a VRF. Default: default.
-
[vsx-peer]
-
Shows the output from the VSX peer switch. If the switches do not have the VSX configuration or the ISL is down, the output from the VSX peer switch is not displayed. This parameter is available on switches that support VSX.
Authority
操作符rs or Administrators or local user group members with execution rights for this command. Operators can execute this command from the operator context (>) only.
Examples
Showing OSPF neighbors information for the default VRF:
switch#show ip ospf neighborsOSPF Process ID 1 VRF default ============================== Total Number of Neighbors: 1 Neighbor ID Priority State Nbr Address Interface ------------------------------------------------------------------------- 2.2.2.2 1 FULL/DR 10.1.1.2 1/1/1
Showing OSPF neighbors information for VRF red:
switch#show ip ospf neighbors vrf redOSPF Process ID 1 VRF red ========================== Total Number of Neighbors: 1 Neighbor ID Priority State Nbr Address Interface ------------------------------------------------------------------------- 1.1.1.1 1 FULL/BDR 10.1.1.1 1/1/1
Showing OSPF neighbors information for a specific neighbor:
switch#show ip ospf neighbors 2.2.2.2Neighbor 2.2.2.2, interface address 10.1.1.2 -------------------------------------------- Process ID 1 VRF default, in area 0.0.0.0 via interface 1/1/1 Neighbor priority is 1, State is FULL Options is 0x42 Dead timer due in 00:00:32 Time since last state change 00h:19m:17s
Showing OSPF neighbors information for a specific neighbor and interface:
switch#show ip ospf neighbors 2.2.2.2 interface 1/1/1Neighbor 2.2.2.2, interface address 10.1.1.2 -------------------------------------------- Process ID 1 VRF default, in area 0.0.0.0 via interface 1/1/1 Neighbor priority is 1, State is FULL DR is 10.1.1.2, BDR is 10.1.1.1 Options is 0x42 Dead timer due in 00:00:38 Retransmission queue length 0 Time since last state change 00h:22m:21s
Showing detail information for OSPF neighbors:
switch#show ip ospf neighbors detailNeighbor 2.2.2.2, interface address 10.1.1.2 -------------------------------------------- Process ID 1 VRF default, in area 0.0.0.0 via interface 1/1/1 Neighbor priority is 1, State is FULL DR is 10.1.1.2, BDR is 10.1.1.1 Options is 0x42 Dead timer due in 00:00:38 Retransmission queue length 0 Time since last state change 00h:22m:21s
Showing summary information for OSPF neighbors in default VRF:
switch#show ip ospf neighbors summaryOSPF Process ID 1 VRF default, Neighbor Summary ================================================ Interface Down Attempt Init TwoWay ExStart Exchange Loading Full Total ------------------------------------------------------------------------- 1/1/1 0 0 0 0 0 0 0 1 1 1/1/2 0 0 0 0 0 0 0 0 0 Total 0 0 0 0 0 0 0 1 1