Community discussions

MikroTik App
 
jmay
Member
Member
Topic Author
Posts: 336
Joined: Tue Jun 23, 2009 8:26 pm

Help with Path Cost on OSPF

Mon Mar 14, 2011 11:54 pm

I have a router with 2 gateways on 2 seperate interfaces. Both gateways are mikrotik also. I created 2 /30 networks so the router can talke to each gateway on a seperate subnet and seperate ethernet port. Load balancing between the 2 works perfectly and failover also works. But I really need one route to be the default route and the other to be a backup route if the first goes away but I'm having trouble understanding how to do this. I figured out that I need to copy each OSPF interface so that they are not dynamic, then I can adjust properties like cost and priority, but I'm confused as to what to put in there.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Help with Path Cost on OSPF

Tue Mar 15, 2011 9:30 am

For example ospf is on ether1 and ether2. Ether1is more preferred.
In ospf interface settings leave cost to 10 for ether1 and set larger cost number for ether2, for example 20. this will work only if routes are distributed as type1.
 
jmay
Member
Member
Topic Author
Posts: 336
Joined: Tue Jun 23, 2009 8:26 pm

Re: Help with Path Cost on OSPF

Tue Mar 15, 2011 5:33 pm

Do I need to change cost on all 3 routers or just the one that is load balancing to the other 2? And so I understand it what is the significance on the numbers? Does 10 or 20 have to be used or does it just need to be higher?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Help with Path Cost on OSPF

Wed Mar 16, 2011 9:24 am

Higher means lower priority.
Cost should be adjusted on routers from which you receive the route.
 
jmay
Member
Member
Topic Author
Posts: 336
Joined: Tue Jun 23, 2009 8:26 pm

Re: Help with Path Cost on OSPF

Mon Apr 04, 2011 10:31 pm

i've tried every combination of cost and priority I can think of and it seems to be random as to which one it chooses. Some times it balances and some times it chooses one or the other. To make this complicated the 2 gateway routers are also receiving their default routes from other ospf instances on other routers further down the chain. So path 1 (which I want prefered) is going through 2 routers before hitting final gateway and path 2 (which I want secondary) only goes through 1 router before hitting final gateway. So path 2 is closer and it seems to choose that path most often, but path 1 which is further has more bandwidth available. So do I need to change cost on any of the other routers for this to work correctly?
 
jmay
Member
Member
Topic Author
Posts: 336
Joined: Tue Jun 23, 2009 8:26 pm

Re: Help with Path Cost on OSPF

Thu Apr 07, 2011 5:42 pm

Well, I had all routers running 4.17 so I updated them to 5.0. Huge mistake! OSPF chaos is what that was. So I put all the RB1000s back to 4.17 and the one router in question on 4.2. 4.2 happened because I didnt have a serial cable so I swapped it with a router I had in the truck. Guess what, the routes now work as expected. Explain that?
 
User avatar
kameelperdza
Member
Member
Posts: 468
Joined: Thu Nov 27, 2008 11:45 am
Location: Oudtshoorn, South Africa

Re: Help with Path Cost on OSPF

Thu Sep 22, 2011 10:01 am

Thank you this solved my issue i had. L2tp was reconnecting constantly and after ajusting cost the connection was stable. My network layout is as this.....

AP1 --> AP2 -->AP3 -->AP1

So that when link A is down then link B can take over.

Cheers

Who is online

Users browsing this forum: No registered users and 17 guests