Community discussions

 
jmginer
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Tue Dec 11, 2012 4:56 am

BGP traffic out peer priority

Fri Dec 29, 2017 6:23 pm

Hello!

we have 2 upstreams: Adamo + Telefonica

RETN has direct transit with both
in our routing tables, we see RETN routes with 2 hops for both (Adamo and Telefonica)

In the RETN looking glass, they are sending us the traffic via Telefonica.
But our Mikrotik is responding using Adamo.

Why we dont respond using the same link that we receive their traffic?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5942
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP traffic out peer priority

Fri Dec 29, 2017 6:33 pm

BGP routing can be asymmetric.
You control download from upstream by advertising your prefixes with more preference on one link.
You control upload to upstream either by policy routing or by other means that picks best route to upstream.
 
airbanduk
newbie
Posts: 45
Joined: Mon Jun 12, 2017 2:30 pm

Re: BGP traffic out peer priority

Sat Dec 30, 2017 12:18 am

BGP is done via policy, rather than single metric calculation. You will have both an inbound and outbound policy. Your outbound policy affects how you receive traffic from peers; your inbound policy affects how you reach external peers.

Also note you only really have control over your inbound policy - your outbound policy can be overwritten by your peers depending on their inbound policy and vice-versa. For example, you might set a different MED if you have multiple connections to the same peer, but they are not obliged to use it.
 
JimmyNyholm
Member Candidate
Member Candidate
Posts: 249
Joined: Mon Apr 25, 2016 2:16 am
Location: Sweden

Re: BGP traffic out peer priority

Sun Dec 31, 2017 2:51 pm

I like to put it this way:

Internet is Asymentric end of discussion.
A Router is only using forward lookup (not considering security features, only routing).

In BGP you tell Internet how it may reach you.
The full view of internet you got when you are multi homed is YOUR view on the internet as a whole.

You may ASK internet to prefer your prefixes on one link over the other. But there is no rule that they have to obey.
You CAN influence path selection in your AS by example weight.

That being said check bgp path selection algorithm in documentation, read up on supported communities from your upstreams. BGP is the protocol that drives internet and in traffic engineering it excels.

For your AS, thread subject: "BGP Traffic out peer priority" outgoing you use weight to influence your own AS this router routes is better then this router routes.
But weight quickly kills multi path and other features so please read up on routing and then wing your protocols to do your bidding.
 
jmginer
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Tue Dec 11, 2012 4:56 am

Re: BGP traffic out peer priority

Tue Mar 20, 2018 9:47 am

your inbound policy affects how you reach external peers.
Also note you only really have control over your inbound policy


So, there is any option to reach a external peer using the same upstream that they are using to reach me.

I have 2 upstreams: Adamo + Telefonica
If RETN is reaching me using Telefonica, why my mikrotik is reaching RETN via Adamo?
 
Vooray
Frequent Visitor
Frequent Visitor
Posts: 69
Joined: Mon Feb 23, 2015 3:34 pm

Re: BGP traffic out peer priority

Tue Mar 20, 2018 7:22 pm

So, there is any option to reach a external peer using the same upstream that they are using to reach me.
In general, NO. Internet is not symmetrical. Remember golden BGP ruler? Traffic belongs to AS it is curently in.
But there are some mechanics that can help you engineer bgp traffic.
You can set local preferense to prefer some of your peers routes, or your can prepend your prefixes to increase it protocol cost to your neighbor. Or, if your peer let you, set some communities to change traffic behaviour on the peer side. Or you can ask your ISP to make some changes in routing for you.

But why do you want traffic to be symmetrical?
 
User avatar
sri2007
Member Candidate
Member Candidate
Posts: 191
Joined: Wed May 20, 2015 10:14 pm
Location: Quito

Re: BGP traffic out peer priority

Wed May 02, 2018 7:54 pm

So, there is any option to reach a external peer using the same upstream that they are using to reach me.
I have 2 upstreams: Adamo + Telefonica
If RETN is reaching me using Telefonica, why my mikrotik is reaching RETN via Adamo?
That's telling me that your Mikrotik has a most specific route to reach your destination with Adamo, or maybe, there is only a default route active and that's with Adamo. I think that you'll need to configure at least a partial routing table (or a full routing table) and if you want to do that load balancing in the upstream allowing to BGP chooses the best path based on its attributes, then you'll need two full routing tables, however, you can configure a most accurate one, like receiving a default-route with one ISP, and receiving a partial routing table (which are blocks directly advertised by your provider and its direct subs).
MikroTik Soporte y Consultoría - Español / English +593 98 709 3502
https://www.safenet.ec/consultoria.html/ soporte@safenet.ec

Who is online

Users browsing this forum: No registered users and 5 guests