Technical Documentation

show route

Syntax

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

Syntax (EX Series Switch)

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.

private option introduced in Junos OS Release 9.5.

private option 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

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).
  • 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 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.

to

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

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 Multiprotocol Label Switching (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 Border Gateway Protocol (BGP) multipath load balancing.
  • lsp-path-name—Name of the label-switched path (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: 10 destinations, 10 routes (9 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0          *[Static/5] 1w5d 20:30:29
                      Discard
10.255.245.51/32   *[Direct/0] 2w4d 13:11:14
                    > via lo0.0
172.16.0.0/12      *[Static/5] 2w4d 13:11:14
                    > to 192.168.167.254 via fxp0.0
192.168.0.0/18     *[Static/5] 1w5d 20:30:29
                    > to 192.168.167.254 via fxp0.0
192.168.40.0/22    *[Static/5] 2w4d 13:11:14
                    > to 192.168.167.254 via fxp0.0
192.168.64.0/18    *[Static/5] 2w4d 13:11:14
                    > to 192.168.167.254 via fxp0.0
192.168.164.0/22   *[Direct/0] 2w4d 13:11:14
                    > via fxp0.0
192.168.164.51/32  *[Local/0] 2w4d 13:11:14
                      Local via fxp0.0
207.17.136.192/32  *[Static/5] 2w4d 13:11:14
                    > to 192.168.167.254 via fxp0.0

green.inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
100.101.0.0/16     *[Direct/0] 1w5d 20:30:28
                    > via fe-0/0/3.0
100.101.2.3/32     *[Local/0] 1w5d 20:30:28
                      Local via fe-0/0/3.0
224.0.0.5/32       *[OSPF/10] 1w5d 20:30:29, metric 1
                      MultiRecv

red.inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.10/32     *[Direct/0] 01:08:46
                    > via lo0.1
10.255.245.212/32  *[BGP/170] 00:01:40, localpref 100, from 10.255.245.204
                      AS path: 300 I
                    > to 100.1.2.2 via ge-1/1/0.0, label-switched-path to_fix
10.255.245.213/32  *[BGP/170] 00:40:47, localpref 100
                      AS path: 100 I
                    > to 100.1.1.1 via so-0/0/1.0

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

Published: 2010-07-13

Help
|
My Account
|
Log Out