Command Reference NSM Commands
5 NSM Commands
5.1 clear ip route
Use this command to clear the route cache.
clear ip route { * | network [ netmask ] | }
Specifies the route cache of the network or subnet.
(Optional) Subnet mask. If no subnet mask is specified,
the longest match principle is used when you match
network with the route. The cache of the longest match is
cleared.
Clearing route cache clears the corresponding routes and triggers the routing protocol relearning.
Please note that clearing all route cache leads to temporary network disconnection.
The following example clears the cache of the route which is the longest match with IP address
192.168.12.0.
clear ip route 192.168.12.0
Use this command to configure the default gateway IP address on 2-layer devices. Use the no or
default form of this command to restore the default setting.
ip default-gateway ip-address
no ip default-gateway
default ip default-gateway
IPv4 address of the default gateway