Peer-A (AS1) establishes multi-lateral peering with other peers through a route server at an IXP. Peer-A wishes to selectively announce its prefixes to only AS2 and AS3. It tags BGP communities and large communities to achieve this. Large communities are needed to support selective announcements involving 4-byte ASNs. The document describes how large communities are encoded and provides examples of using them at an IXP to control route distribution and path attributes. Operational considerations for supporting large communities are also discussed.
2. APRICOT 2018 2
BGP Community Operations in IXPs
• Peer-A (AS1), Peer-B (AS-2), Peer-C (AS3),
Peer-D (AS4) have established muti-lateral
peering with route server.
• Peer-A (AS1) has selective peering policy,
he wishes to announce his prefixes to AS2
and AS3 only.
• Peer-A (AS1) tag BGP communities
– 0:24115 – Announce to none
– 24115:2 – except AS2
– 24115:3 – except AS3
IXP Switch
Fabric
Peer-A
(AS1)
Peer-B
(AS2)
Peer-C
(AS3)
Peer-D
AS4
[Selective]
Route
Server
0:24115, 24115:2, 24115:3
Default Open (Announce to All) 24115:24115
Default Open Except AS12345 24115:24115 0:12345
Default Closed (Announce to None) 0:24115
Default Closed Except AS12345 0:24115 24115:12345
Include AS24115 in as-path 65501:24115
Prepend 1x to AS12345 65501:12345
Prepend 2x to AS12345 65502:12345
Prepend 3x to AS12345 65503:12345
BGP Community Action
3. APRICOT 2018 3
Challenge with 4 Byte ASNs
• Peer-A (AS1) need to tag
– 0:24115 – Announce to none
– 24115:2 – except AS2
– 24115:123456 – except AS123456
• 24115:123456 doesn’t fit into RFC1997 BGP
community attribute (32 bit).
IXP Switch
Fabric
Peer-A
(AS1)
Peer-B
(AS2)
Peer-C
(AS12
3456)
Peer-D
AS4
[Selective]
Route
Server
0:24115, 24115:2, 24115:123456
5E:33 1:E2:40
24115 123456
2-bytes 4-bytes
:
:
:
4. APRICOT 2018 4
RFC8092 – BGP Large Communities
Each BGP Large Community value is encoded as a 12-octet quantity, as
follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Global Administrator |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Local Data Part 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Local Data Part 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Global Administrator: A four-octet namespace identifier.
Local Data Part 1: A four-octet operator-defined value.
Local Data Part 2: A four-octet operator-defined value.
Local Data Part 1
(4 bytes)
Local Data Part 2
(4 bytes)
Global Admin
(4 bytes)
: :
12 bytes
• Global Administrator
– is intended to allow different ASes to define BGP
Large Communities without collision.
– This field SHOULD be an ASN, in which case the
Local Data Parts are to be interpreted as defined
by the owner of the ASN.
– The use of Reserved ASNs (0[RFC7607], 65535
and 4294967295 [RFC7300]) is NOT
RECOMMENDED.
• Local Data Part 1
– As defined by Global Admin ASN.
– Usually ‘Action’ value.
• Local Data Part 2
– As defined by Global Admin ASN.
– Usually ‘ASN’ of action to be applied.
5. APRICOT 2018 5
Using BGP Large Communities
• Peer-A (AS1) tag BGP communities
– 0:24115 – Announce to none
– 24115:2 – except AS2
– 1:24115:123456 – except AS3
IXP Switch
Fabric
Peer-A
(AS1)
Peer-B
(AS2)
Peer-C
(AS12
3456)
Peer-D
AS4
[Selective]
Route
Server
0:24115, 24115:2, 1:24115:123456
Default Open (Announce to All) 24115:24115
Default Open Except AS12345 24115:24115 0:12345
Default Open Except AS123456 (4 byte) 24115:24115, <my-as>:0:123456
Default Closed (Announce to None) 0:24115
Default Closed Except AS12345 0:24115 24115:12345
Default Closed Except AS123456(4 byte) 0:24115, <my-as>:24115:123456
Include AS24115 in as-path 65501:24115
Prepend 1x to AS12345 65501:12345
Prepend 2x to AS12345 65502:12345
Prepend 3x to AS12345 65503:12345
Prepend 1x to AS123456 (4 byte ASN) <my-as>:65501:123456
Prepend 2x to AS123456 (4 byte ASN) <my-as>:65502:123456
Prepend 3x to AS123456 (4 byte ASN) <my-as>:65503 :123456
BGP Community Action
5E:33 1:E2:40
24115 123456
4-bytes
Local Data 1
:
:
: 4-bytes
Local Data 2
1
1
:
:
:4-bytes
Global Admin
6. APRICOT 2018 6
Operational Consideration
• Peer‘s router wants to tag BGP large communities but it’s not supported
– To use BGP Extended Communities Attribute (RFC4360) as workaround
• 1:24115:123456 > rt:24115:123456
• Peer’s router received prefix announcement with BGP large communities which is not supported
– E.g. IPv4 prefix in route-views.oregon-ix.net
– IPv6 prefix with BGP large communities in route server
• Route server’s community operations algorithm
– To handle prefix announcements with mixed of large + extended communities in different actions.
• <my-as>:65501:123456 - Prepend 1x to AS123456 (AND)
• rt:65502:123456 - Prepend 2x to AS123456
route-views>sh ip bgp 192.147.168.0
BGP routing table entry for 192.147.168.0/24, version 29694417
Paths: (42 available, best #18, table default)
Not advertised to any peer
Refresh Epoch 1
1403 6461 2914 15562
198.58.198.255 from 198.58.198.255 (198.58.198.255)
Origin IGP, localpref 100, valid, external
Community: 1403:6461
unknown transitive attribute: flag 0xE0 type 0x20 length 0xC
value 0000 3CCA 0000 0001 0000 0001
rx pathid: 0, tx pathid: 0
2001:fd0:da::/48 via 2001:de8:4::9498:1 on eth1 [A2001_de8_4__9498_1
03:46:11] * (100) [AS10029i]
Type: BGP unicast univ
BGP.origin: IGP
BGP.as_path: 9498 9498 9498 55410 10029
BGP.next_hop: 2001:de8:4::9498:1
BGP.local_pref: 100
BGP.community: (24115,9498)
BGP.large_community: (9498, 65502, 132602)