<div dir="ltr"><div><div>Greetings Ondrej,<br><br></div>Thanks for your reply regarding this extended community.<br><br>I have tried the following two (2) configurations:<br>-------------------------------------------------<br>        bgp_ext_community.add((unknown 0x4004, 65300, 10000));<br>        bgp_ext_community.add((unknown 0x4004, 65300, 0x03E8));<br>-------------------------------------------------<br><br></div>In both cases, the neighbour Juniper router see the bandwidth as zero.<br><div>-------------------------------------------------<br>root@cache-router> show route <a href="http://22.0.36.0/24">22.0.36.0/24</a> detail    <br><br>inet.0: 605 destinations, 1120 routes (604 active, 0 holddown, 1 hidden)<br><a href="http://22.0.36.0/24">22.0.36.0/24</a> (2 entries, 1 announced)<br>        *BGP    Preference: 170/-101<br>                Next hop type: Indirect<br>                Address: 0x290c0e8<br>                Next-hop reference count: 514<br>                Source: 10.1.0.2<br>                Next hop type: Router, Next hop index: 635<br>                Next hop: 10.0.0.2 via xe-1/0/0.10, selected<br>                Session Id: 0x1<br>                Next hop type: Router, Next hop index: 724<br>                Next hop: 10.0.1.2 via xe-1/2/0.10<br>                Session Id: 0x5<br>                Protocol next hop: 10.0.0.2<br>                Indirect next hop: 0x2930410 1048576 INH Session ID: 0xbc9<br>                Protocol next hop: 10.0.1.2<br>                Indirect next hop: 0x2930c30 1048578 INH Session ID: 0x96<br>                State: <Active Int Ext><br>                Peer AS: 65300<br>                Age: 6:20       Metric2: 0 <br>                Validation State: unverified <br>                Task: BGP_65300_65300.10.1.0.2+40014<br>                Announcement bits (3): 0-KRT 4-Resolve tree 2 6-RT <br>                AS path: 65301 I<br>                AS path: Recorded<br>                Communities: bandwidth:65300:0.                                                 <-------------------- Bandwidth is zero???<br>                Accepted Multipath<br>                Localpref: 100<br>                Router ID: 10.1.0.2<br>         BGP    Preference: 170/-101<br>                Next hop type: Indirect<br>                Address: 0x28a58b4<br>                Next-hop reference count: 385<br>                Source: 10.1.0.6<br>                Next hop type: Router, Next hop index: 724<br>                Next hop: 10.0.1.2 via xe-1/2/0.10, selected<br>                Session Id: 0x5<br>                Protocol next hop: 10.0.1.2<br>                Indirect next hop: 0x2930c30 1048578 INH Session ID: 0x96<br>                State: <NotBest Int Ext><br>                Inactive reason: Not Best in its group - Router ID<br>                Peer AS: 65300<br>                Age: 2d 3:37:52         Metric2: 0 <br>                Validation State: unverified <br>                Task: BGP_65300_65300.10.1.0.6+36217<br>                AS path: 65301 I<br>                AS path: Recorded<br>                Accepted MultipathContrib<br>                Localpref: 100<br>                Router ID: 10.1.0.6<br>-------------------------------------------------<br><br>Here I've exported the wireshark decoding, where you can also see the extended community seems to be something strange:<br></div><div>-------------------------------------------------<br>No.     Time        Source                Destination           Protocol Length Info<br>    243 11.291591   10.1.0.2              10.1.0.1              BGP      543    UPDATE Message<br><br>Frame 243: 543 bytes on wire (4344 bits), 543 bytes captured (4344 bits)<br>Ethernet II, Src: RealtekU_31:8e:27 (52:54:00:31:8e:27), Dst: JuniperN_96:da:bd (10:0e:7e:96:da:bd)<br>802.1Q Virtual LAN, PRI: 0, CFI: 0, ID: 100<br>Internet Protocol Version 4, Src: 10.1.0.2 (10.1.0.2), Dst: 10.1.0.1 (10.1.0.1)<br>Transmission Control Protocol, Src Port: 40014 (40014), Dst Port: 179 (179), Seq: 1830, Ack: 378, Len: 473<br>[2 Reassembled TCP Segments (317 bytes): #241(161), #243(156)]<br>    [Frame: 241, payload: 0-160 (161 bytes)]<br>    [Frame: 243, payload: 161-316 (156 bytes)]<br>    [Segment count: 2]<br>    [Reassembled TCP length: 317]<br>    [Reassembled TCP Data: ffffffffffffffffffffffffffffffff013d020000002640...]<br>Border Gateway Protocol - UPDATE Message<br>    Marker: ffffffffffffffffffffffffffffffff<br>    Length: 317<br>    Type: UPDATE Message (2)<br>    Withdrawn Routes Length: 0<br>    Total Path Attribute Length: 38<br>    Path attributes<br>        Path Attribut - ORIGIN: IGP<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: ORIGIN (1)<br>            Length: 1<br>            Origin: IGP (0)<br>        Path Attribut - AS_PATH: 65301 <br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: AS_PATH (2)<br>            Length: 6<br>            AS Path segment: 65301<br>        Path Attribut - NEXT_HOP: 10.0.0.2 <br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: NEXT_HOP (3)<br>            Length: 4<br>            Next hop: 10.0.0.2 (10.0.0.2)<br>        Path Attribut - LOCAL_PREF: 100<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: LOCAL_PREF (5)<br>            Length: 4<br>            Local preference: 100<br>        Path Attribut - EXTENDED_COMMUNITIES<br>            Flags: 0xe0: Optional, Transitive, Partial<br>            Type Code: EXTENDED_COMMUNITIES (16)<br>            Length: 8<br>            Carried extended communities: (1 community)<br>                Community: ASN 65300, 0.000 Mbps<br>                    Community type high: Non-Transitive Two-Octet AS (0x40)<br>                    Subtype non-transitive as2: Link Bandwidth (0x04)<br>                    Two octets AS specific: 65300<br>                    Link bandwidth: 1.4013e-41                                                                       <-------------------- What the?<br>    Network Layer Reachability Information (NLRI)<br>Border Gateway Protocol - UPDATE Message<br>    Marker: ffffffffffffffffffffffffffffffff<br>    Length: 317<br>    Type: UPDATE Message (2)<br>    Withdrawn Routes Length: 0<br>    Total Path Attribute Length: 38<br>    Path attributes<br>        Path Attribut - ORIGIN: IGP<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: ORIGIN (1)<br>            Length: 1<br>            Origin: IGP (0)<br>        Path Attribut - AS_PATH: 65302 <br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: AS_PATH (2)<br>            Length: 6<br>            AS Path segment: 65302<br>        Path Attribut - NEXT_HOP: 10.0.0.26 <br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: NEXT_HOP (3)<br>            Length: 4<br>            Next hop: 10.0.0.26 (10.0.0.26)<br>        Path Attribut - LOCAL_PREF: 100<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: LOCAL_PREF (5)<br>            Length: 4<br>            Local preference: 100<br>        Path Attribut - EXTENDED_COMMUNITIES<br>            Flags: 0xe0: Optional, Transitive, Partial<br>            Type Code: EXTENDED_COMMUNITIES (16)<br>            Length: 8<br>            Carried extended communities: (1 community)<br>                Community: ASN 65300, 0.000 Mbps<br>                    Community type high: Non-Transitive Two-Octet AS (0x40)<br>                    Subtype non-transitive as2: Link Bandwidth (0x04)<br>                    Two octets AS specific: 65300<br>                    Link bandwidth: 1.4013e-41                                                         <-------------------- What the?<br>    Network Layer Reachability Information (NLRI)<br>-------------------------------------------------<br><br></div><div>Here is the decoded update message from the Juniper with the working community:<br></div><div>---------------------------------<br>No.     Time        Source                Destination           Protocol Length Info<br>     76 3.737018    10.1.0.1              10.1.0.2              BGP      417    UPDATE Message, UPDATE Message, UPDATE Message<br><br>Frame 76: 417 bytes on wire (3336 bits), 417 bytes captured (3336 bits)<br>Ethernet II, Src: JuniperN_96:da:bd (10:0e:7e:96:da:bd), Dst: RealtekU_31:8e:27 (52:54:00:31:8e:27)<br>Internet Protocol Version 4, Src: 10.1.0.1 (10.1.0.1), Dst: 10.1.0.2 (10.1.0.2)<br>Transmission Control Protocol, Src Port: 179 (179), Dst Port: 38333 (38333), Seq: 87, Ack: 69, Len: 351<br>Border Gateway Protocol - UPDATE Message<br>    Marker: ffffffffffffffffffffffffffffffff<br>    Length: 60<br>    Type: UPDATE Message (2)<br>    Withdrawn Routes Length: 0<br>    Total Path Attribute Length: 32<br>    Path attributes<br>        Path Attribut - ORIGIN: IGP<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: ORIGIN (1)<br>            Length: 1<br>            Origin: IGP (0)<br>        Path Attribut - AS_PATH: empty<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: AS_PATH (2)<br>            Length: 0<br>        Path Attribut - NEXT_HOP: 10.1.0.1 <br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: NEXT_HOP (3)<br>            Length: 4<br>            Next hop: 10.1.0.1 (10.1.0.1)<br>        Path Attribut - LOCAL_PREF: 100<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: LOCAL_PREF (5)<br>            Length: 4<br>            Local preference: 100<br>        Path Attribut - EXTENDED_COMMUNITIES<br>            Flags: 0xc0: Optional, Transitive, Complete<br>            Type Code: EXTENDED_COMMUNITIES (16)<br>            Length: 8<br>            Carried extended communities: (1 community)<br>                Community Transitive Two-Octet AS Unknown: 13414:1176255488<br>                    Community type high: Transitive Two-Octet AS (0x00)<br>                    Subtype as2: Unknown (0x04)<br>                    Two octets AS specific: 13414<br>                    Four octets AN specific: 1176255488                                                    <--------------------- Bandwidth set here<br>    Network Layer Reachability Information (NLRI)<br>        <a href="http://9.9.9.9/32">9.9.9.9/32</a><br>            NLRI prefix length: 32<br>            NLRI prefix: 9.9.9.9 (9.9.9.9)<br>Border Gateway Protocol - UPDATE Message<br>    Marker: ffffffffffffffffffffffffffffffff<br>    Length: 268<br>    Type: UPDATE Message (2)<br>    Withdrawn Routes Length: 0<br>    Total Path Attribute Length: 21<br>    Path attributes<br>        Path Attribut - ORIGIN: IGP<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: ORIGIN (1)<br>            Length: 1<br>            Origin: IGP (0)<br>        Path Attribut - AS_PATH: empty<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: AS_PATH (2)<br>            Length: 0<br>        Path Attribut - NEXT_HOP: 10.1.0.1 <br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: NEXT_HOP (3)<br>            Length: 4<br>            Next hop: 10.1.0.1 (10.1.0.1)<br>        Path Attribut - LOCAL_PREF: 100<br>            Flags: 0x40: Well-known, Transitive, Complete<br>            Type Code: LOCAL_PREF (5)<br>            Length: 4<br>            Local preference: 100<br>    Network Layer Reachability Information (NLRI)<br>        <a href="http://172.24.248.0/24">172.24.248.0/24</a><br>            NLRI prefix length: 24<br>            NLRI prefix: 172.24.248.0 (172.24.248.0)<br>        <a href="http://10.0.0.0/30">10.0.0.0/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.0 (10.0.0.0)<br>        <a href="http://10.0.0.4/30">10.0.0.4/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.4 (10.0.0.4)<br>        <a href="http://10.0.0.8/30">10.0.0.8/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.8 (10.0.0.8)<br>        <a href="http://10.0.0.12/30">10.0.0.12/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.12 (10.0.0.12)<br>        <a href="http://10.0.0.16/30">10.0.0.16/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.16 (10.0.0.16)<br>        <a href="http://10.0.0.20/30">10.0.0.20/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.20 (10.0.0.20)<br>        <a href="http://10.0.0.24/30">10.0.0.24/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.24 (10.0.0.24)<br>        <a href="http://10.0.0.28/30">10.0.0.28/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.28 (10.0.0.28)<br>        <a href="http://10.0.0.32/30">10.0.0.32/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.32 (10.0.0.32)<br>        <a href="http://10.0.0.36/30">10.0.0.36/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.36 (10.0.0.36)<br>        <a href="http://10.0.0.40/30">10.0.0.40/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.40 (10.0.0.40)<br>        <a href="http://10.0.0.44/30">10.0.0.44/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.44 (10.0.0.44)<br>        <a href="http://10.0.0.48/30">10.0.0.48/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.48 (10.0.0.48)<br>        <a href="http://10.0.0.52/30">10.0.0.52/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.52 (10.0.0.52)<br>        <a href="http://10.0.0.56/30">10.0.0.56/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.56 (10.0.0.56)<br>        <a href="http://10.0.0.60/30">10.0.0.60/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.60 (10.0.0.60)<br>        <a href="http://10.0.0.64/30">10.0.0.64/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.64 (10.0.0.64)<br>        <a href="http://10.0.0.68/30">10.0.0.68/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.68 (10.0.0.68)<br>        <a href="http://10.0.0.72/30">10.0.0.72/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.72 (10.0.0.72)<br>        <a href="http://10.0.0.76/30">10.0.0.76/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.76 (10.0.0.76)<br>        <a href="http://10.0.0.80/30">10.0.0.80/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.0.80 (10.0.0.80)<br>        <a href="http://10.1.0.0/30">10.1.0.0/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.1.0.0 (10.1.0.0)<br>        <a href="http://10.0.1.0/30">10.0.1.0/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.0 (10.0.1.0)<br>        <a href="http://10.0.1.4/30">10.0.1.4/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.4 (10.0.1.4)<br>        <a href="http://10.0.1.8/30">10.0.1.8/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.8 (10.0.1.8)<br>        <a href="http://10.0.1.12/30">10.0.1.12/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.12 (10.0.1.12)<br>        <a href="http://10.0.1.16/30">10.0.1.16/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.16 (10.0.1.16)<br>        <a href="http://10.0.1.20/30">10.0.1.20/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.20 (10.0.1.20)<br>        <a href="http://10.0.1.24/30">10.0.1.24/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.24 (10.0.1.24)<br>        <a href="http://10.0.1.28/30">10.0.1.28/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.28 (10.0.1.28)<br>        <a href="http://10.0.1.32/30">10.0.1.32/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.32 (10.0.1.32)<br>        <a href="http://10.0.1.36/30">10.0.1.36/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.36 (10.0.1.36)<br>        <a href="http://10.0.1.40/30">10.0.1.40/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.40 (10.0.1.40)<br>        <a href="http://10.0.1.44/30">10.0.1.44/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.44 (10.0.1.44)<br>        <a href="http://10.0.1.48/30">10.0.1.48/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.48 (10.0.1.48)<br>        <a href="http://10.0.1.52/30">10.0.1.52/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.52 (10.0.1.52)<br>        <a href="http://10.0.1.56/30">10.0.1.56/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.56 (10.0.1.56)<br>        <a href="http://10.0.1.60/30">10.0.1.60/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.60 (10.0.1.60)<br>        <a href="http://10.0.1.64/30">10.0.1.64/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.64 (10.0.1.64)<br>        <a href="http://10.0.1.68/30">10.0.1.68/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.68 (10.0.1.68)<br>        <a href="http://10.0.1.72/30">10.0.1.72/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.72 (10.0.1.72)<br>        <a href="http://10.0.1.76/30">10.0.1.76/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.76 (10.0.1.76)<br>        <a href="http://10.0.1.80/30">10.0.1.80/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.0.1.80 (10.0.1.80)<br>        <a href="http://10.1.0.4/30">10.1.0.4/30</a><br>            NLRI prefix length: 30<br>            NLRI prefix: 10.1.0.4 (10.1.0.4)<br>Border Gateway Protocol - UPDATE Message<br>    Marker: ffffffffffffffffffffffffffffffff<br>    Length: 23<br>    Type: UPDATE Message (2)<br>    Withdrawn Routes Length: 0<br>    Total Path Attribute Length: 0<br>---------------------------------<br><br><br></div><div>Kind regards,<br>Dave<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 29, 2014 at 5:36 AM, Ondrej Zajicek <span dir="ltr"><<a href="mailto:santiago@crfreenet.org" target="_blank">santiago@crfreenet.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Dec 23, 2014 at 05:44:01PM -0800, dave seddon wrote:<br>
> Greetings,<br>
><br>
> Sorry for the dumb question, but I'm trying to work out how to set the<br>
> extended communities.  Anybody know how to set the Link Bandwidth Extended<br>
> communities?<br>
</span>...<br>
<span class=""><br>
> Basically, need to set the community to:<br>
> "<br>
>    This document defines a specific application of the two-octet AS<br>
>    specific extended community.  IANA is requested to assign a sub- type<br>
>    value of 0x04 for the link bandwidth extended community.<br>
><br>
><br>
>       Name                                           Value<br>
>       ----                                           -----<br>
>       non-transitive Link Bandwidth Ext. Community  0x4004<br>
> "<br>
</span>...<br>
<span class="">> e.g.<br>
> export filter { bgp_ext_community.add((4, 65300, 999)); accept; };<br>
> ( Mostly stolen from this nice example:<br>
> <a href="http://bird.mpls.in/projects/mpls-bird/wiki/Bird_pe/2" target="_blank">http://bird.mpls.in/projects/mpls-bird/wiki/Bird_pe/2</a> )<br>
<br>
</span>Hi<br>
<br>
Don't know if you use plain BIRD or one from <a href="http://bird.mpls.in" target="_blank">bird.mpls.in</a>, but "(4, 65300,<br>
999)" is an invalid syntax. you should use: "(unknown 0x4004, 65300, 999)",<br>
which works for me (not tested in tcpdump, but at least i got the same<br>
back in show route).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Elen sila lumenn' omentielvo<br>
<br>
Ondrej 'Santiago' Zajicek (email: <a href="mailto:santiago@crfreenet.org">santiago@crfreenet.org</a>)<br>
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, <a href="http://wwwkeys.pgp.net" target="_blank">wwwkeys.pgp.net</a>)<br>
"To err is human -- to blame it on a computer is even more so."<br>
</font></span></blockquote></div><br></div>