show route
Syntax
Syntax (EX Series Switch)
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 routeshow 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:
|
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 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:
|
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:
|
Sample Output
show route
user@host> show routeinet.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
