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) route

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
show (ospf | ospf3) route 
<brief | detail | extensive> 
<abr | asbr | extern | inter | intra> 
<destination>
<instance (default | ipv4-multicast |  instance-name)>
<logical-system (default | ipv4-multicast | logical-system-name)>
<network>
<no-backup-coverage>
<realm (ipv4-multicast | ipv4-unicast | ipv6-multicast)>
<router>
<topology  (default | ipv4-multicast | topology-name)>
<transit> 

Syntax (EX Series Switch and QFX Series)

content_copy zoom_out_map
show (ospf | ospf3) route 
<brief | detail | extensive> 
<abr | asbr | extern | inter | intra> 
<destination>
<instance instance-name 
<network>
<no-backup-coverage>
<router>
<topology  (default | ipv4-multicast | topology-name)>
<transit> 

Description

Display the entries in the Open Shortest Path First (OSPF) routing table.

Options

none

Display standard information about all entries in the OSPF routing table for all routing instances and all topologies.

destination

Display routes to the specified IP address (with optional destination prefix length).

brief | detail | extensive

(Optional) Display the specified level of output.

abr

(Optional) Display routes to area border routers.

asbr

(Optional) Display routes to autonomous system border routers.

extern

(Optional) Display external routes.

inter

(Optional) Display interarea routes.

intra

(Optional) Display intra-area routes.

instance (default | ipv4-multicast | instance-name)

(Optional) Display entries for the default routing instance, the IPv4 multicast routing instance, or for the specified routing instance.

logical-system (default | ipv4-multicast | logical-system-name)

(Optional) Perform this operation on the default logical system, the IPv4 multicast logical system, or on a particular logical system.

network

(Optional) Display routes to networks.

no-backup-coverage

(Optional) Display routes with no backup coverage.

realm (ipv4-multicast | ipv4-unicast | ipv6-multicast)

(OSPFv3 only) (Optional) Display entries in the routing table 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.

router

(Optional) Display routes to all routers.

topology (default | ipv4-multicast | topology-name)

(OSPFv2 only) (Optional) Display routes for the default OSPF topology, IPv4 multicast topology, or for a particular topology.

transit

(Optional) (OSPFv3 only) Display OSPFv3 routes to pseudonodes.

Required Privilege Level

view

Output Fields

Table 1 list the output fields for the show (ospf | ospf3) route command. Output fields are listed in the approximate order in which they appear.

Table 1: show (ospf | ospf3) route Output Fields

Field Name

Field Description

Output Level

Topology

Name of the topology.

All levels

Prefix

Destination of the route.

All levels

Path type

How the route was learned:

  • Inter—Interarea route

  • Ext1—External type 1 route

  • Ext2—External type 2 route

  • Intra—Intra-area route

All levels

Route type

The type of routing device from which the route was learned:

  • AS BR—Route to AS border router.

  • Area BR—Route to area border router.

  • Area/AS BR—Route to router that is both an Area BR and AS BR.

  • Network—Network router.

  • Router—Route to a router that is neither an Area BR nor an AS BR.

  • Transit—(OSPFv3 only) Route to a pseudonode representing a transit network, LAN, or nonbroadcast multiaccess (NBMA) link.

  • Discard—Route to a summary discard.

All levels

NH Type

Next-hop type: LSP or IP.

All levels

Metric

Route's metric value.

All levels

NH-interface

(OSPFv3 only) Interface through which the route's next hop is reachable.

All levels

NH-addr

(OSPFv3 only) IPv6 address of the next hop.

All levels

NextHop Interface

(OSPFv2 only) Interface through which the route's next hop is reachable.

All levels

Nexthop addr/label

(OSPFv2 only) If the NH Type is IP, then it is the address of the next hop. If the NH Type is LSP, then it is the name of the label-switched path.

All levels

Area

Area ID of the route.

detail

Origin

Router from which the route was learned.

detail

Type 7

Route was learned through a not-so-stubby area (NSSA) link-state advertisement (LSA).

detail

P-bit

Route was learned through NSSA LSA and the propagate bit was set.

detail

Fwd NZ

Forwarding address is nonzero. Fwd NZ is only displayed if the route is learned through an NSSA LSA.

detail

optional-capability

Optional capabilities propagated in the router LSA. This field is in the output for intra-area router routes only (when Route Type is Area BR, AS BR, Area/AS BR, or Router), not for interarea router routes or network routes. Three bits in this field are defined as follows:

  • 0x4 (V)—Routing device is at the end of a virtual active link.

  • 0x2 (E)—Routing device is an autonomous system boundary router.

  • 0x1 (B)—Routing device is an area border router.

detail

priority

The priority assigned to the prefix:

  • high

  • medium

  • low

Note:

The priority field applies only to routes of type Network.

detail

BGP-ORR Generation-ID

Display the BGP-ORR generation identifier of the main OSPF route. This field is shown only for non-zero values.

extensive

Sample Output

show ospf route

content_copy zoom_out_map
user@host> show ospf route 
Topology default Route Table:

Prefix             Path  Route      NH       Metric NextHop       Nexthop      
                   Type  Type       Type            Interface     Address/LSP
10.1.1.60/32        Intra Network    Spring        6 lt-1/2/0.14   10.0.10.70
                                    Bkup SPRING     lt-1/2/0.12   10.0.6.60
10.1.1.70/32        Intra Network    IP            1 lt-1/2/0.14   10.0.10.70
                                    Bkup LSP                      (null)     
10.1.1.70/32        Intra Network    Spring        1 lt-1/2/0.14   10.0.10.70
                                    Bkup SPRING     lt-1/2/0.12   10.0.6.60
10.1.1.80/32        Intra Network    IP            6 lt-1/2/0.14   10.0.10.70
                                    Bkup IP         lt-1/2/0.12   10.0.6.60
10.1.1.80/32        Intra Network    Spring        6 lt-1/2/0.14   10.0.10.70

802068 (S=0)       Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60
802078 (S=0)       Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60
802088 (S=0)       Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60
802098 (S=0)       Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60
802108 (S=0)       Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60
802118 (S=0)       Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60
802118             Intra Network    Mpls          0 lt-1/2/0.14   10.0.10.70
                                    Bkup MPLS       lt-1/2/0.12   10.0.6.60

show ospf route extensive

content_copy zoom_out_map
user@host> show ospf route extensive
Topology default Route Table:

Prefix             Path  Route      NH       Metric NextHop       Nexthop      
                   Type  Type       Type            Interface     Address/LSP
10.1.1.1            Intra Router     IP          100 ge-0/0/2.0    10.1.1.1
  area 0.0.0.0, origin 10.1.1.1, optional-capability 0x0
10.1.1.1/32         Intra Network    IP          100 ge-0/0/2.0    10.1.1.1
  area 0.0.0.0, origin 10.1.1.1, priority medium  
BGP-ORR generation-id: 1

show ospf3 route

content_copy zoom_out_map
user@host> show ospf3 route   
Prefix               Path   Route       NH   Metric  NextHop       Nexthop      
                     Type   Type        Type         Interface     addr/label
10.255.71.13         Intra  Router      IP        1       
  NH-interface fe-0/0/2.0, NH-addr fe80::290:69ff:fe9b:e002
10.255.71.13;0.0.0.2
10.255.245.1         Intra  Router      IP       40  fxp1.1        192.168.36.17
  area 0.0.0.0, origin 10.255.245.1 optional-capability 0x0,
10.255.245.3         Intra  AS BR       IP        1  fxp2.3        192.168.36.34
  area 0.0.0.0, origin 10.255.245.3 optional-capability 0x0,
10.255.245.1/32      Intra  Network     IP       40  fxp1.1        192.168.36.17
  area 0.0.0.0, origin 10.255.245.1, priority high   
10.255.245.2/32      Intra  Network     IP        0  lo0.0
  area 0.0.0.0, origin 10.255.245.2, priority medium 
10.255.245.3/32      Intra  Network     IP        1  fxp2.3        192.168.36.34
  area 0.0.0.0, origin 10245.3, priority low    
                     Intra  Transit     IP        1       
  NH-interface fe-0/0/2.0
192::168:222:84/126  Intra  Network     IP        1       
  NH-interface fe-0/0/2.0
abcd::71:12/128      Intra  Network     IP        0       
  NH-interface lo0.0
abcd::71:13/128      Intra  Network     LSP       1       
  NH-interface fe-0/0/2.0, NH-addr lsp-cd

show ospf route topology voice

content_copy zoom_out_map
user@host show ospf route topology voice
Topology voice Route Table:                
Prefix             Path   Route       NH   Metric  NextHop       Nexthop
                   Type   Type        Type         Interface     addr/label
10.255.8.2         Intra  Router      IP        1  so-0/2/0.0
10.255.8.3         Intra  Router      IP        2  so-0/2/0.0
10.255.8.1/32      Intra  Network     IP        0  lo0.0
10.255.8.2/32      Intra  Network     IP        1  so-0/2/0.0
10.255.8.3/32      Intra  Network     IP        2  so-0/2/0.0
192.168.8.0/29     Intra  Network     IP        2  so-0/2/0.0
192.168.8.44/30    Intra  Network     IP        2  so-0/2/0.0
192.168.8.46/32    Intra  Network     IP        1  so-0/2/0.0
192.168.8.48/30    Intra  Network     IP        1  so-0/2/1.0
192.168.8.52/30    Intra  Network     IP        2  so-0/2/0.0
192.168.9.44/30    Intra  Network     IP        1  so-0/2/0.0
192.168.9.45/32    Intra  Network     IP        2  so-0/2/0.0

Release Information

Command introduced before Junos OS Release 7.4.

topology option introduced in Junos OS Release 9.0.

realm option introduced in Junos OS Release 9.2.

footer-navigation