Order of BGP communities
Hi, Today, we noticed a difference in the order that communities were added between 1.6.3 and 1.4.5 version. All exported routes pass through a function, which adds three communities: function match_route_north() { bgp_community.add((64813,lookup_live_id(net.ip))); bgp_community.add(DC_ID); bgp_community.add((64813,lookup_fabric_id(net.ip))); return (net ~ ACAST_PS_ADVERTISE && net ~ ANYCAST_NETWORKS_NORTH && !(net ~ ACAST_PS_DISABLED)); } As you see we add first live_id (which is always 1000) and last the fabric_id(which is always 3). With bird 1.6.3 version we see that live_id community is listed 1st: 1.17.1.143/32 dev lo [direct1 2017-06-07 15:30:29 1496842229] * (240) Type: device unicast univ BGP.origin: IGP BGP.as_path: 61115 BGP.next_hop: 10.1.9.1 BGP.local_pref: 0 BGP.community: (64813,1000) (64815,100) (64813,3) but with 1.4.5 version is listed as last: 1.17.16.143/32 dev lo [direct1 2017-03-10 11:24:36 1489141476] * (240) Type: device unicast univ BGP.origin: IGP BGP.as_path: 6115 BGP.next_hop: 10.1.6.1 BGP.local_pref: 0 BGP.community: (64813,3) (61115,100) (64813,1000) Does anyone know why ? Cheers, Pavlos
On Wed, Jun 07, 2017 at 03:49:35PM +0200, Pavlos Parissis wrote:
Hi,
Today, we noticed a difference in the order that communities were added between 1.6.3 and 1.4.5 version.
Does anyone know why ?
It is true, one reason is that to have that consistent with extended and long communities. Another reason is that append is a bit more natural, if you add several communities and then show it, you end with the same order. Also note that order of communities is not significant and in the future we perhaps end with sorted community attributes. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
Pavlos Parissis