show route
Syntax
show route <all> <destination-prefix> <logical-system (all | logical-system-name)> <private> <te-ipv4-prefix-ip te-ipv4-prefix-ip> <te-ipv4-prefix-node-ip te-ipv4-prefix-node-ip> <te-ipv4-prefix-node-iso te-ipv4-prefix-node-iso> <te-ipv6-prefix-ipv6-addr te-ipv6-prefix-ipv6-addr> <te-ipv6-prefix-node-iso te-ipv6-prefix-node-iso> <rib-sharding (main | rib-shard-name)> <validation-statistics>
Syntax (EX Series Switches)
show route <all> <destination-prefix> <private>
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. |
programmed detail |
(Optional) Display API-programmed routes. |
display-client-data |
(Optional) Display client id and cookie information for routes installed by the routing protocol process client applications. |
te-ipv4-prefix-ip te-ipv4-prefix-ip |
(Optional) Display IPv4 address of the traffic-engineering prefix, without the mask length if present in the routing table. |
te-ipv4-prefix-node-ip te-ipv4-prefix-node-ip |
(Optional) Display all prefixes that have
originated from the traffic-engineering node. You
can filter IPv4 node addresses from the
traffic-engineered routes in the
|
te-ipv4-prefix-node-iso te-ipv4-prefix-node-iso |
(Optional) Display all prefixes that have
originated from the traffic-engineering node. You
can filter IPv4 routes with the specified ISO
circuit ID from the |
te-ipv6-prefix-ipv6-addr te-ipv6-prefix-ipv6-addr |
(Optional) Filter IPv6 node addresses from the traffic-engineering IPv6 prefix. |
te-ipv6-prefix-node-iso te-ipv6-prefix-node-iso | (Optional) Filter IPv6 routes with the specified ISO circuit ID in the traffic-engineering IPv6 prefix. |
rib-sharding (main | rib-shard-name) |
(Optional) Display the rib shard name. |
validation-statistics | (Optional) Display per-RIB specific statistics information. |
Required Privilege Level
view
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.
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. |
encapsulated |
Extended next-hop encoding capability enabled for the specified BGP community for routing IPv4 traffic over IPv6 tunnels. When BGP receives routes without the tunnel community, IPv4-0ver IPv6 tunnels are not created and BGP routes are resolved without encapsulation. |
Route Labels |
Stack of labels carried in the BGP route update. |
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 |
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:
|
Private unicast |
(Enhanced subscriber management for MX Series routers) Indicates that an access-internal route is managed by enhanced subscriber management. By contrast, access-internal routes not managed by enhanced subscriber management are displayed with associated next-hop and media access control (MAC) address information. |
balance |
Distribution of the load based on the underlying operational interface bandwidth for equal-cost multipaths (ECMP) across the nexthop gateways in percentages. |
Valid Routes |
Count of valid routes in the local routing information base (RIB). |
Routes invalid due to max-length |
Count of invalid routes due to
|
Routes invalid due to origin-as |
Count of invalid routes due to maximum-length mismatch in the local RIB. |
Unknown routes |
Count of unknown routes in the local RIB. |
Sample Output
- show route
- show route
- show route forwarding-table matching 10.1.1.1
- show route 10.1.1.1 extensive expanded-nh
- show route te-ipv6-prefix-ipv6-addr
- show route te-ipv6-prefix-node-iso
- show route (VPN)
- show route (with Destination Prefix)
- show route destination-prefix detail
- show route extensive
- show route programmed detail
- show route validation-statistics
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
The following sample output shows route hierarchy for translation route.
user@host> show route 10.1.1.1 C1.inet.0: 44 destinations, 44 routes (44 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.1.1.1/32 *[PRPD/10] 00:16:50, metric 2 > to 192.0.2.2 via ge-0/0/1.0
show route forwarding-table matching 10.1.1.1
user@host> show route forwarding-table matching 10.1.1.1 Routing table: C1.inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 10.1.1.1/32 user 0 indr 1048574 4 comp 624 2
show route 10.1.1.1 extensive expanded-nh
user@host> show route 10.1.1.1extensive expanded-nh C1.inet C1.inet.0: 44 destinations, 44 routes (44 active, 0 holddown, 0 hidden) 10.1.1.1/32 (1 entry, 1 announced) Installed-nexthop: Indr (0xc5c207c) ::44.0.0.1 Krt_inh (0xc6fd004) Index:1048574 PNH: ::44.0.0.1 Translate-comp (0xc5c2144) Index:624 v4tov6 src ::22.0.0.1 dest ::44.0.0.1
show route te-ipv6-prefix-ipv6-addr
user@host> show route te-ipv6-prefix-ipv6-addr 10::10 inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden) inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) mpls.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden) inet6.0: 10 destinations, 11 routes (10 active, 0 holddown, 0 hidden) inet6.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) lsdist.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both IPV6 PREFIX { Node { AS:100 ISO:0100.0100.0100.00 } { IPv6:10::10/128 } ISIS-L1:0 }/1216 *[IS-IS/15] 00:07:58 Fictitious
show route te-ipv6-prefix-node-iso
user@host> show route te-ipv6-prefix-node-iso 0100.0100.0100.00 inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden) inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) mpls.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden) inet6.0: 10 destinations, 11 routes (10 active, 0 holddown, 0 hidden) inet6.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) lsdist.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both IPV6 PREFIX { Node { AS:100 ISO:0100.0100.0100.00 } { IPv6:10::10/128 } ISIS-L1:0 }/1216 *[IS-IS/15] 00:08:46 Fictitious IPV6 PREFIX { Node { AS:100 ISO:0100.0100.0100.00 } { IPv6:21:0:1::1/128 } ISIS-L1:0 }/1216 *[IS-IS/15] 00:08:46 Fictitious IPV6 PREFIX { Node { AS:100 ISO:0100.0100.0100.00 } { IPv6:abcd::128:207:200:16/128 } ISIS-L1:0 }/1216 *[IS-IS/15] 00:08:46 Fictitious
show route (VPN)
The following sample output shows a VPN route with composite next
hops enabled. The first Push
operation
corresponds to the outer label. The second
Push
operation corresponds to the
inner label.
user@host> show route 192.0.2.0 13979:665001.inet.0: 871 destinations, 3556 routes (871 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.0.2.0/24 [BGP/170] 00:28:32, localpref 100, from 10.9.9.160 AS path: 13980 ?, validation-state: unverified > to 10.100.0.42 via ae2.0, Push 16, Push 300368(top) [BGP/170] 00:28:28, localpref 100, from 10.9.9.169 AS path: 13980 ?, validation-state: unverified > to 10.100.0.42 via ae2.0, Push 126016, Push 300368(top) #[Multipath/255] 00:28:28, metric2 102 > to 10.100.0.42 via ae2.0, Push 16, Push 300368(top) to 10.100.0.42 via ae2.0, Push 16, Push 300368(top)
show route (with Destination Prefix)
user@host> show route 192.168.0.0/12 inet.0: 10 destinations, 10 routes (9 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 192.168.0.0/12 *[Static/5] 2w4d 12:54:27 > to 192.168.167.254 via fxp0.0
show route destination-prefix detail
user@host> show route 198.51.100.0 detail inet.0: 15 destinations, 20 routes (15 active, 0 holddown, 0 hidden) 198.51.100.0/24 (2 entries, 2 announced) *BGP Preference: 170/-101 ... BGP-Static Preference: 4294967292 Next hop type: Discard Address: 0x9041ae4 Next-hop reference count: 2 State: <NoReadvrt Int Ext AlwaysFlash> Inactive reason: Route Preference Local AS: 200 Age: 4d 1:40:40 Validation State: unverified Task: RT Announcement bits (1): 2-BGP_RT_Background AS path: 4 5 6 I
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 203.0.113.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: 64510 Peer AS: 64511 Age: 3 Metric2: 1 Validation State: unverified Task: BGP_64510.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:64502:100 encapsulation:0L:14 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
show route programmed detail
user@host> show route programmed detail inet.0: 36 destinations, 37 routes (36 active, 0 holddown, 0 hidden) 100.75.1.0/27 (2 entries, 1 announced) *Static Preference: 5/100 Next hop type: Router, Next hop index: 0 Address: 0xcc38a10 Next-hop reference count: 1 Next hop: 100.30.1.2 via ge-0/0/2.0 weight 0x1, selected Session Id: 0x0 Next hop: via fti0.1001 weight 0x8001 Session Id: 0x0 State: <Active Int NSR-incapable Programmed> Age: 37 Validation State: unverified Announcement bits (1): 0-KRT AS path: I
show route validation-statistics
user@host> show route validation-statistics Valid Routes: 432 Routes invalid due to max-length: 646 Routes invalid due to origin-as: 21 Unknown routes: 5353
Release Information
Command introduced before Junos OS Release 7.4.
Option private
introduced in Junos OS Release 9.5.
Option private
introduced in Junos OS Release 9.5
for EX Series switches.
Option display-client-data
introduced in Junos OS
Release 16.2R1 on MX80, MX104, MX240, MX480, MX960, MX2010, MX2020,
vMX Series routers.
Options te-ipv4-prefix-ip
, te-ipv4-prefix-node-ip
, and te-ipv4-prefix-node-iso
introduced in Junos OS Release 17.2R1
on MX Series and PTX Series.
rib-sharding
option introduced in cRPD Release 20.1R1.