#show ip route

show ip route


Displays the entire IP route table, a summary of the routing table or route information for specific IP addresses, network masks or protocols.
Syntax: show ip route [[ipAddress [mask]] [bgp | connected | mpls [ipAddress] [ipAddress/PrefLen] [ipAddress mask] [detail] | isis | ospf | static | summary | multicast |unicast]

ipAddress
Specify an IP address for the IP routes to display.
mask
Specify an IP address mask for the specified IP address.
PrefLen
Specify a Prefix Length for the specified IP address. Valid values = 0 - 31.
Description: Use the show ip route command with no arguments to display all IP routes.
Use the show ip route command with the address argument to display routes to a specific IP address.
Use the show ip route command with the mask argument to display routes with a specific network mask.
Use the show ip route command with the bgp, isis, ospf keyword to display summary information about all routes for the specified protocol.
Use the show ip route multicast command to display active routes used by Multicast protocols.
Use the show ip route unicast command to display active routes used for unicast forwarding.
Use the show ip route connected command to display summary information about all directly connected routes.
Use the show ip route mpls command to display all tunnel related route statistics.
use the show ip route mpls detail to display detailed information of all the tunnels by which each route/prefix is reachable. The detail keyword can optionally be used with all ipAddress variants of mpls.
Use the show ip route static command to display summary information about all statically configured routes.
Use the show ip route summary command to display summary information about all IP routes.
Factory Default: None.
Command Mode: Executive and privileged.
Example 1: In the following example, the show ip route command with no arguments displays all routes:


router>show ip route

Codes: C - connected O - OSPF i - IS-IS

S - static UD - Up/Down bit 1 L1 - level-1

B - BGP E1 - external type 1 L2 - level-2

M - MPLS E2 - external type 2

* - candidate default

m - route's metric

d - administrative distance

S * 0.0.0.0/0 via 10.200.0.1 [d:1 m:0]

S 9.9.9.9/32 via 127.0.0.1 [d:1 m:0]

C 10.200.0.0/16 directly connected to Ethernet 0

i UD 12.2.41.19/32 via 55.55.55.1 [d:115 m:35]

i UD 12.2.41.20/32 via 55.55.55.1 [d:115 m:35]

i UD 12.2.41.21/32 via 55.55.55.1 [d:115 m:35]

i UD 12.2.41.22/32 via 55.55.55.1 [d:115 m:35]

i UD 12.2.41.23/32 via 55.55.55.1 [d:115 m:35]

.

.

.

C 55.55.55.0/24 directly connected to GBE 1/19/2

C 55.55.55.3/32 directly connected to Null 0

S 127.0.0.0/8 via 127.0.0.1 [d:0 m:0]

C 127.0.0.1/32 directly connected to Null 0

i L1 191.191.191.191/32 via 55.55.55.1 [d:115 m:28]

i L1 191.194.1.0/24 via 55.55.55.1 [d:115 m:28]

C 193.193.193.193/32 directly connected to Loopback 0

i L1 194.10.1.0/24 via 55.55.55.1 [d:115 m:28]

C 194.10.2.0/24 directly connected to POS 1/14/2

C 194.10.2.1/32 directly connected to POS 1/14/2

C 194.10.2.2/32 directly connected to Null 0

S 200.1.1.0/24 via 127.0.0.1 [d:1 m:0]

S 200.1.2.0/24 via 127.0.0.1 [d:1 m:0]

S 200.1.3.0/24 via 127.0.0.1 [d:1 m:0]

.

.

.



The following table describes the fields displayed by the show ip route command.

Table 1-8. Fields Displayed by show ip route 
Field Description
connected
Specifies the route was learned as a result of configuring the interface.
static
Specifies the route was explicitly configured using the ip route command.
BGP
Specifies the route was received from BGP protocol advertisements.
MPLS
Specifies this route carries MPLS data.
external type 1
Specifies the route was imported into the OSPF area from an Autonomous System Boundary Router (ASBR). Further, this route used the cost associated with the link between the ASBR and this router as part of the cost of the route.
external type 2
Specifies the route was imported into the OSPF area from an Autonomous System Boundary Router (ASBR). Further, this route does not use the cost associated with the link between the ASBR and this router as part of the cost of the route.
isis
Specifies this route was received from IS-IS protocol advertisements.
N.N.N.N/nn
Network address and mask of the remote network.
via N.N.N.N
Indicates the next router in the remote network.
directly connected to
Indicates the network is directly connected to a local interface.
UD
Indicates the Up/Down bit is set and that the route was leaked from L2 into L1.
d:
The administrative distance assigned to this route.
m:
The metric assigned to this route.
Example 2: In the following example, the show ip route static command displays information about statically configured routes:


router>show ip route static

S 0.0.0.0/0 via 10.5.0.1 [w:1 m:0]

S 127.0.0.0/8 via 127.0.0.1 [w:0 m:0]

S 131.1.1.0/24 via 127.0.0.1 [w:1 m:0]

S 131.1.2.0/24 via 127.0.0.1 [w:1 m:0]

S 131.1.3.0/24 via 127.0.0.1 [w:1 m:0]

S 131.1.4.0/24 via 127.0.0.1 [w:1 m:0]

Example 3: In the following example, the show ip route summary command displays summary information about all IP routes:


router#show ip route summary



Route source Networks

connected 12

static 2

bgp 100654

ospf intra-area 1785

total 102453

The following table defines the fields displayed in the show ip route summary command:

Table 1-9. Fields Displayed by show ip route summary 
Field Description
connected
These routes were learned as a result of configuring the interface
kernel
These routes were in the kernel before the routing task started running.
static
The number of routes that were explicitly configured using the ip route command.
bgp
The number of routes received from BGP protocol advertisements.
ospf intra-area
The number of routes learned from within this area.
ospf inter-area
The number of routes received from other OSPF areas.
ospf external-1
These routes were imported into the OSPF area from an Autonomous System Boundary Router (ASBR). Further, these routes use the cost associated with the link between the ASBR and this router as part of the cost of the route.
ospf external-2
These routes were imported into the OSPF area from an Autonomous System Boundary Router (ASBR). Further, these routes do not use the cost associated with the link between the ASBR and this router as part of the cost of the route.
isis
The number of routes received from IS-IS protocol advertisements.
total
The total number of routes in the IP route table.
Related Commands: ip address
ip route