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?