5 ip route, 6 show ip route – CANOGA PERKINS 9175 Command Reference User Manual
Page 186
CanogaOS Command Reference
12-4
12.5 ip route
To establish static routes, use the ip route command in global configuration mode. To remove static
routes, use the no form of this command.
Command Syntax
ip route [vrf name] {prefix mask | prefix/prefix-length} ip-address [distance]
vrf name
VRF
instance
name.
prefix
IP route prefix for the destination.
mask
Prefix mask for the destination.
prefix-length
Prefix length for the destination.
ip-address
IP address of the next hop that can be used to reach that network.
distance
(Optional) An administrative distance. The default administrative distance
for a static route is 1.
Command Mode
Privileged EXEC
Default
No static routes are established.
Usage
The establishment of a static route is appropriate when the switch cannot dynamically build a route to the
destination.
Examples
The following example routes packets for network 172.31.0.0 to a switch at 172.31.6.6:
Switch(config)# ip route 172.31.0.0 255.255.0.0 172.31.6.6
Related Commands
clear ip route static
12.6 show ip route
To display the current state of the routing table, use the show ip route command in user EXEC or
privileged EXEC mode.
Command Syntax
show ip route [vrf name] [ip-address | prefix/prefix-length | protocl]
vrf name
VRF
instance
name.
ip-address
(Optional) Address about which routing information should be displayed.