Modifying Routes in the Routing Table with route change
The following syntax changes a route:
route change network-destination mask network-mask
gateway [metric metric]
For example, imagine that you created a route with the following command:
route add 192.168.17.0 mask 255.255.255.0 192.168.1.22
You now realize that the gateway should be 192.168.1.2 (not 192.168.1.22). You can just reissue the command using change and the correct gateway as follows:
route change 192.168.17.0 mask 255.255.255.0 192.168.1.2
Note
You can also delete the route using the route delete command, and then add the route again using the route add command.
Deleting Routes from the Routing Table with route delete
The syntax to delete a route from the routing table is
route delete network-destination
For example, to delete the two routes added using commands in the previous section, use the following two commands:
route delete 192.168.17.0
route delete 192.168.17.33
Note
You don’t have to do anything special to delete a
persistent route. Persistent routes are deleted when the route is
deleted from the routing table.