show ip route

Displays IP route information for IPv4 interfaces.

Syntax

show ip route [ vrf vrf-name ]
show ip route A.B.C.D [ vrf vrf-name ]
show ip route A.B.C.D/M [ longer ] [ vrf vrf-name ]
show ip route all [ vrf vrf-name ]
show ip route bgp [ vrf vrf-name ]
show ip route brief [ vrf vrf-name ]
show ip route connected [ vrf vrf-name ]
show ip route import [ src-vrf-name ] [ vrf vrf-name ]
show ip route isis
show ip route nexthop [ nexthopID [ ref-routes ] ] [ vrf vrf-name ]
show ip route ospf [ vrf vrf-name ]
show ip route[ slot line-card-number ]
show ip route static [ vrf vrf-name ]
show ip route summary [ vrf vrf-name ]
show ip route system-summary

Parameters

vrf vrf-name
Specifies routes for a selected VRF instance.
A.B.C.D/M
Specifies the IPv4 address and optional mask.
longer
Specifies routes that match the specified prefix.
all
Specifies information for all configured IPv4 routes.
bgp
Specifies BGP route information.
brief
Specifies the display of summary route information.
vrf vrf-name
Specifies a VRF instance.
connected
Specifies directly connected routes, such as local Layer 3 interfaces.
import
Specifies imported IPv4 routes.
src-vrf-name
Specifies a VRF instance from which routes are leaked.
isis
Specifies routes learned from the Intermediate System to Intermediate System (IS-IS) protocol.
nexthop
Specifies the configured next hop.
nexthopID
Valid values range from 0 through 4294967294.
ref-routes
Specifies all routes that point to the specified next-hop ID .
ospf
Specifies routes learned from the Open Shortest Path First (OSPF) protocol.
slot line-card-number
Specifies routes with the provided line card number.
static
Specifies configured static routes.
summary
Specifies summary information for all routes.
system-summary
Specifies a system-level routing summary.

Modes

Privileged EXEC mode

Usage Guidelines

IS-IS is supported on the Extreme 8820, SLX 9740, SLX 9640, and SLX 9540 devices only.

If leaked subnet routes are present, that information displays in the output.

To view the status of management routes, use the show ip route vrf command and enter mgmt-vrf as follows. You must enter the name of the management VRF manually. Example output is shown below.
device# show ip route vrf mgmt-vrf
IP Routing Table for VRF "mgmt-vrf"
Total number of IP routes: 3
'*' denotes best ucast next-hop
'[x/y]' denotes [preference/metric]

0.0.0.0/0
    *via 10.25.96.1, mgmt 1, [1/1], 8d15h, static, tag 0
10.25.96.0/22, attached
    *via DIRECT, mgmt 1, [0/0], 8d15h, direct, tag 0
10.25.96.38/32, attached
    *via DIRECT, mgmt 1, [0/0], 8d15h, local, tag 0

Examples

The following example displays output for the system-summary option.

device# show ip route system-summary
System Route Count: 3 Max routes: 4096 (Route limit not exceeded)
System Nexthop Count: 2 Max nexthops: 1024 (Nexthop limit not exceeded)

VRF-Name: default-vrf
  Route count: 0 Max routes: Not Set (Route limit not exceeded)
  0 connected, 0 static, 0 RIP, 0 OSPF, 0 BGP, 0 ISIS, 0 unnumbered

VRF-Name: mgmt-vrf
  Route count: 3 Max routes: Not Set (Route limit not exceeded)
  1 connected, 1 static, 0 RIP, 0 OSPF, 0 BGP, 0 ISIS, 0 unnumbered 

The following example displays output for the connected option.

device# show ip route connected
 Type Codes - B:BGP D:Connected I:ISIS O:OSPF R:RIP S:Static; Cost - Dist/Metric
BGP  Codes - i:iBGP e:eBGP
ISIS Codes - L1:Level-1 L2:Level-2
OSPF Codes - i:Inter Area 1:External Type 1 2:External Type 2 s:Sham Link
        Destination        Gateway         Port        Cost          Type Uptime
1       1.1.1.0/24         DIRECT          Te 2/1      0/0           D    4m33s 
2       1.1.2.0/24         DIRECT          Te 2/2      0/0           D    2m42s 

The following example displays output for the summary option.

device# show ip route summary   
IP Routing Table - 7 entries:
  8 direct, 0 static, 0 RIP, 0 OSPF, 8 BGP, 0 ISIS, 80 EVPN Host
  Number of prefixes:
  /24: 7 
Nexthop Table Entry - 4 entries

The following example displays output for the nexthop option.

device# show ip route nexthop
 Total number of IP nexthop entries: 4; Forwarding Use: 4
       NextHopIp        Port             RefCount      ID          Age
1      1.1.1.2          Te 2/1           3/3           2147549184 277      
2      0.0.0.0          Te 2/2           1/1           2147484008 191      
3      0.0.0.0          Te 2/1           2/2           2147484009 302      
4      1.1.1.2          Te 2/1           1/1           2147549185 190      
       1.1.2.2          Te 2/2

The following example displays output for a specific next-hop ID option.

device# show ip route nexthop 2147549184
       NextHopIp        Port             RefCount      ID          Age
1      1.1.1.2          Te 2/1           3/3           2147549184 288

The following example displays output for the ref-routes option.

device# show ip route nexthop 2147549184 ref-routes 
Type Codes - B:BGP D:Connected I:ISIS O:OSPF R:RIP S:Static; Cost - Dist/Metric
BGP  Codes - i:iBGP e:eBGP
ISIS Codes - L1:Level-1 L2:Level-2
OSPF Codes - i:Inter Area 1:External Type 1 2:External Type 2 s:Sham Link
        Destination        Gateway         Port        Cost          Type Uptime
1       100.1.1.0/24       1.1.1.2         Te 2/1      1/1           S    5m10s 
2       100.1.2.0/24       1.1.1.2         Te 2/1      1/1           S    4m54s 
3       100.1.3.0/24       1.1.1.2         Te 2/1      1

The following example displays output for a specific IP address.

device# show ip route 100.1.1.1 
Type Codes - B:BGP D:Connected I:ISIS O:OSPF R:RIP S:Static; Cost - Dist/Metric
BGP  Codes - i:iBGP e:eBGP
ISIS Codes - L1:Level-1 L2:Level-2
OSPF Codes - i:Inter Area 1:External Type 1 2:External Type 2 s:Sham Link
        Destination        Gateway         Port        Cost          Type Uptime
4       100.1.1.0/24       1.1.1.2         Te 2/1      1/1           S    5m37s 

The following example displays output for the longer option.

device# show ip route 100.0.0.0/8 longer
1       100.1.1.0/24       1.1.1.2         Te 2/1      1/1           S    14m37s
2       100.1.2.0/24       1.1.1.2         Te 2/1      1/1           S    14m21s
3       100.1.3.0/24       1.1.1.2         Te 2/1      1/1           S    14m18s
4       100.2.1.0/24       DIRECT          Te 2/1      1/1           S    14m2s 
5       100.3.1.0/24       1.1.1.2         Te 2/1      1/1           S    13m10s
        100.3.1.0/24       1.1.2.2         Te 2/2      1/1           S    13m10s