Administrator Guide

Layer 3 Routing Commands 1586
Default Configuration
This command has no default configuration.
Command Mode
User EXEC, Privileged EXEC modes, Configuration mode and all
Configuration submodes
User Guidelines
The VRF identified in the parameter must have been previously created or an
error is returned.
The VRF parameter is only available on the N3000/N4000 series switches.
If the subnet mask is specified, then only routes with an exact match are
displayed. For example:
show ip route 192.168.2.0 /24
If only an IP address is specified, the best route for the IP address is displayed.
For example:
show ip route 192.168.2.0
If the longer-prefixes option is specified, then the subnets within an
aggregate are displayed. For example:
show ip route 192.168.2.0 /23 longer-prefixes
The numbers in the brackets indicate the route preference (administrative
distance) and metric respectively. The metric is specific to the originating
protocol. Connected routes have a preference of 0 and static routes have a
preference of 1.
Example
The following example displays the IPv4 address of the default gateway and
the default route associated with the gateway.
console#show ip route
Route Codes: R - RIP Derived, O - OSPF Derived, C - Connected, S - Static
B - BGP Derived, E - Externally Derived, IA - OSPF Inter Area
E1 - OSPF External Type 1, E2 - OSPF External Type 2
N1 - OSPF NSSA External Type 1, N2 - OSPF NSSA External Type 2
S U - Unnumbered Peer, L - Leaked Route
* Indicates the best (lowest metric) route for the subnet.
C 3.0.0.0/24 [0/0] directly connected, Vl10
2CSNXXX_SWUM204.book Page 1586 Monday, January 25, 2016 1:25 PM