Supported Platforms
show (ospf | ospf3) neighbor
Syntax
Syntax (EX Series Switches and QFX Series)
Release Information
Command introduced before Junos OS Release 7.4.
Command introduced in Junos OS Release 9.0 for EX Series switches.
instance all option introduced in Junos OS Release 9.1.
instance all option introduced in Junos OS Release 9.1 for EX Series switches.
area, interface, and realm options introduced in Junos OS Release 9.2.
area and interface options introduced in Junos OS Release 9.2 for EX Series switches.
Command introduced in Junos OS Release 11.3 for the QFX Series.
Description
Display information about OSPF neighbors.
CPU utilization might increase while the device learns its OSPF neighbors. We recommend that you use the show (ospf | ospf3) neighbor command after the device learns and establishes OSPF neighbor adjacencies. Depending on the size of your network, this might take several minutes. If you receive a “timeout communicating with routing daemon” error when using the show (ospf | ospf3) neighbor command, wait several minutes before attempting to use the command again. This is not a critical system error, but you might experience a delay in using the CLI.
Options
none | — | Display standard information about all OSPF neighbors for all routing instances. |
brief | detail | extensive | — | (Optional) Display the specified level of output. |
area area-id | — | (Optional) Display information about the OSPF neighbors for the specified area. |
instance (all | instance-name) | — | (Optional) Display all OSPF interfaces for all routing instances or under the named routing instance. |
interface interface-name | — | (Optional) Display information about OSPF neighbors for the specified logical interface. |
logical-system (all | logical-system-name) | — | (Optional) Perform this operation on all logical systems or on a particular logical system. |
neighbor | — | (Optional) Display information about the specified OSPF neighbor. |
realm (ipv4-multicast | ipv4-unicast | ipv6-multicast) | — | (OSPFv3 only) (Optional) Display information about the OSPF neighbors for the specified OSPFv3 realm, or address family. Use the realm option to specify an address family for OSPFv3 other than IPv6 unicast, which is the default. |
Required Privilege Level
view
List of Sample Output
show ospf neighbor briefshow ospf neighbor detail
show ospf neighbor extensive
show ospf3 neighbor detail
show ospf neighbor area area-id
show ospf neighbor interface interface-name
show ospf3 neighbor instance all (OSPFv3 Multiple Family Address Support Enabled)
Output Fields
Table 1 lists the output fields for the show (ospf | ospf3) neighbor command. Output fields are listed in the approximate order in which they appear.
Table 1: show (ospf | ospf3) neighbor Output Fields
Field Name | Field Description | Level of Output |
---|---|---|
Address | Address of the neighbor. | All levels |
Interface | Interface through which the neighbor is reachable. | All levels |
State | State of the neighbor:
| All levels |
ID | Router ID of the neighbor. | All levels |
Pri | Priority of the neighbor to become the designated router. | All levels |
Dead | Number of seconds until the neighbor becomes unreachable. | All levels |
Link state acknowledgment list | Number of link-state acknowledgments received. | extensive |
Link state retransmission list | Total number of link-state advertisements retransmitted. For extensive output only, the following information is also displayed:
| detail extensive |
Neighbor-address | (OSPFv3 only) If the neighbor uses virtual links, the Neighbor-address is the site-local, local, or global address. If the neighbor uses a physical interface, the Neighbor-address is an IPv6 link-local address. | detail extensive |
area | Area that the neighbor is in. | detail extensive |
OSPF3-Intf-Index | (OSPFv3 only) Displays the OSPFv3 interface index. | detail extensive |
opt | Option bits received in the hello packets from the neighbor. | detail extensive |
DR or DR-ID | Address of the designated router. | detail extensive |
BDR or BDR-ID | Address of the backup designated router. | detail extensive |
Up | Length of time since the neighbor came up. | detail extensive |
adjacent | Length of time since the adjacency with the neighbor was established. | detail extensive |
Sample Output
show ospf neighbor brief
user@host> show ospf neighbor brief
Address Intf State ID Pri Dead 192.168.254.225 fxp3.0 2Way 10.250.240.32 128 36 192.168.254.230 fxp3.0 Full 10.250.240.8 128 38 192.168.254.229 fxp3.0 Full 10.250.240.35 128 33 10.1.1.129 fxp2.0 Full 10.250.240.12 128 37 10.1.1.131 fxp2.0 Full 10.250.240.11 128 38 10.1.2.1 fxp1.0 Full 10.250.240.9 128 32 10.1.2.81 fxp0.0 Full 10.250.240.10 128 33
show ospf neighbor detail
user@host> show ospf neighbor detail
Address Interface State ID Pri Dead 10.5.1.2 ge-1/2/0.1 Full 10.5.1.2 128 37 area 0.0.0.1, opt 0x42, DR 10.5.1.2, BDR 10.5.1.1 Up 06:09:28, adjacent 05:17:36 Link state acknowledgment list: 3 entries Link state retransmission list: 9 entries 10.5.10.2 ge-1/2/0.10 ExStart 10.5.1.38 128 34 area 0.0.0.1, opt 0x42, DR 10.5.10.2, BDR 10.5.10.1 Up 06:09:28 master, seq 0xac1530f8, rexmit DBD in 3 sec rexmit LSREQ in 0 sec 10.5.11.2 ge-1/2/0.11 Full 10.5.1.42 128 38 area 0.0.0.1, opt 0x42, DR 10.5.11.2, BDR 10.5.11.1 Up 06:09:28, adjacent 05:26:46 Link state retransmission list: 1 entries 10.5.12.2 ge-1/2/0.12 ExStart 10.5.1.46 128 33 area 0.0.0.1, opt 0x42, DR 10.5.12.2, BDR 10.5.12.1 Up 06:09:28 master, seq 0xac188a68, rexmit DBD in 2 sec rexmit LSREQ in 0 sec
show ospf neighbor extensive
user@host> show ospf neighbor extensive
Address Interface State ID Pri Dead 10.5.1.2 ge-1/2/0.1 Full 10.5.1.2 128 33 area 0.0.0.1, opt 0x42, DR 10.5.1.2, BDR 10.5.1.1 Up 06:09:42, adjacent 05:17:50 Link state retransmission list: Type LSA ID Adv rtr Seq Summary 10.8.56.0 172.25.27.82 0x8000004d Router 10.5.1.94 10.5.1.94 0x8000005c Network 10.5.24.2 10.5.1.94 0x80000036 Summary 10.8.57.0 172.25.27.82 0x80000024 Extern 1.10.90.0 10.8.1.2 0x80000041 Extern 1.4.109.0 10.6.1.2 0x80000041 Router 10.5.1.190 10.5.1.190 0x8000005f Network 10.5.48.2 10.5.1.190 0x8000003d Summary 10.8.58.0 172.25.27.82 0x8000004d Extern 1.10.91.0 10.8.1.2 0x80000041 Extern 1.4.110.0 10.6.1.2 0x80000041 Router 10.5.1.18 10.5.1.18 0x8000005f Network 10.5.5.2 10.5.1.18 0x80000033 Summary 10.8.59.0 172.25.27.82 0x8000003a Summary 10.8.62.0 172.25.27.82 0x80000025 10.5.10.2 ge-1/2/0.10 ExStart 10.5.1.38 128 38 area 0.0.0.1, opt 0x42, DR 10.5.10.2, BDR 10.5.10.1 Up 06:09:42 master, seq 0xac1530f8, rexmit DBD in 2 sec rexmit LSREQ in 0 sec 10.5.11.2 ge-1/2/0.11 Full 10.5.1.42 128 33 area 0.0.0.1, opt 0x42, DR 10.5.11.2, BDR 10.5.11.1 Up 06:09:42, adjacent 05:27:00 Link state retransmission list: Type LSA ID Adv rtr Seq Summary 10.8.58.0 172.25.27.82 0x8000004d Extern 1.10.91.0 10.8.1.2 0x80000041 Extern 1.1.247.0 10.5.1.2 0x8000003f Extern 1.4.110.0 10.6.1.2 0x80000041 Router 10.5.1.18 10.5.1.18 0x8000005f Network 10.5.5.2 10.5.1.18 0x80000033 Summary 10.8.59.0 172.25.27.82 0x8000003a
show ospf3 neighbor detail
user@host> show ospf3 neighbor detail
ID Interface State Pri Dead 10.255.71.13 fe-0/0/2.0 Full 128 30 Neighbor-address fe80::290:69ff:fe9b:e002 area 0.0.0.0, opt 0x13, OSPF3-Intf-Index 2 DR-ID 10.255.71.13, BDR-ID 10.255.71.12 Up 02:51:43, adjacent 02:51:43
show ospf neighbor area area-id
user@host >show ospf neighbor area 1.1.1.1
Address Interface State ID Pri Dead 192.168.37.47 so-0/0/0.0 Full 10.255.245.4 128 33 Area 1.1.1.1 192.168.37.55 so-1/0/0.0 Full 10.255.245.5 128 37 Area 1.1.1.1
show ospf neighbor interface interface-name
user@host >show ospf neighbor interface so-0/0/0.0
Address Interface State ID Pri Dead 192.168.37.47 so-0/0/0.0 Full 10.255.245.4 128 37 Area 0.0.0.0 192.168.37.47 so-0/0/0.0 Full 10.255.245.4 128 33 Area 1.1.1.1 192.168.37.47 so-0/0/0.0 Full 10.255.245.4 128 32 Area 2.2.2.2
show ospf3 neighbor instance all (OSPFv3 Multiple Family Address Support Enabled)
user @host > show ospf3 neighbor instance all
Instance: ina Realm: ipv6-unicast ID Interface State Pri Dead 100.1.1.1 fe-0/0/2.0 Full 128 37 Neighbor-address fe80::217:cb00:c87c:8c03 Instance: inb Realm: ipv4-unicast ID Interface State Pri Dead 100.1.2.1 fe-0/0/2.1 Full 128 33 Neighbor-address fe80::217:cb00:c97c:8c03