Let's say you enter a wrong ip route on a switch and you want to remove it.
Of course first thing you would try will be the no ip route command and job done,but what if it doesn't work. Well it took me a while to click that it doesn't because I'm trying to do it on the wrong switch.
Destination Gateway VLAN Type Sub-Type Metric Dist
XXX.27.0.161/32 XXX.28.248.38 100 ospf External2 10 110
The sub-type of the route is showing as External2 so based on that work out from which switch is the route coming from.
#show ip ospf external-link-state
This command will give you the router id IP
#show ip ospf link-state router-id ip addr
This will show you all the associated networks with that particular router-id
You can then login to all the switches on the list and check which one has the static route you trying to remove . Once you got the route just use the standard command
#no ip route ..... and the rest
Now it works
Now it works