Community discussions

MikroTik App
 
OKNET
Member
Member
Topic Author
Posts: 353
Joined: Mon Jun 22, 2015 9:22 am

Three same-distance routes

Fri Jun 18, 2021 5:49 pm

Newbie question : what if I have three 0.0.0.0/0 routes (WANs) with the same distance set ?
How are packet routed to internet, randomly ?
Thanks
 
msatter
Forum Guru
Forum Guru
Posts: 2897
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: Three same-distance routes

Fri Jun 18, 2021 5:59 pm

If all 0.0.0.0/0 routes are the same then I would expect the first active one (high in the list) it comes across. You have to also look at the preferred source or routing mark if there is more specific routing information.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19099
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Three same-distance routes

Fri Jun 18, 2021 7:33 pm

The router will decide which has the shortest route and yes it may change randomly.
In any case your question is baseless without context.
Its not what you think the router will do that counts.
Its what you want the router to do.

So state your requirements and will assist.
 
OKNET
Member
Member
Topic Author
Posts: 353
Joined: Mon Jun 22, 2015 9:22 am

Re: Three same-distance routes

Mon Jun 21, 2021 8:25 pm

The router will decide which has the shortest route and yes it may change randomly.
In any case your question is baseless without context.
Its not what you think the router will do that counts.
Its what you want the router to do.

So state your requirements and will assist.
Theoretically it's just a question but pratically, yes you're right :

I have three gateways and six 0.0.0.0/0 routes : three routing-marked as results of PCC skim , the same three unmarked, as default , with same distance, for packets excluded or not being processed by PCC.
How are these last packets routed once delivered to these equal-distance default route ?
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: Three same-distance routes

Tue Jun 22, 2021 1:45 pm

How are these last packets routed once delivered to these equal-distance default route ?
Whichever route is currently Active - and likely it is the first to be installed assuming all same distance, scope etc.

There is a way to do ECMP by having the gateways in the SAME route if that is what you are after, but I do not believe you can add dynamic default routes (OSPF, BGP etc) to combine into one of these style of routes, only if you manually manage that default route.
 
WeWiNet
Long time Member
Long time Member
Posts: 592
Joined: Thu Sep 27, 2018 4:11 pm

Re: Three same-distance routes

Wed Jun 23, 2021 11:27 am

If you could use several 0.0.0.0/0 route simultaneous and get them used in parallel with defined behavior (without adding more info such as preferred source etc.),
this would be like the router doing an automatic load balancing and as such there would be no need for mangle/PCC (roughly speaking).

If you want a specific behavior, you will need to use mangle to decide what you want. Selection can be via PCC or via subnets, IP ranges,
interface lists etc. but it needs to be defined.

Who is online

Users browsing this forum: Allison10, BioMax, nickiv and 33 guests