Community discussions

MikroTik App
 
popcorrin
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Mar 11, 2009 12:55 am

OSPF issue with multiple gateways for default route

Thu Dec 01, 2011 7:39 am

I have a wireless network in a ring topology. I am running ospf on my network and it works great for the most part but I am having an issue with my ap that is 5 hops in either direction around the ring back to the core router. The equal costs causing that ap to have 2 gateways for the default route and all the clients on that ap have terribly intermittent service. Web pages not loading or partially loading, an ok connection at times and no connection at others.
I assume that it because packets can't decide which route to take, but then again what does it matter which route they take to their destination as long as they get there? Or is it possible that they are arriving out of order which is causing errors?

Looking for answers on why this happens and the best way to fix it.

Thanks
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

OSPF issue with multiple gateways for default route

Thu Dec 01, 2011 2:02 pm

Assign a slightly higher cost to one of the links that AP has to its neighbors. Now there won't be equal cost along both paths and it will choose one path only.
http://wiki.mikrotik.com/wiki/Manual:Ro ... #Interface

Check what cost other interfaces have. Add half of that to the link you don't want packes to go over. Should the primary link fail all traffic will of course go across the secondary link.
 
popcorrin
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Mar 11, 2009 12:55 am

Re: OSPF issue with multiple gateways for default route

Thu Dec 01, 2011 4:00 pm

Thanks for responding fewi. I have done that but I worried that that would adversely affect the routing between locations inside my own network. Or future routing if I added more neighbors. Maybe I am mistaken in thinking that.

Also I am curious why this causes things to perform as it does and why if a situation such as this which I don't think would be that uncommon, OSPF doesn't have built in code to deal with it.

Thanks again.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: OSPF issue with multiple gateways for default route

Thu Dec 01, 2011 4:11 pm

It won't have an adverse effect.

This is called ECMP (equal cost multi path). Generally ECMP works fine as a technology, but can interact weirdly with other configuration parts of your environment. For example, if you have a stateful firewall that suddenly sees packets of a connection it didn't see get established (some packets in a connection go one way, some go another) it might throw them away. Also, TCP expects packets to arrive somewhat in order. If one side of your ring has higher latency or is discarding packets because it doesn't have bandwidth available some packets in a connection would make it and some wouldn't, or they would arrive so out of order that they would be discarded by the client as they traverse the two different sides of the ring. That isn't a problem with ECMP as a technology as such, it's just that the routing protocol is being told the paths are equal because of the cost when realistically and physically the paths aren't equal after all. In those situations it makes sense to manually intervene and adjust link costs so there is one deterministic path.
 
popcorrin
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Mar 11, 2009 12:55 am

Re: OSPF issue with multiple gateways for default route

Thu Dec 01, 2011 4:28 pm

That makes alot of sense. Now should I increase the costs on both sides of the link that I want to avoid so that both outgoing and incoming avoid it?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: OSPF issue with multiple gateways for default route

Thu Dec 01, 2011 4:33 pm

Yes, do it on both sides. OSPF adds the cost of the interface it received a route through to the overall cost.

Who is online

Users browsing this forum: No registered users and 59 guests