route removal

Unanswered Question
Feb 12th, 2008

someone asked to remove the route for Below is the sh ip route results in my router

Router_0701#sh ip route

Routing entry for

Known via "static", distance 1, metric 0

Redistributing via ospf 62300

Advertised by ospf 61700 metric 20 metric-type 1 subnets route-map static-filter

Routing Descriptor Blocks:


Route metric is 0, traffic share count is 1

can this be done on a pool of ips? is the sh ip route tells that it was learned via ospf? thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.3 (3 ratings)
marikakis Tue, 02/12/2008 - 02:12


The output says: Known via "static", which means that you have a static route of the form: ip route, in the configuration of this router. This can be removed by entering a negation of the form: no ip route

The output says that router knows the route via static (distance 1 prefered), but this router is doing redistribution, which causes an external ospf route to be flooded to other routers in the domain. If you remove the static from this router, normally the route will disappear from the domain (unless you have some related configuration elsewhere).

Kind Regards,


p.s.1 The fact that this subnet is used as a pool of IPs is irrelevant to the routing configuration. I mean, routing doesn't care about the purpose of the subnet. A static route combined with redistribution can serve a variety of purposes (from routing you only want the subnet to be known to the rest of the domain).

p.s.2 Ok, now I think I get what you meant about the pool. You cannot exclude just one IP address, unless you break the /24 subnet, which is ugly. The best thing you can do is to advertise a /32 for the specific IP address from another point if you just want to offer to this IP some mobility (filling your network with ospf externals, particularly /32's, is not very pretty though). This last suggestion is based on the fact that the more specific /32 will win the /24.

marikakis Tue, 02/12/2008 - 02:38


Just noticed that I was not very explicit about how you can advertise the /32. If user connects via PPP, then you will have a /32 connected route on the router where the PPP session is terminated. You can advertise the /32 by redistributing connected subnets into ospf.

Note however that what I suggest does not remove the route to the specific IP. It just causes it to be flexibly advertised from a variety of points, depending on where user connects.

Also note that the suggestion about removal of the /24 was before I realized what you meant with your question. You should not remove the /24, but rather advertise an additional /32, that will beat down the /24 for the specific IP address.

Kind Regards,


Mohamed Sobair Tue, 02/12/2008 - 03:14


Great explanation....

Although I am not the original poster, but I am rating this post so every body can see.

Keep up the good work.

Kind regards,



This Discussion