Chapter 6 CLI – Layer 3
148 P332G-ML User’s Guide
ip route Command
Use the ip route command to establish a static route. The no form of this
command removes a static route.
The syntax for this command is:
[no] ip route <ip-address> <mask> <next-hop> [<next-hop>]
[<next-hop>] [<cost>] [<preference>]
Example:
To define the router 192.168.33.38 as the next hop for the network 192.168.33.0 with
mask 255.255.255.0:
Router-N(configure)# ip route 192.168.33.0 255.255.255.0
10.10.10.10
clear ip route Command
Use the clear ip route command to delete all the dynamic routing entries from
the Routing Table.
The syntax for this command is:
clear ip route * | <ip-addr> [<ip-mask>]
Example:
clear ip route * clears all the routing table
clear ip route 192.168.49.1 255.255.255.0 clears a range of entries
ip-address The IP address of the network
mask Mask of the static route
next-hop The next hop address in the network
cost The path cost. The default is 1
preference Preference, either High or Low. Default is Low.
ip-addr IP address
ip-mask IP mask address