
Chapter 6 | CLI – Layer 3 |
|
|
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
The IP address of the network | |
mask | Mask of the static route |
The next hop address in the network | |
cost | The path cost. The default is 1 |
preference | Preference, either High or Low. Default is Low. |
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>]
| IP address |
|
| IP mask address |
|
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 |
148 |