BGP Communities Explained

This topic is to discuss the following lesson:

Rene,

Great lesson however, I do have a question about prepending AS in ISP-1 because we don’t want other ISPs to learn about 10.10.10.10 is that correct?

64984:0 is a number we get from ISP? It varies from ISP to ISP?
If we need to add another loopback or network we can use the same community on the customer side which is 64984:0 or do we need something else?

Please clarify.
Thanks
Hamood

Hello Hamood,

Usually Prepending AS is used to make the path less preferable over other. In the case of this example Rene was just trying to show that using community is much easier to set attributes and refine the way you want the prefixes to be advertised.

@Rene now i also have a question, i have notice that on customer you had use the SEND COMMUNITY command but on the ISP1 to ISP2 u didn’t, is that a reason for that to not happen? Since you said that the router doesn’t send the community automatically.

Waiting patiently for your reply.

Mauro

Hi Hamood,

Like Mauro explained below, AS path prepending is used to make the path less preferable. BGP uses AS path length in its selection for the best path.

The community values are defined by an ISP, there are no fixed values or anything. Basically it’s just a “tag”, if you tag your prefixes with a certain value then the ISP will do something with it…prepend it’s AS path, set the local preference, etc.

Rene

Hi Mauro,

I used send community on the customer router so that ISP1 will see the community that was added to the prefix and could act upon it.

In this scenario there’s no need for ISP2 or ISP3 to see the community value since only ISP1 is doing something with it…if you want ISP2 or ISP3 to see the community value then yes we should add the send community command on ISP1.

Rene

Quick question. Can we apply multiple route maps, for different reasons, to the same neighbor? Say one for AS-PATH prepend and one for community?

Hi William,

You can apply only one route-map to a neighbor, there’s no need for a second route-map though. A single route-map can be made as complex as you want…you can use multiple statements, combine communities/attributes and more.

Rene

hi Rene,

What is the meaning of “BGP Named Community Lists” ? are they different than no export,no adver,local as .

thanks
abhishek

Hi Abhishek,

It’s a bit similar to named access-lists.

Instead of numbers, you can also use names for community lists.

Rene

great thanks. So you meant :

instead of ip community-list 1 …I could say ip community-list rene…:slight_smile:

understood !! many thanks as always.

Hi Rene,

Now I have a problem that makes me want to pull my hairs out. We’re a global company that has 5 different branches in 3 different countries. The current situation is every branch has its own private AS# and we use eBGP to connect all the branches. We have all the devices run OSPF and IBGP inside of each branch. As I said before, we have 5 different branches in 3 different countries, which means actually 3 branches we’ll need to use the same ISP. In order to help with the understanding, please refer to the diagram attached. let’s see 65521 R3 is running static route to go to ISP A. For 65524, I want the traffic to go through ISP A by adding a static route on R3. This will need us to redistribute the static route to EB GP for R8 to know it, right? As we redistribute the static route to the BGP, all the router in 65523 will know the road to ISP A. However, same traffic sometimes will also initiate on 65523, which I don’t want them to go ISP A, I want them to go ISP B. Which means i don’t want any redistributed static route to affect anything for R4 and R5, is there any easy way to achieve this?

It will be highly appreciated if you can help me with it.

RSP,
Unfortunately, as stated in our Support page (https://networklessons.com/support/), we don’t answer support or design questions about production networks.

Additionally, I am unable to give you any suggestions either because I do not see the attachment you referenced.

Hello,

Is the prefix list defined on the Customer router in the example correct? I had to change it to 10.10.10.0/24 to get it to work in my testing.

Thanks

Mark

Hi Mark,

It depends on your loopback interface. In my case, I had a /32 on the loopback which was advertised in BGP:

Customer#show running-config | section bgp
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 10.10.10.10 mask 255.255.255.255

Hi Rene,

very nice introduction to BGP communities. However, I’ve a little improvement: A hint that communities were only forwarded from second router to a third one if send-community is activated on that neighborhood were be helpful.

Br,
Sebastian

1 Like

Rene/ Andrew, I have a requirement that I need a community attribute received from another peer [ Not Cisco]. What is the configuration then on my cisco router to RECEIVE only? Is there something line ‘receive-community’ as of ‘send-community’.

Hi @dpex77,

There is no need to configure this, your router will receive communities by default.

there are two statements, which one being used?

ISP1(config)#route-map PREPEND_EU permit 10

ISP1(config)#route-map PREPEND_EU permit 20

Hi Hoan,

You mean this part?

ISP1(config)#route-map PREPEND_EU permit 10     
ISP1(config-route-map)#match community 1
ISP1(config-route-map)#set as prepend 1 1 1 1                 
ISP1(config-route-map)#exit
ISP1(config)#route-map PREPEND_EU permit 20

A route-map starts at the top and works it way to the bottom. First, it checks for everything in statement 10 and if it matches community 1, it prepends the AS path.

Then it processes the permit 20 statement which is empty. An empty statement means “match everything” so the end result will be that we advertise all other routes without changing the AS path.

If you don’t add this empty statement then everything else will be denied by default, just like an access-list. What happens is that only the networks that are matched in statement 10 get advertised and nothing else.

Hope this helps!

Rene

Hello Rene,
Would you please explain more on the extended communities and any other types of communities available?
Thanks