Switch User Manual

IP Routing Commands 981
Syntax Description
Default Configuration
This command has no default configuration.
Command Mode
User EXEC, Privileged EXEC modes
User Guidelines
This command has no user guidelines.
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, 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
Parameter Description
ip-address Specifies the network for which the route is to be displayed and
displays the best matching best-route for the address.
mask Subnet mask of the IP address.
prefix-length
Length of prefix, in bits. Must be preceded with a forward slash
(/). (Range: 0-32 bits.)
longer-prefixes Indicates that the
ip-address
and
subnet-mask
pair becomes the
prefix, and the command displays the routes to the addresses
that match that prefix.
protocol
Specifies the protocol that installed the routes. (Range:
connected, ospf, rip static)
2CSPC4.XCT-SWUM2XX1.book Page 981 Monday, October 3, 2011 11:05 AM