Community discussions

 
crt
newbie
Topic Author
Posts: 29
Joined: Tue Dec 12, 2006 1:01 am

Choosing short path for an internet address from multiple gateways

Fri Apr 13, 2018 10:27 pm

Hello community,
i have 2 gateways to the internet on different ISPs. BGP protocol is up with each ISP. My wireless network behind, on the LAN side, is running OSPF.
Let's assume one of my customers point the browser to youtube, github or somesite.com. Is there a way to forward the packet on the gateway closer - speaking in hops - to the choosed destination ?
I'm trying to figure out the solution but i'm not so good at BGP protocol. Maybe i'm not so good at all :)

Thanks in advance,
Cristiano aka .:[CRT]:. - running the ROS since 2004.
 
Vooray
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Feb 23, 2015 3:34 pm

Re: Choosing short path for an internet address from multiple gateways

Fri Apr 13, 2018 11:14 pm

No.
 
User avatar
maznu
Member Candidate
Member Candidate
Posts: 197
Joined: Tue May 05, 2015 11:12 am
Location: Manchester, UK
Contact:

Re: Choosing short path for an internet address from multiple gateways

Sat Apr 14, 2018 10:36 pm

If you are receiving full tables (almost 700k routes now) from both your upstreams, then by default RouterOS will use AS path length as one of the criteria for BGP route selection. Assuming you've not set higher local preference or metrics on the routes (by using "in" filters), then you will be getting this behaviour already. This will sort-of-but-not-quite be "number of hops" (technically it is the number of networks on the path between your router and the destination - some networks are very flat, carrier networks can be very long).

If, however, you are only receiving a default route from both your upstreams, then you will not be able to use BGP for this.

Bear in mind that your upstreams are probably doing this for you already - choosing the "best" path to the destination - so don't feel too disheartened if you are only taking default routes. But "best" means different things to different providers (might be cheapest, might be lowest latency, might be based on BGP communities, or might be simply based on AS-path length). And remember that two full tables will tax a router with less than 2Gb RAM, and takes about 5 minutes for RouterOS on Tile architecture to converge the table (quite slow!).
Marek
 
crt
newbie
Topic Author
Posts: 29
Joined: Tue Dec 12, 2006 1:01 am

Re: Choosing short path for an internet address from multiple gateways

Sun Apr 15, 2018 2:02 am

Thank you both repliers.
So what i'm thinking is real. It's quite impossible to get the whole internet routing table in my routers :)
It was only a theoretical question to understand if a "least cost hop route" feature can give better service and experience on customer side.

But - as i understand from your replies - effort is more expensive than benefits.

Regards, and thank you again.

Cristiano aka .:[CRT]:. - evolve or die.
 
Vooray
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Feb 23, 2015 3:34 pm

Re: Choosing short path for an internet address from multiple gateways

Sun Apr 15, 2018 9:12 pm

Speaking theoretical if you redistribute your full views into ospf, then yes. But i have not heared any success stories on doing that.
 
User avatar
maznu
Member Candidate
Member Candidate
Posts: 197
Joined: Tue May 05, 2015 11:12 am
Location: Manchester, UK
Contact:

Re: Choosing short path for an internet address from multiple gateways

Sun Apr 15, 2018 10:16 pm

Speaking theoretical if you redistribute your full views into ospf, then yes. But i have not heared any success stories on doing that.
I would strongly advise against redistributing 700k BGP routes into OSPF. Probably better to have your loopbacks in OSPF and carry your full tables in BGP.

…now if only MikroTik would fix multihop path resolution for IPv6! (but I digress)
Marek

Who is online

Users browsing this forum: No registered users and 7 guests