The Clear Ip Route Cisco command

Command: clear ip route

Function: Removes all entries from the IP routing table.

Syntax:

clear ip route [<address> | <network> | <wildcard> | <all>]

Parameters:

Use:

The clear ip route command is used to remove routes from the IP routing table. This can be useful if you are troubleshooting a routing problem or reconfiguring your network.

Equipment:

The clear ip route command can be used on all Cisco routers.

Output:

The clear ip route command does not generate any output.

Additional Information:

clear ip route Usage Examples

The Cisco command clear ip route is used to clear the routing table. Here are some examples of how to use this command:

  1. Clear the entire routing table:
clear ip route *

This command will clear all the entries from the routing table.

  1. Clear a specific route:
clear ip route <destination-prefix>

This command will clear the route to the specified destination prefix. For example, to clear the route to the 10.0.0.0/24 network, you would use the following command:

clear ip route 10.0.0.0/24
  1. Clear a route based on the administrative distance:
clear ip route <administrative-distance>

This command will clear all the routes with the specified administrative distance. For example, to clear all the routes with an administrative distance of 120, you would use the following command:

clear ip route 120
  1. Clear a route based on the protocol:
clear ip route <protocol>

This command will clear all the routes that were learned through the specified protocol. For example, to clear all the routes that were learned through OSPF, you would use the following command:

clear ip route ospf
  1. Clear a route based on the source interface:
clear ip route source <interface>

This command will clear all the routes that were learned through the specified interface. For example, to clear all the routes that were learned through the GigabitEthernet0/1 interface, you would use the following command:

clear ip route source GigabitEthernet0/1