10-23-2015 05:00 AM - edited 03-05-2019 02:34 AM
Hi,
I want to filter outbound routes in OSPF, so that only routes matching the prefix list configured under distribute list should get advertised to neighbor when configured using "ip ospf point-point network".
1. Core switches and MPLS routers at Site-A are running OSPF.
2. MPLS routers are also running BGP and redistributing routes from OSPF to BGP and vice versa
3. Core switches at Site-B are running OSPF. Neighborship/adjacency will be established between the 2 sites as shown in the diagram.
If I apply " distribute-list prefix xxx out " in OSPF configuration, does it filter outbound routes?
Want to advertise routes only local to Core switches at siteB to siteA to avoid loops.
attached the NW diagram for your reference.
10-23-2015 07:00 AM
Hi,
If I apply " distribute-list prefix xxx out " in OSPF configuration, does it filter outbound routes?
Outbound route filtering is possible only on ASBR or ABR. In other internal OSPF routers, it is not possible to modify the LSA originated by other routers and so will not be able to filter the prefixes. THis is per RFC to make sure that all internal routers will have same topology view.
-Nagendra
10-23-2015 07:32 AM
Hello
There is various ways to advertise/ redistribute and filter routes in OSPF depending on your topology and location you wish to do this from.
Can you verfiy the ospf areas - are you just using just 1 area ( backbone area) or multiple?
Why do you wish to redistribute instead of advertise from Site B?
res
Paul
10-23-2015 07:32 AM
i have only area0 at both sites. I understand that we configure OSPF at both ends (between siteA core1 & siteB core1 and siteA core2 & siteB core2) will create route loops. once we have both circuits up and running , all the 4 core switches will form a mesh topology. since each router will form adjacency with each other, routes will be learned from both thus forming a loop. inorder to prevent loops, want to advertise the local vlan's at siteB to siteA using distirbute list command.
so route learned by MPLS routerA will be learned by core1 and 2 at site A. these routes will in turn be learned by core1 and 2 at site B. At siteB, core1 will learn the same route from core1 at siteA and also from core2 at siteB.
10-23-2015 08:19 AM
Hello
Are you using one of the ISP's as a primary and the other as a backup?
Ospf paths are calculated by cost based on bandwidth, so you can manipulate path preference by various means in OSPF, so if you have dual ospf paths the following can be utilized
- Bandwidth statements
- Ip ospf cost
- Metric type
- PBR
- Specifying different areas on links ( area 0 take preference say over area 1)
But one I do like to is the Max-metric router lsa command , this will advertise ospf lsa's with a maximum metric thus causing the router to advertised a less preffered path to it neighbors.
So regarding your toplogy, you can advertised the same local routes from site B routers, and apply one of the varoius features to manipulate path preferance.
res
Paul
10-23-2015 03:07 PM
Hello,
The OSPF algorithm needs every router in an area receives all of the LSAs for that area, so it is not possible to filter outbound route within an area. You can filter inbound route(to Routing table)
The only outbound filter allowed is filtering all LSAs.
For point-to-point OSPF
router ospf 10
neighbor 172.16.1.1 database-filter all out
http://packetlife.net/blog/2010/feb/10/ospf-filtering-inter-area-vs-intra-area/
https://www.safaribooksonline.com/library/view/cisco-ios-cookbook/0596527225/ch08s03.html
http://www.dasblinkenlichten.com/ospf-some-additional-features/
Hope it helps
Masoud
10-23-2015 03:07 PM
Hello Masoud
Thats an incorrect statement - It is possile to filter outbound, The filtering all depends on the LSA type of the router/area and where you wish to apply it.
Regards the command you have stated, this Filters ALL lsa's out of a given inteface or router
res
Paul
10-24-2015 07:16 PM
Hello Paul
Thanks for your point. Please read my sentences one more time. I meant within an area. Poser said all the routers are located in area0 . Please put two routers in area 0 in a simulator and try to filter outbound route in one of them.
http://packetlife.net/blog/2010/feb/10/ospf-filtering-inter-area-vs-intra-area/
https://www.safaribooksonline.com/library/view/cisco-ios-cookbook/0596527225/ch08s03.html
http://www.dasblinkenlichten.com/ospf-some-additional-features/
Best,
Masoud
11-15-2015 03:24 PM
Hello Paul,
Did you try it out?
res,
Masoud
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