On a juniper this is a config to apply a link bandwidth community:
-------------------------
protocols {
bgp {
group CORE {
type internal;
description "core full mesh";
passive;
log-updown;
family inet {
unicast;
}
family inet-vpn {
unicast;
}
export [ beer ];
peer-as 65300;
local-as 65300;
multipath;
neighbor 10.1.0.2 {
description bird1;
local-address 10.1.0.1;
}
}
}
policy-options {
policy-statement beer {
from {
route-filter
9.9.9.9/32 exact;
}
then {
community add beer;
accept;
}
}
community beer members bandwidth:65300:9999;
}
-------------------------
So the community "beer" has this value "bandwidth" which the junos knows is 0x04.
In bird it looks like this:
-------------------------
bird> show route
9.9.9.9/32 all
9.9.9.9/32 via 10.1.0.1 on VLAN100 [core 17:38:44] * (100/0) [i]
Type: BGP unicast univ
BGP.origin: IGP
BGP.as_path:
BGP.next_hop: 10.1.0.1
BGP.local_pref: 100
BGP.ext_community: (unknown 0x4, 65300, 1176255488)
-------------------------
When tcpdump-ed the update has the values: 0x0004 ff14 461c3c00
Attached is the pcap of the bgp update with the community value set via the juniper.
Kind regards,
Dave