05-07-2020 04:07 AM - edited 05-07-2020 04:09 AM
I've never had to consider this before - but we are migrating remote sites from one network provider to another whilst retaining the same IP address schemes on the sites. We now have the situation where the new providers work around for handling the 2 routes being advertised to our core doesn't work (turns out a bug in a certain class of non-Cisco router), so whilst I wait for the old provider to remove the routes I quickly need a "Plan B".
So what I need is to prevent our main router OSPF learning the old provider's route for specific IP ranges. From some googling I think this would work as planned. But as I have never done this before I would like some feedback.
access-list 50 remark Block Old Supplier Routes
access-list 50 deny 10.10.1.0 0.0.0.255
access-list 50 deny 192.168.1.0 0.0.0.255
access-list 50 permit any
router ospf 10
distribute-list 50 in GigabitEthernet0/1
As I understand it the ACL (50) would only be applied to inbound learnt routes only on interface Gi0/1. The same routes learnt from elsewhere (i.e.the new supplier) would populate our routing tables in the normal way. And of course all routes learnt from the new supplier would be unaffected.
I know I can use route-maps and all kind of wonderful things - I just want a simple, quick, and safe solution to a temporary problem!
Thank you
05-07-2020 05:08 AM
05-07-2020 09:28 AM
05-07-2020 05:15 AM - edited 05-07-2020 05:18 AM
Hello @Jan Gilhooley ,
OSPF is a link state protocol so you would need to apply the same distribute list on all routers otherwise routers downstream the core router will still receive the LSAs for the filtered routes and will install them causing a routing black hole.
In short terms route filtering with distribute list does not change the LSA flooding within an OSPF area.
You can consider to move the older provider to a different area, but this can be a challenge too.
The only device that can perform a granular route filtering is an ABR between area 0 the backbone and a non backbone area and only for internal routes.
Edit:
I think that Joseph's answer is correct if the core device is on the path in any case there is no risk of blackholing and the use of a distribute list can be considered a viable option.
Hope to help
Giuseppe
05-07-2020 11:43 AM
05-07-2020 01:43 PM
05-09-2020 07:49 AM
05-08-2020 10:54 AM - edited 05-09-2020 01:20 PM
not sure about this migration; Remote site A is going over the old ISP while Site B is over new provider Or part site A is going over old one while other part of A going over new provider?
1. My idea is that All Remote sites should be in other Areas while main HQ is area 0. Then you could filter on Type 3 LSAs. Since OSPF prefers internal over external routes anyway, filtering may not be needed.
2. Another idea is to run 2 OSPF processes and redistribute them accordingly. i.e. router ospf 1 and router ospf 2 on same router
3. Alternatively, making Remote Site to run different protocol and redistribute routes.
let me know if Any of those ideas are "out there" and "too much"
Regards, ML
**Please Rate All Helpful Responses **
05-08-2020 02:18 PM
There are aspects of this environment that we don't know and that impacts our ability to give good advice. In particular it would be helpful to know how the main router learns routes from the providers. Am I correct in assuming that the main router learns routes running OSPF directly with both providers? If not please provide clarification for how main router learns routes from providers.
If if so I will suggest a solution. First a bit of background. As several of my colleagues have discussed OSPF is a link state protocol. And as such all routers within an area must have equivalent Link State Data Base. Because of this a distribute list can prevent a route from being put into the local routing table but can not prevent advertising of that route to neighbors. The best way to filter route advertisements is to filter route redistribution. So my suggestion is this:
- modify the existing OSPF configuration to remove the network statement for the interface connecting to the old provider.
- create a new OSPF process (if existing OSPF is 1 then create router Ospf 2)
- add a network statement for the interface connecting to old provider.
- in the existing OSPF process configure redistribution from the new OSPF process with a route map or distribute list. This will allow you to advertise the routes that you want from the old provider and suppress the routes you don't want.
Having worked out this logic I realized that there is a flaw in my suggestion. Why does it matter what your main router advertises inside your network? As long as your inside network forwards to the main router it should be able to forward to the correct next hop based on the distribute list. If that is not working we need better information about your main router and its routing table.
05-09-2020 07:09 AM
Hello @Richard Burts ,
I think your suggestion may be the correct solution to use a separate OSPF process.
Reviewing the thread and the feedack provided by original poster @Jan Gilhooley the big drawback of distribute-list in in OSPF is that is not able to support a specific input interface but it applies to all incoming interfaces. If this happens all denied routes are simply not reachable anymore by the main core router with no distinction between old provider and new provider links.
Alternatively, the OSPF costs on the links to old ISP could be manipulated to make them less attractive then those of the new provider . This should be done also on each remote site for the opposite direction of traffic to the HQ.
Hope to help
Giuseppe
05-09-2020 07:26 PM
I am having lots of issues getting this to work.
05-10-2020 08:01 AM
The original post asked about an issue trying to filter OSPF learned routes and my response focused on the issue filtering routes. I believe that 2 processes with redistribution is an appropriate solution for that. But as I read the thread I believe that filtering may not be required. If I understand correctly the issue is that in a transition period that both providers are advertising the routes for a remote office being moved over. It doesn't matter what the main router advertises to inside resources. It only matters that when both providers are advertising the same office network that the main router chooses the route from the new provider. It seems an appropriately high cost on interface for old provider should accomplish this.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide