12-21-2004 04:25 AM - edited 03-02-2019 08:42 PM
Hi there,
My network is running OSPF and static route for ISDN connection for each sites. Basically, I have redundancy whereby when the primary link is down at site(s), ISDN connection will take over, and when the primary link is back in action again, the ISDN will disconnect automatically. This is the config under router ospf and static routes:
!
router ospf 100
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 0
!
ip route 192.168.0.0 255.255.255.0 172.168.1.1 150
ip route 192.168.1.0 255.255.255.0 172.168.1.2 150
ip route 192.168.2.0 255.255.255.0 172.168.1.3 150
!
From my understanding, when the routes see ospf, it will prefer to use ospf rather than static becuase the static route AD is 150 compared to OSPF 110.
However, due to some changes made by my college, I noticed that under router ospf 100, there is command "redistribute static subnet"
!
router ospf 100
log-adjacency-changes
redistribute static subnet
network 10.0.0.0 0.0.0.255 area 0
!
ip route 192.168.0.0 255.255.255.0 172.168.1.1 150
ip route 192.168.1.0 255.255.255.0 172.168.1.2 150
ip route 192.168.2.0 255.255.255.0 172.168.1.3 150
From this config, when the primary link down, ISDN will take over but when is primary is back online, it still prefer the routes for static. For such, I need to clear static routes for each site(s) connected.
It seems that the routes is still prefer to use static routes.It is because of the command or the AD in static routes defined?
thanks in advance.
maher
12-21-2004 06:12 AM
Maher,
I am no OSPF expert, but I'll have a go. I think this is what is happening:
The statics routes do not take effect because they have an AD of 150 as opposed to OSPF's 110. All three destination networks are covered by OSPF routes, which have a metric of say 500. The statics are not redistributed into OSPF because they are not active yet.
Then OSPF goes down and the floating static takes over with AD 150. They immediately get redistributed into OSPF with an AD of 110 and a (default) metric of 20, which gets advertised as an E2 to other routers.
When the OSPF comes back up again, other routers have routes to the destination, but they cannot compete with the metric 20 being advertised here. And since the metric is an E2, it remains 20 throughout the OSPF network.
I think what you need is one of these solutions:
- a distribute-list that excludes these destinations
- no redistribution at all
- a default-metric for the redisribution that is much higher than the highest metric that would be provided by OSPF.
I would like to know the opinion of one of the regular OSPF experts.
Kevin Dorrell
Luxembourg
12-21-2004 09:09 AM
I think there are a couple of things that need to be clarified: was the first config implemented and worked and then changes were made to redistribute static and now it does not work, or was the first config proposed, changes were made before the first config was actually implemented and now it does not work?
Also we need to know how those routes are learned by OSPF: are they exactly the same prefix, exactly the same mask? And what type of OSPF route are they learned as: intra-area, inter-area, external 1, or external 2?
There is an order of preference for OSPF and it will
prefer an intra-area route for a prefix over any other type, it then prefers inter-area, and then external 1, and finally external 2.
If the routes are being learned by OSPF with exactly the same prefix, same mask, and are learned as intra-area, inter-area, or external 1 then the floating static should work. Only if the routes are being learned by OSPF with the same prefix, same mask and as external 2 does Kevin's comment about the default metric and comparison of metrics come into play.
I think that it would be good to find out why someone added the redistribute static - and whether there are other static routes in the configuration which are being redistributed. Depending on this answer it would be easier to know whether Kevin's suggestion about removing redistribution entirely, or implementing a distribute list to supress those routes was the more appropriate thing to do.
HTH
Rick
12-22-2004 01:17 AM
Rick,
Thanks once again for your guidance in OSPF. So if I understand you correctly, the priorities in choosing whether a (OSPF) route makes it to the routing table are:
- Most specific prefix
- Administrative distance
- OSPF route type - O, IA, E1, E2, (N1, N2 ?)
- OSPF metric
So by this argument an IA for a particular prefix would take precedence over an E2, even if the metric was higher. Is that right?
I can imagine how you could have an external routes competing with an O or IA, but I have a problem imagining a scenario where an O and an IA compete with each other - you would have to see particular network both in the area and outside the area.
Kevin Dorrell
Luxembourg
12-22-2004 05:53 PM
Hi Rick,
Thanks for the reply. Basically, the first config has been implemented,tested and worked. The second config whereby config has been changed by adding redistribute static or redistribute static subnets.
I will post the result of the routing table when this happen again..I look forward of it.
Basically, what are the parameters in order does OSPF look for?
thanks in advance.
maher
12-21-2004 04:48 PM
Hi Kevin,
Thanks for the explaination. At least could get some info regarding this scenario.
thanks.
maher
12-22-2004 01:01 AM
Maher,
This is an interesting case. Since you are investigating this scenario, it would be interesting to see your routing table at three points in sequence:
- Under normal operating conditions before the ISDN comes up,
- After the failure of the OSPF route, and the ISDN has come up,
- After the original route is re-instated, and the ISDN should be going down again.
Any possibility you could post these here please?
Kevin Dorrell
Luxembourg
12-22-2004 05:57 PM
Kevin,
Of course, it is an intersting case and findings for this kind of scenario. Static route are injected into OSPF with AD 150 but OSPF currently in AD 110. Will the redistribute static or redistribute static connected will make static route AD into 110?
I will try to get the necessary output for us to share.
regards,
maher
12-22-2004 10:13 PM
Maher,
Not the static route itself, but the redistribution of it will be an E2 with AD 110 (and a metric whatever you specify in the redistribution, default 20, I think). I'm flying blind here, so I would be interested to see if I guessed right from your routing tables.
OTOH, as Rick pointed out, for my hypothesis to work the original route would have had to be an E2 as well, which is not very likely. But we would need to see the routing table entries before the failure event to confirm whether that is the case.
Kevin Dorrell
Luxembourg
12-21-2004 03:58 PM
This is the correct behaviour. Since you're redistributing these routes into OSPF, you're actually preferring the locally redistributed routes over the learned OSPF routes from your upstream. This is just a wierdness in the redistribution process and administrative distances.
Why did they change this to redistribute your statics? Is there some router behind you that's running OSPF, and needs to learn these statics when you flip over to the ISDN link? If not, you could filter the remote sites out of the redistribution, and have things work the way they used to, or you could even just get rid of the redistribution.
If you need these routes for some router behind this router, and that router is only connected through you to the upstream network, then I would configure default-information originate here, rather than redistributing the statics, unless there's some reason you can't inject just a default towards those other routers.
If none of this will work, it's going to take a bit more thought to figure out a good solution here.
:-)
Russ
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