Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

show (ospf | ospf3) neighbor

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
show (ospf | ospf3) neighbor 
<brief | detail | extensive> 
<area area-id>
<instance (all |  instance-name)>
<interface interface-name>
<logical-system (all | logical-system-name)>
<neighbor>
<realm (ipv4-multicast | ipv4-unicast | ipv6-multicast)>

Syntax (EX Series Switches and QFX Series)

content_copy zoom_out_map
show (ospf | ospf3) neighbor 
<brief | detail | extensive> 
<area area-id>
<instance (all |  instance-name)>
<interface interface-name>
<neighbor>

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

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:

  • Attempt—Valid only for neighbors attached to nonbroadcast networks. It indicates that no recent information has been received from the neighbor, but that a more concerted effort must be made to contact the neighbor.

  • Down—Initial state of a neighbor conversation. It indicates that no recent information has been received from the neighbor. Hello packets might continue to be sent to neighbors in the Down state, although at a reduced frequency.

  • Exchange—Routing device is describing its entire link-state database by sending database description packets to the neighbor. Each packet has a sequence number and is explicitly acknowledged.

  • ExStart—First step in creating an adjacency between the two neighboring routing devices. The goal of this step is to determine which routing device is the primary, and to determine the initial sequence number.

  • Full—Neighboring routing devices are fully adjacent. These adjacencies appear in router link and network link advertisements.

  • Init—A hello packet has recently been sent by the neighbor. However, bidirectional communication has not yet been established with the neighbor. This state may occur, for example, because the routing device itself did not appear in the neighbor's hello packet.

  • Loading—Link-state request packets are sent to the neighbor to acquire more recent advertisements that have been discovered (but not yet received) in the Exchange state.

  • 2Way—Communication between the two routing devices is bidirectional. This state has been ensured by the operation of the Hello Protocol. This is the most advanced state short of beginning adjacency establishment. The (backup) designated router is selected from the set of neighbors in state 2Way or greater.

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:

  • Type—Type of link advertisement: ASBR, Sum, Extern, Network, NSSA, OpaqArea, Router, or Summary.

  • LSA ID—LSA identifier included in the advertisement. An asterisk preceding the identifier marks database entries that originated from the local routing device.

  • Adv rtr—Address of the routing device that sent the advertisement.

  • Seq—Link sequence number of the advertisement.

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

SPRING Adjacency Labels

Segment routing in networking adjacency labels.

Note:

Displayed only when segment routing is enabled

detail extensive

Label

Segment routing label.

detail extensive

Flags

Segment routing flags. Flags VL indicate value and local.

detail extensive

Sample Output

show ospf neighbor brief

content_copy zoom_out_map
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

content_copy zoom_out_map
user@host> show ospf neighbor detail    
Address          Interface              State     ID               Pri  Dead
10.0.6.60        lt-1/2/0.12            Full      1.1.1.60         128    38
  Area 0.0.0.0, opt 0x52, DR 0.0.0.0, BDR 0.0.0.0
  Up 23:53:47, adjacent 23:53:34
  SPRING Adjacency Labels:

    Label       Flags

    299968      VL      

10.0.10.70       lt-1/2/0.14            Full      1.1.1.70         128    37
  Area 0.0.0.0, opt 0x52, DR 0.0.0.0, BDR 0.0.0.0
  Up 23:53:47, adjacent 23:53:47
  SPRING Adjacency Labels:

     Label       Flags

     299952      VL      

show ospf neighbor extensive

content_copy zoom_out_map
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

Release Information

Command introduced before Junos OS Release 7.4.

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.

footer-navigation