09-27-2024 09:36 AM
I have a situation in a lab topology and I can't seem to figure out how things work:
So redistribution is configured between OSPF process 1 and 2 on both R1 and R2. Filtering using route tags is in place in such a way that no network will be redistributed back into the process it originated from.
Now there are two questions that I can't seem answer:
1. R1 learns about 150.0.0.8/30 from two places:
- from OSPF process 2 as an internal prefix.
- from OSPF process 1 as an external prefix, because it is redistributed by R2.
#show ip route shows that the internal prefix is installed into the RIB. My question is how does R1 take this decision? As far as I know, between two OSPF processes, only the AD matters, which is the same. No other protocol-specific route selection rule such as internal > external or cost has any effect, so why does R1 installs into the RIB the internal prefix instead of the external.
2. If I redistribute the 10.4.4.0/24 network from EIGRP into OSPF process 2 on R3, a loop occurs on both R1 and R2. They both redistribute the external network from process 2 as an external network into process 1, and both will keep replacing the route into the RIB. For instance, R1 keeps overwriting the route learned from R3 with the route learned from R2, then back to R3, then back to R2 and so on and so forth. My question is: why this happens? If there is a mechanism that the router uses to decide on a path over the other when the AD is the same, as it did at point 1, why doesn't it work here as well?
09-27-2024 10:02 AM
09-27-2024 01:34 PM
Thank you for the document, I did have a quick look through it and as it is explained:
"[...]Now, in each router, the internal network learned via one process competes against the external network of another process. As previously mentioned, there is no preference rule between different processes; therefore, the result would be indeterministic, as both processes have the same administrative distance."
So this confirms my initial assumption that only the AD is used as preference between processes, but regarding the routers' behaviours I am still confused.
09-27-2024 01:41 PM - edited 09-30-2024 01:40 AM
distance ospf external 200
Add above under ONE ospf process
This will make EX of prefix have AD 200 less prefer compare to O or O IA which have AD 110
MHM
09-28-2024 03:25 AM
Hello
@MHM Cisco World wrote:
distance ospf external 200
Hello @MHM Cisco World
The lower administrative distance of any route should be taken into consideration before any routing process utilizes its own best path selection process -so based on default external seed metrics - ospf 110 will supersede eigrp external 170.
As for redistribution between two ospf process they will have the same seed metric by default and setting the distance command to be lower then the other will indeed make the router prefer one domain over another for external routes however it will still not negate the possibility of loops due to the dual redistribution, you need filter be it by prefix-list of the route you not want to be advertised back into the ospf domain they originated from or by the more elegant way of route-tags as I previously shown, which can be used also between two ospf process.
example2
route-map ospf1-to-ospf2 deny 10
match tag 2
route-map ospf1-to-ospf2 permit 100
set tag 1
route-map ospf2-to-ospf1 deny 10
match tag 1
route-map ospf2-to-ospf1 permit 100
set tag 2
router ospf 1
redistribute ospf 2 route-map ospf2-to-ospf1 subnets
router ospf 2
redistribute ospf 1 route-map ospf1-to-ospf2 subnets
09-28-2024 03:53 AM
09-27-2024 01:59 PM - edited 09-27-2024 02:01 PM
Hello
1- OSPF will ALWAYS choose internal over external routes
In this instance R1 is receiving a type 1 LSA and a type 5 external LSA
as such the type 1 lsa O route is preferred
2- you have mutual redistribution points so itou need to make sure redistribution of those route do not get re- advertised back into either routing process
this can be accomplished route route- tags
Example
Route-map ospf-into-eigrp deny
Match tag 90
Route-map ospf-into-eigrp permit 100
set tag 110
Route-map eigrp-into-ospf deny
Match tag 110
Route-map eigrp-into-ospf permit 100
set tag 90
router ospf x
redistribute eigrp x route-map eigrp-into-ospf subnets
router eigrp x
redistribute ospf x route-map ospf-into-eigrp metric 10000 100 255 1 1500
09-30-2024 12:03 AM - edited 09-30-2024 12:03 AM
I run lab friend
- from OSPF process 2 as an internal prefix. <<- there is no internal, it external since we redistribute from one ospf process to other
- from OSPF process 1 as an external prefix, because it is redistributed by R2.
@paul driver below how we use AD to control traffic
in R1 we can see it prefer path via R2 not path via direct connect R3 for LO 3.3.3.3
when I change AD in R2 the R1 prefer the correct path via R3
09-30-2024 01:29 AM
Hello @MHM Cisco World
Continue with your lab and add an additional redistribution point - even better refer to that document you posted and test based on that you'll see the requirement for either prefix or route-tag filtering
09-30-2024 01:44 AM
Friend
When I adjust R2 ospf external AD
R1 have two path
One via R3 direct connect and other via R2
If R1-R3 link down still R1 can use path via R2.
What you suggest is using tag that make R1 never have path via R2 as redundancy.
That why I suggest using AD
Many thanks
MHM
10-05-2024 07:01 AM
any update
MHM
09-30-2024 07:35 PM
Hello @cosmingrosu ,
1) two OSPF processes work as "ships in the nigh" each process has its own LS DB and they are in competition in providing prefixes to the IP daemon that mantains the routing table. OSPF route type are not checked by IP daemon only AD and metric. If the internal prefix has lower OSPF metric this is why it is installed. Tuning the external AD in one process can help.
2) if both R1 and R2 are ASBR between OSPF1 and OSPF 2 and you are performing mutual redistribution at two points you need to use route-tags as explained by @paul driver
Hope to help
Giuseppe
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