Supported Platforms
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- Example: Configuring RIP
- ACX, M, MX, PTX, T Series
- Example: Configuring RIPng
- ACX, J, M, MX, SRX, T Series
- Example: Configuring IS-IS
- ACX, M, MX, T Series
- Examples: Configuring Internal BGP Peering
- Examples: Configuring External BGP Peering
- Examples: Configuring OSPF Routing Policy
show route
Syntax
Syntax (EX Series Switches)
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
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- Example: Configuring RIP
- ACX, M, MX, PTX, T Series
- Example: Configuring RIPng
- ACX, J, M, MX, SRX, T Series
- Example: Configuring IS-IS
- ACX, M, MX, T Series
- Examples: Configuring Internal BGP Peering
- Examples: Configuring External BGP Peering
- Examples: Configuring OSPF Routing Policy
List of Sample Output
show routeshow 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:
|
destination-prefix | Route destination (for example:10.0.0.1/24). Sometimes the route information is presented in another format, such as:
|
[ protocol, preference ] | Protocol from which the route was learned and the preference value for 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:
When AS path numbers are included in the route, the format is as follows:
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:
|
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:
|
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
Supported Platforms
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- Example: Configuring RIP
- ACX, M, MX, PTX, T Series
- Example: Configuring RIPng
- ACX, J, M, MX, SRX, T Series
- Example: Configuring IS-IS
- ACX, M, MX, T Series
- Examples: Configuring Internal BGP Peering
- Examples: Configuring External BGP Peering
- Examples: Configuring OSPF Routing Policy