We have a static route that is redistributed with metric 1 in to OSPF and it is properly advertised on all routers. But we want to one router to be exception. We do not want this static route on this router. Below is the config on my router.
network 172.16.0.0/28 area 0.0.0.0
network 172.20.1.0/24 area 0.0.0.0
network 172.20.3.0/24 area 0.0.0.0
network 22.214.171.124/24 area 0.0.0.0
area 0.0.0.0 filter-list prefix DEF_BLK out
ip prefix-list DEF_BLK seq 10 deny 0.0.0.0/0
ip prefix-list DEF_BLK seq 20 permit 0.0.0.0/0 le 32
I have created a DEF_BLK prefix list for this purpose. But the problem now is that though neighbors are formed, I do not see any routes from the neighbors.
Please let us know how we can resolve this.
your prefix list seems to be fine
but you will need a distribute list to filter out the default router being installed in the routing table.
router ospf 1
distribute-list prefix DEF_BLK in
I would not try to filter default route by prefix list.
I think better solution would be to place that router to another area and make that area NSSA.
On router where you have configured static default route, you will redistribute it into OSPF.
router ospf xy
This will propagate default route as LSA 5.
Router on which you do not want default route, you will place it into another area than other router and you make this new area NSSA, which means that no LSA 5 will be advertised to this router and also by default no default route will be propagated into this area by ABR.
Hope this will work for you
I thought of this but that requires me to change the area in more than 15 routers. And all these routers are with ISP.
Really want a solution.
I tried Syed config and it was working fine.
router ospf 1
distribute-list prefix DEF in
ip prefix-list DEF seq 5 deny 0.0.0.0/0
ip prefix-list DEF seq 10 permit 0.0.0.0/0 le 32