run show ospf neighbor

Run the command run show ospf neighbor  to display the OSPF neighbor devices. The command output displays the neighbor router ID, State, Dead Time, Address and Interface etc.

If OSPF is running in the default VRF then no need to specify the VRF but if OSPF is running in a user defined VRF then you need to specify the VRF by using the vrf parameter.

Optional parameter instance-id can be included to specify the OSPFv2 multi-instance ID in the default VRF.

If you require more detail about OSPF neighbors then add the argument detail to the command which will display information about the OSPF area the neighbor belongs to and recent state change statistics etc.


Command Syntax

run show ospf [instance-id <instance-id> | vrf <vrf-name>] neighbor [detail]


Parameters

ParameterDescription
instance-id <instance-id>Optional. Specifies the OSPF instance ID in the default VRF. The value is an integer that ranges from 1 to 8.
vrf <vrf-name>Specifies the VLAN interface name.


Example

  •  The command below displays OSPF neighbors (two) for switch1 in vrf1.
admin@switch1# run show ospf vrf vrf1 neighbor
VRF Name: vrf1

Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
2.2.2.2           1 Full/DR           38.590s 10.251.201.3    vlan10:10.251.201.2                  0     0     0
3.3.3.3           1 Full/DR           30.605s 11.251.201.4    vlan11:11.251.201.2                  0     0     0



admin@switch1# run show ospf vrf vrf1 neighbor detail
VRF Name: vrf1
 Neighbor 2.2.2.2, interface address 10.251.201.3
    In the area 0.0.0.0 via interface vlan10
    Neighbor priority is 1, State is Full, 6 state changes
    Most recent state change statistics:
      Progressive change 57m32s ago
    DR is 10.251.201.3, BDR is 10.251.201.2
    Options 2 *|-|-|-|-|-|E|-
    Dead timer due in 37.160s
    Database Summary List 0
    Link State Request List 0
    Link State Retransmission List 0
    Thread Inactivity Timer on
    Thread Database Description Retransmision off
    Thread Link State Request Retransmission on
    Thread Link State Update Retransmission on

 Neighbor 3.3.3.3, interface address 11.251.201.4
    In the area 1.1.1.1 via interface vlan11
    Neighbor priority is 1, State is Full, 6 state changes
    Most recent state change statistics:
      Progressive change 57m30s ago
    DR is 11.251.201.4, BDR is 11.251.201.2
    Options 2 *|-|-|-|-|-|E|-
    Dead timer due in 39.177s
    Database Summary List 0
    Link State Request List 0
    Link State Retransmission List 0
    Thread Inactivity Timer on
    Thread Database Description Retransmision off
    Thread Link State Request Retransmission on
    Thread Link State Update Retransmission on

To see the OSPF neighbors in an OSPF instance, run the command below

admin@Xorplus# run show ospf instance-id 1 neighbor
OSPF Instance: 1


Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
81.81.81.81       1 Init/DROther      36.580s 192.168.1.12    vlan111:192.168.1.11                 0     0     0
171.171.171.171   1 Init/DROther      35.310s 192.168.11.1    vlan1111:192.168.11.2                0     0     0

Copyright © 2024 Pica8 Inc. All Rights Reserved.