29 Dec 2011
Deleting the undeletable static route
View Comments       
So I sat down this evening to do some more practicals and all in all it went well. I did however have the misfortune of running into a weird bug of sorts. I didn’t take any screenshots, but it isn’t hard to describe.
Basically, I was setting up ip default-network for EIGRP, playing around with loopback addresses and some static routes (read: getting side tracked and testing stuff out). Somewhere along the way one of my static routes got stuck. What do I mean by stuck? well I simply couldn’t remove it. When I typed in the correct no ip route command, I was told “%No matching route to delete”. Strange! ahh but you know me, I wouldn’t let a simple ‘no’ discourage me! I mean where would I be if that were the case? so onto the internets I trawled and of course I found a (or the) solution to my problem. Well, it was sort of the solution to my problem, but it was designed for standard 2600 series switches, yet worked all the same
First off was clear ip route * — which successfully removed the static entry from my IP routing table, I could easy confirm it no longer showed up with show ip route static — functionally, we’re okay now. We haven’t got some strange static route we can’t get rid of highjacking our packet switching. But the static route still wasn’t removing itself from my running configuration. So on the same website, it said to use the no ip routing command and then the ip routing command, which essentially turns off all routing on the device then re-enables it. Whilst following these instructions certainly did remove the static route from my running configuration, it also removed all layer 3 routing protocol information from the running config. (in my case: router eigrp, summary addresses, static routes, ip default-network )
So be careful with this one, in a production network I’d recommend just clearing the static route from the routing table using the first command above, and removing the static route from the running config another time when router isn’t routing traffic say for example on a maintenance run. Of course, you could switch ip routing off and back on, and then paste in all your routing config (or even the entire running config) and depending on the routing protocol be up and running business as usual within a few seconds but as all things networks, if there is but a tiny unforseen error or set of commands that you fail to copy paste in, the results could be rather unpleasant.




















