Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

show route

Syntax

show route<all><destination-prefix><logical-system (all | logical-system-name)><private>

Syntax (EX Series Switches)

show route<all><destination-prefix><private>

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Option private introduced in Junos OS Release 9.5.

Option private introduced in Junos OS Release 9.5 for EX Series switches.

Description

Display the active entries in the routing tables.

Options

none

Display brief information about all active entries in the routing tables.

all

(Optional) Display information about all routing tables, including private, or internal, routing tables.

destination-prefix

(Optional) Display active entries for the specified address or range of addresses.

logical-system (all | logical-system-name)

(Optional) Perform this operation on all logical systems or on a particular logical system.

private

(Optional) Display information only about all private, or internal, routing tables.

Required Privilege Level

view

List of Sample Output

show route
show route destination-prefix
show route extensive

Output Fields

Table 1 describes the output fields for the show route command. Output fields are listed in the approximate order in which they appear.

Table 1: show route Output Fields

Field Name

Field Description

routing-table-name

Name of the routing table (for example, inet.0).

number destinations

Number of destinations for which there are routes in the routing table.

number routes

Number of routes in the routing table and total number of routes in the following states:

  • active (routes that are active).
  • holddown (routes that are in the pending state before being declared inactive). A holddown route was once the active route and is no longer the active route. The route is in the holddown state because a protocol still has interest in the route, meaning that the interest bit is set. A protocol might have its interest bit set on the previously active route because the protocol is still advertising the route. The route will be deleted after all protocols withdraw their advertisement of the route and remove their interest bit. A persistent holddown state often means that the interested protocol is not releasing its interest bit properly.

    However, if you have configured advertisement of multiple routes (with the add-path or advertise-inactive statement), the holddown bit is most likely set because BGP is advertising the route as an active route. In this case, you can ignore the holddown state because nothing is wrong.

  • hidden (routes that are not used because of a routing policy).

destination-prefix

Route destination (for example:10.0.0.1/24). Sometimes the route information is presented in another format, such as:

  • MPLS-label (for example, 80001).
  • interface-name (for example, ge-1/0/2).
  • neighbor-address:control-word-status:encapsulation type:vc-id :source (Layer 2 circuit only. For example, 10.1.1.195:NoCtrlWord:1:1:Local/96):
    • neighbor-address—Address of the neighbor.
    • control-word-status—Whether the use of the control word has been negotiated for this virtual circuit: NoCtrlWord or CtrlWord.
    • encapsulation type—Type of encapsulation, represented by a number: (1) Frame Relay DLCI, (2) ATM AAL5 VCC transport, (3) ATM transparent cell transport, (4) Ethernet, (5) VLAN Ethernet, (6) HDLC, (7) PPP, (8) ATM VCC cell transport, (10) ATM VPC cell transport.
    • vc-id—Virtual circuit identifier.
    • source—Source of the advertisement: Local or Remote.

[ protocol, preference ]

Protocol from which the route was learned and the preference value for the route.

  • +—A plus sign indicates the active route, which is the route installed from the routing table into the forwarding table.
  • - —A hyphen indicates the last active route.
  • *—An asterisk indicates that the route is both the active and the last active route. An asterisk before a to line indicates the best subpath to the route.

In every routing metric except for the BGP LocalPref attribute, a lesser value is preferred. In order to use common comparison routines, Junos OS stores the 1's complement of the LocalPref value in the Preference2 field. For example, if the LocalPref value for Route 1 is 100, the Preference2 value is -101. If the LocalPref value for Route 2 is 155, the Preference2 value is -156. Route 2 is preferred because it has a higher LocalPref value and a lower Preference2 value.

weeks:days hours:minutes:seconds

How long the route been known (for example, 2w4d 13:11:14, or 2 weeks, 4 days, 13 hours, 11 minutes, and 14 seconds).

metric

Cost value of the indicated route. For routes within an AS, the cost is determined by the IGP and the individual protocol metrics. For external routes, destinations, or routing domains, the cost is determined by a preference value.

localpref

Local preference value included in the route.

from

Interface from which the route was received.

AS path

AS path through which the route was learned. The letters at the end of the AS path indicate the path origin, providing an indication of the state of the route at the point at which the AS path originated:

  • I—IGP.
  • E—EGP.
  • ?—Incomplete; typically, the AS path was aggregated.

When AS path numbers are included in the route, the format is as follows:

  • [ ]—Brackets enclose the local AS number associated with the AS path if more than one AS number is configured on the routing device, or if AS path prepending is configured.
  • { }—Braces enclose AS sets, which are groups of AS numbers in which the order does not matter. A set commonly results from route aggregation. The numbers in each AS set are displayed in ascending order.
  • ( )—Parentheses enclose a confederation.
  • ( [ ] )—Parentheses and brackets enclose a confederation set.

Note: In Junos OS Release 10.3 and later, the AS path field displays an unrecognized attribute and associated hexadecimal value if BGP receives attribute 128 (attribute set) and you have not configured an independent domain in any routing instance.

validation-state

(BGP-learned routes) Validation status of the route:

  • Invalid—Indicates that the prefix is found, but either the corresponding AS received from the EBGP peer is not the AS that appears in the database, or the prefix length in the BGP update message is longer than the maximum length permitted in the database.
  • Unknown—Indicates that the prefix is not among the prefixes or prefix ranges in the database.
  • Valid—Indicates that the prefix and autonomous system pair are found in the database.

to

Next hop to the destination. An angle bracket (>) indicates that the route is the selected route.

If the destination is Discard, traffic is dropped.

via

Interface used to reach the next hop. If there is more than one interface available to the next hop, the interface that is actually used is followed by the word Selected. This field can also contain the following information:

  • Weight—Value used to distinguish primary, secondary, and fast reroute backup routes. Weight information is available when MPLS label-switched path (LSP) link protection, node-link protection, or fast reroute is enabled, or when the standby state is enabled for secondary paths. A lower weight value is preferred. Among routes with the same weight value, load balancing is possible.
  • Balance—Balance coefficient indicating how traffic of unequal cost is distributed among next hops when a routing device is performing unequal-cost load balancing. This information is available when you enable BGP multipath load balancing.
  • lsp-path-name—Name of the LSP used to reach the next hop.
  • label-action—MPLS label and operation occurring at the next hop. The operation can be pop (where a label is removed from the top of the stack), push (where another label is added to the label stack), or swap (where a label is replaced by another label).

Sample Output

show route

user@host> show route
inet.0: 11 destinations, 12 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1:65500:1:10.0.0.20/240               
                   *[MVPN/70] 19:53:41, metric2 1
                      Indirect
1:65500:1:10.0.0.40/240               
                   *[BGP/170] 19:53:29, localpref 100, from 10.0.0.30
                      AS path: I
                    > to 10.0.24.4 via lt-0/3/0.24, label-switched-path toD
                    [BGP/170] 19:53:26, localpref 100, from 10.0.0.33
                      AS path: I
                    > to 10.0.24.4 via lt-0/3/0.24, label-switched-path toD
1:65500:1:10.0.0.60/240               
                   *[BGP/170] 19:53:29, localpref 100, from 10.0.0.30
                      AS path: I
                    > to 10.0.28.8 via lt-0/3/0.28, label-switched-path toF
                    [BGP/170] 19:53:25, localpref 100, from 10.0.0.33
                      AS path: I
                    > to 10.0.28.8 via lt-0/3/0.28, label-switched-path toF

show route destination-prefix

user@host> show route 172.16.0.0/12
inet.0: 10 destinations, 10 routes (9 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.0.0/12      *[Static/5] 2w4d 12:54:27
                    > to 192.168.167.254 via fxp0.0

show route extensive

user@host> show route extensive
v1.mvpn.0: 5 destinations, 8 routes (5 active, 1 holddown, 0 hidden)
1:65500:1:10.0.0.40/240 (1 entry, 1 announced)
    *BGP   Preference: 170/-101
           PMSI: Flags 0x0: Label[0:0:0]: PIM-SM: Sender 10.0.0.40 Group 225.1.1.1
           Next hop type: Indirect
           Address: 0x92455b8
           Next-hop reference count: 2
           Source: 10.0.0.30
           Protocol next hop: 10.0.0.40
           Indirect next hop: 2 no-forward
           State: <Active Int Ext>
                				 Local AS: 65500 Peer AS: 65500
           Age: 3  Metric2: 1
           Task: BGP_65500.10.0.0.30+179
           Announcement bits (2): 0-PIM.v1 1-mvpn global task
           AS path: I (Originator) Cluster list:  10.0.0.30
           AS path:  Originator ID: 10.0.0.40
           Communities: target:65520:100
           Import Accepted
           Localpref: 100
           Router ID: 10.0.0.30
           Primary Routing Table bgp.mvpn.0
           Indirect next hops: 1
                Protocol next hop: 10.0.0.40 Metric: 1
                Indirect next hop: 2 no-forward
                Indirect path forwarding next hops: 1
                      Next hop type: Router
                      Next hop: 10.0.24.4 via lt-0/3/0.24 weight 0x1
                10.0.0.40/32 Originating RIB: inet.3
                      Metric: 1                       Node path count: 1
                      Forwarding nexthops: 1
                         Nexthop: 10.0.24.4 via lt-0/3/0.24

Published: 2013-08-15