show ip route

Use this command to display information about IP routes.

Syntax

show ip route [host {[connected] | [host-address] | [dynamic] | [static}] [address-or-prefix {[prefix-mask {[longer-prefixes]}] [prefix/length {[longer-prefixes]}][connected] | [ospf] | [bgp] | [isis] | [rip] | [static] | [summary] [topology topology-name]

Parameters

host (Optional) Displays routes configured on the host stack.
address-or-prefix (Optional) Specifies whether following is destination address or subnet prefix.
dest-address [prefix-mask] (Optional) Converts the specified destination address and optional mask into a prefix and displays any routes that match the prefix.
prefix/prefix-length (Optional) Displays any routes that match the specified prefix and prefix-length.
longer-prefixes (Optional) Displays all routes that match the specified prefix and length.
connected (Optional) Displays directly connected routes.
host-address (Optional) Displays host interface addresses.
dynamic (Optional) Displays dynamic routes learned via protocols.
ospf (Optional) Displays routes configured for the OSPF routing protocol. For details on configuring OSPF, refer to the S-, K-, and 7100 Series Configuration Guide.
bgp (Optional) Displays routes configured for the BGP routing protocol. For details on configuring BGP, refer to the S-, K-, and 7100 Series Configuration Guide (S-, 7100-Series).
isis (Optional) Displays routes configured for the ISIS routing protocol. For details on configuring ISIS, refer to the S-, K-, and 7100 Series Configuration Guide.
rip (Optional) Displays routes configured for the RIP routing protocol. For details on configuring RIP, refer to the S-, K-, and 7100 Series Configuration Guide.
static (Optional) Displays static routes.
summary (Optional) Displays a summary of the IP routing table.
topology <topology-name> (Optional) Displays routes for the specified topology.

Defaults

  • If no parameters are specified, all IP route information is displayed.
  • If the optional prefix-mask is not specified, routes for the specified destination address are displayed.

Mode

All command modes.

Usage

Routes are managed by the RTM (Route Table Manager), and are contained in the RIB (Route Information Base). This database contains all the active static routes, all the RIP routes, and up to eight best routes to each network as determined by OSPF.

To display entries in an IPv4 multicast topology routing table, use the show ip route command with the topology option.

The RTM selects up to eight of the best routes to each network and installs these routes in the FIB (Forwarding Information Base). The routes in the FIB are distributed to every module for use by the router's ingress module as frames are received.

Examples

This example shows how to display IP connected route information:

System(rw)->show ip route connected
IP Route Table for VRF default
Codes: C-connected, S-static, R-RIP, B-BGP, O-OSPF, IA-OSPF interarea
       N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2
       E1-OSPF external type 1, E2-0SPF external type 2
C      1.0.0.0/30          [0/0]   direct  1.0.0.1          loop.0.20           4h47m58s
C      1.1.1.0/25          [0/0]   direct  1.1.1.1          vlan.0.1000         4h47m07s
C      10.1.128.0/17       [0/0]   direct  10.1.130.10      vlan.0.128          4h47m06s
C      20.1.0.0/25         [0/0]   direct  20.1.0.1         vlan.0.20           4h47m03s
C      20.1.0.128/25       [0/0]   direct  20.1.0.129       vlan.0.21           4h47m03s
.
.
.
C      200.0.1.128/26      [0/0]  direct  200.0.1.129      vlan.0.437          4h47m08s
C      200.0.1.192/26      [0/0]  direct  200.0.1.193      vlan.0.837          4h47m08s
Number of routes = 18
System(rw)->

The following command displays routes configured on the host stack:

System(rw)->show ip route host
Host IP Route Table for VRF default
Codes: C-connected, D-dynamic, H-host, S-static
       *-no forwarding interface
S*     0.0.0.0/0                10.21.128.1         vlan.0.1
HS*    10.10.10.5               10.20.10.1          vlan.0.1
C*     10.21.128.0/17           10.21.130.59        vlan.0.1
H      10.21.130.59             10.21.130.59        lo.0.1
H      127.0.0.1                127.0.0.1           lo.0.1
H      127.0.2.1                127.0.2.1           lo.0.1
Number of routes = 6
System(rw)->