Welcome back.
And in this lesson, I want to talk about BGP Communities
and specifically how they're used in AWS.
BGP communities are used in many networks
those which involve AWS and those which don't
but as a network architect or specialist,
you need to understand the concept fully.
So let's just jump in and get started.
Let's start by focusing on BGP.
BGP as I've mentioned earlier in the course
is a protocol where routes are exchanged
via two or more autonomous systems.
An example relevant here is
between AWS and a customer router
either in the direct connect location or on premises
when the DX connection is extended to a customer site.
Now, BGP communities you can think of
as tags attached to those prefixes
which are advertised by BGP, extra metadata
which is sent along with the advertisement
giving some extra information or context about that route.
Now, you have a few well-known predefined ones
including no export.
And this is a directive not to advertise any routes
that you learn to any external BGP peers, which you have.
Then we've got no advertise
which is a directive not to advertise
to any other BGP peers.
So this includes internal or externa.
AWS use no export for any routes that they advertise to you
because they don't want you to advertise
to other BGP entities, which your appeared with.
Now, in addition to these well-known predefined ones
there are regular BGP communities.
These are 32 bit values split into two 16 bit portions.
The format is traditionally the AS number
which is advertising the prefix
and then an operator assigned value.
And examples are 7224:9100 and 7224:8100.
Where 7224 is Amazon's AS number
and 9100 and 8100 of value decided by AWS.
BGP operators, meaning you or AWS
act on advertisements based on their communities.
You can decide to create a rule or act in a certain way
for all prefixes with the BGP community
of 7224:9100 and another way for 7224:9200, for example.
So creating different rules
for different communities allows you to act
in an automated way based on the community used
by the entity advertising that prefix.
Now, BGP communities are used for many things
in relation to direct connect.
Two of them are important for this lesson,
and one of which I'll be covering later
in a dedicated lesson.
For this lesson what is the communities are used
to identify where route advertisements are from
and where you want your advertisements to go.
So let's look at this visually.
This is a rough approximation of a world map
and I've gone ahead and left most of it in black.
But the north American continent, I've highlighted in orange
and the UK, which is part of the European continent
is shown on in lighter gray.
For context and as a reminder,
this is the AS number of Amazon Inc.
So 7224.
So when AWS perform any operations involving BGP
especially public ones,
they will generally use the 7224 ASN.
And we going to assume for this example
that the Animals for Life Organization has a DX connection
in the Northern California region and logically and off
it also has business premises nearby
not in the ocean shown on screen now,
but somewhere on land close to the DX location.
When AWS advertise any of their public networks,
they do so using the AS number of 7224.
But these advertisements might concern the public zones
in the local region or somewhere across the globe.
BGP communities are used to provide some level
of visibility of the location of route advertisements.
So an AWS advertise a route over direct connect
if the route originates in the same region
as the DX location, in this case, Northern California
then it's tagged with a 7224:8100 community value.
So any routes which originate in the same region
as your DX location, will have the BGP community
of 7224:8100.
Any prefixes which originate from the same continent
in this case North America shown in orange
will have the BGP community of 7224:8200
So this 8100 versus 8200 will allow you
as a BGP administrator to identify
where a route originates from.
Anything which is not within the same region
or same continent, so global prefixes
have no BGP community tag.
So prefixes are tagged by AWS based on
if they're in the same region, same continent or global.
And this is all relative to your DX location.
So a DX location in the UK will have any prefixes
for AWS public zone services in that region tagged
with 7224:8100.
It's important to understand that these BGP communities
are relative to the DX location.
Now, you can do the same process with routes
that you advertise only this time using 7224:9100
for anything that you want to be advertised
in the local region only 7224:9200
for anything that you want to advertise to the continent,
7224:9300 for anything that you want
to be advertised globally.
And if you specify nothing for the BGP community
for a prefix, then AWS assumes that you're okay
with it being advertised globally across the AWS network.
So that's architecturally two ways
that you can use BGP communities across DX connections.
Now, before we do finish up with this lesson
I want to cover a few points in summary.
BGP communities control how far AWS advertises our routes.
It allows BGP administrators to define rules
which govern how to handle incoming prefix advertisements.
And you can create these rules
which are based on these BGP community tags.
So create one rule or one routing policy
that's based on a specific BGP community tag.
Now, they do have other uses as you'll learn
about elsewhere in this section of the course.
And one important one is controlling local preference.
Now this is an advanced networking topic
that will have its own lesson elsewhere
in this section of the course
but a did you just want to highlight
that BGP communities are not limited
to just showing the origination point of routes
or controlling where routes are advertised to
they have other users
within AWS when using direct connect.
Now, that is everything I wanted to cover in this lesson.
I will be covering other uses of BGP communities elsewhere
in the section but for now go ahead and complete this video.
And when you're ready, I'll look forward
to your joining me in the next.