show ip route

Syntax

show ip route [<A.B.C.D> | <A.B.C.D/M> | all-vrfs | bgp | connected | local | ospf | static | summary | 
     vrf<vrf-name>] [vsx-peer]

Description

Displays IPv4 route tables.

Command context

Operator (>) or Manager (#)

Parameters

<A.B.C.D>

Display longest prefix match.

<A.B.C.D/M>

Display exact route match.

all-vrfs

Display information for all VRFs.

bgp

Display bgp routes only.

connected

Display connected routes only.

local

Display local routes only.

ospf

Display ospf routes only.

static

Display static routes only.

summary

Display the aggregate count of routes per routing protocol.

vrf <vrf-name>

Specify a VRF by VRF name (if no <VRF-NAME> is specified, the default VRF is implied.

[vsx-peer]

Shows the output from the VSX peer switch. If the switches do not have the VSX configuration or the ISL is down, the output from the VSX peer switch is not displayed.

Authority

Operators or Administrators. Users without administrator authority can execute this command from the operator context (>) only.

Examples

Showing IPv4 route tables:

switch# show ip route

Displaying ipv4 routes selected for forwarding

'[x/y]' denotes [distance/metric]

10.0.0.0/24,  1 (null) next-hops
        via  10.0.0.1,  [0/0],  connected
20.0.0.0/24,  1 unicast next-hops
        via  10.0.0.2,  [1/0],  static
20.0.1.0/24,  1 unicast next-hops
        via  10.0.0.2,  [3/0],  static
20.0.2.0/24,  1 unicast next-hops
        via  1/1/1,  [1/0],  static
20.0.3.0/24,  1 unicast next-hops
        via  1/1/1,  [4/0],  static
20.0.4.0/24, blackhole, 1, [1/0], static
20.0.5.0/24, reject, 1, [1/0], static

Showing IPv4 route tables for the test VRF:

switch# show ip route vrf test

Displaying ipv4 routes selected for forwarding

'[x/y]' denotes [distance/metric]

30.0.0.0/24,  1 (null) next-hops
        via  30.0.0.2,  [0/0],  connected
90.0.0.0/24,  1 unicast next-hops
        via  30.0.0.1,  [1/0],  static
90.0.1.0/24,  1 unicast next-hops
        via  1/1/2,  [1/0],  static
90.0.3.0/24, blackhole, 1, [1/0], static