Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove static route

Status
Not open for further replies.

tmcnutt

Programmer
Joined
May 17, 2002
Messages
83
Location
US
I have tried to remove a static route by using "no" in front of the command that was used to set the route up, but I get the messaage "static entry in use, cannot remove". How can I stop this entry and remove it?

Thanks,
Tom
 
You can shutdown the interface that the static route is using, then remove the route, then turn your interface back up.

"I can picture a world without war. A world without hate. A world without fear. And I can picture us attacking that world, because they'd never expect it."
- Jack Handey, Deep Thoughts
 
Is this static route a connected route? You can't remove connected routes, but you can shut them down.
 
How do I shut the route down? Once I do that, can I remove the route?
 
If you shut down a connected route, it will remove the route from the routing table for you.

I.E.

interface fastethernet0/0
ip address 192.168.0.1 255.255.255.0

With this entered into the config, your routing table will look something like this:

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

C 192.168.0.0/24 is directly connected, FastEthernet0/0

To remove that 192.168.0.0/24 route, we can shutdown the interface.

interface fastethernet0/0
shutdown

Now if you do a "show ip route", you won't see the 192.168.0.0/24 route. If we want to make sure it doesn't come back if you turn that interface back on, do this:

interface fastethernet0/0
no ip address
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top