Enhance your Career in Networking With IPinBits!!!​

BGP Communities Part 2 – Extended Communities and communities lists

As we studied about the Well Known communities in BGP Communities Part 1 , Lets continue our eagerness to learn BGP. So This part covers the  extended communities and communities list. 

!!!BEAR IN MIND THIS IS CCIE LEVEL STUFF SO CAN BE BORING!!!

Why we need extended communities – well original communities were 32 bits and after a time were not scalable. So now we have 64 bits community value and is known as extended communities. Please note that extended communities are 64 bits for IPv4 and 160 bits for IPv6 as per RFC 4360 and 5701. Below figure shows the structure of a extended community ( the diff is newly introduced TYPE field – Source TCPIP by Jeff Doyle)

The first two octets of any extended community have no flexibility and always are as follows:
Octet 1 – The Type field (described in RFC 4360 as Type high). The value encoded in this field actually describes the structure/partition of the remaining 6 octets (After Type and Sub-Type octets)
Octet 2 – The Sub-Type field (described in RFC 4360 as Type Low). The value encoded in this field informs the BGP process of the function of the community itself.
Currently there are five extended communities defined as per RFC 4360 :-
1. Two-Octet AS Specific Extended Community :-  This community has 2 octets of TYPE and 6 Octets of Value field.
TYPE HIGH – Can have two values 0x00 or 0x40.
TYPE LOW – It is used to indicate sub type.
Value – Divided into two sub-fields – GA (2 octets) and LA (4 octets). GA contains ASN assigned by IANA while LA  is user defined value.
2. IPv4 Address Specific Extended Community:- This community has 2 octets of TYPE and 6 Octets of Value field.

TYPE HIGH – Can have two values 0x01 or 0x41.
TYPE LOW – It is used to indicate sub type.
Value – Divided into two sub-fields – GA (4 octets) and LA (2 octets). GA contains ASN assigned by IANA while LA  is user defined value.
3. Opaque Extended Community :- This community has 2 octets of TYPE and 6 Octets of Value field.
TYPE HIGH – Can have two values 0x03 or 0x43.
TYPE LOW – It is used to indicate sub type.
This community is more flexible than other communities.
4. Route Target Community:- Also known as RT.
TYPE HIGH – Can have multiple values 0x00, 0x01 or 0x02.
TYPE LOW – set to 0x02
When TYPE HIGH is 0x00 or 0x02, the LA contains number assigned by organization to which AS number belongs in GA field. if a packet dump was collected will be 0x0002FFFFFFFFFFFF.
When TYPE HIGH is set as 0x01, the LA filed contains number assigned by organization which owns IP address present in GA field.
5. Route Origin Community:- This Community identifies one or more routers that inject
a set of routes (that carry this Community) into BGP.
TYPE HIGH – Can have multiple values 0x00, 0x01 or 0x02.
TYPE LOW – set to 0x03
When TYPE HIGH is 0x00 or 0x02, the LA contains number assigned by organization to which AS number belongs in GA field. 
When TYPE HIGH is set as 0x01, the LA filed contains number assigned by organization which owns IP address present in GA field.

So this was all about the Extended communities. Remember most of the times only RT extended communities are used.

Now lets talk about communities lists. Upon receiving the communities with routes we will need communities list and then need to apply some action (after all that is the whole purpose of tagging community value) There are two types of user defined communities lists :-

1. Standard Communities list (1-99)
2. Expanded Communities list (100-500)
Standard Community Lists Are Used to Identify Routes with a Specified Community Value while Expanded communities uses regular expressions to define set of communities.

Related blog posts