clear ip route

Clears entire IP route table or specific routes.
Syntax
clear ip route [ vrf vrf-name ] [ ip-address ]
Parameters
vrf vrf-name
Specifies the VPN Routing and Forwarding instance.
ip-address
Specifies the route entry to be cleared from the IP route table. The IP address can be specified in the format A.B.C.D/L where L is the mask bits or as A.B.C.D followed by network mask.
Modes

Privileged EXEC mode

Usage Guidelines

The command, when used without any parameters, clears the entire IP route table.

When an interface subnet route with an interface address that directly matches a host route learned from a neighboring device is configured and subsequently removed, the clear ip route command should be used so that the learned route is updated in the Routing and Hardware Forwarding table.

Note: The L2 and L3 protocols might flap in case the number of L3 routes are more.

Examples

The following example clears the IP route 10.157.22.0/24 from the IP routing table.

device# clear ip route 10.157.22.0/24