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