Page 1 of 1

Preferred route for multihomed BGP

Posted: Thu Jan 26, 2023 2:23 am
by snaykkepitt
We're testing a setup with two separate (different AS) BGP peers connected to the same 1072. We are receiving a full table plus default route from each.

The links are coming up ok, and we are receiving routes from both but when I display the routing table using IP->Routes (or ip route print) I see routes for the same prefixes from both providers and each route has the + marker indicating ECMP. I thought that only the preferred route (shortest AS path) would populate the routing table for each prefix.

Either I'm not understanding what's supposed to happen, or I'm not reading the routes correctly, or I need to disable ECMP - ?

Re: Preferred route for multihomed BGP

Posted: Thu Jan 26, 2023 8:43 am
by mrz
BGP Best path selection works only if sessions are in the same instance, in your config obviously each session is in separate instance.

Re: Preferred route for multihomed BGP

Posted: Thu Jan 26, 2023 8:33 pm
by snaykkepitt
I don't understand what you mean by "instance". We're using ROS7.7.

But the underlying question is: how can I get the routing table populated with the shortest AS path, rather than have unequal path lengths added with equal cost?

Re: Preferred route for multihomed BGP

Posted: Fri Jan 27, 2023 11:58 am
by mrz
multiple different local AS numbers and/or multiple different router-ids breaks BGP sessions in multiple instances.

Re: Preferred route for multihomed BGP

Posted: Tue Apr 04, 2023 2:30 pm
by MichaelHallager
You can prefer one provider over another for outgoing traffic with distance or local pref.
You can try and tweak incoming traffic via AS prepend but TBH this is pretty hit and miss. Another option could be split announcements if you have sufficient IP space. Whatever you do consider you can not force other ASN's to use one or the other.

But the crux of the matter is why? Unless you have a solid reason to prefer one path over another I would suggest you treat them equally and let it flow whichever way it goes.

Re: Preferred route for multihomed BGP

Posted: Tue Apr 04, 2023 5:43 pm
by wiseroute
@michael,
But the crux of the matter is why? Unless you have a solid reason to prefer one path over another I would suggest you treat them equally and let it flow whichever way it goes
well, aside for many legit reason ie. upstream bandwidth pricing, sla reliability, friendly peering etc. i think that's what all those bgp attributes are for in the first place.

yes, maybe you are right about let it loose between exits. but, there are many would like to make peering but not that many would welcome as transit point. that's why there ix point in data centers.