BGP Communities Explained

(Rene Molenaar) #4

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

(Rene Molenaar) #5

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

(William K) #6

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?

(Rene Molenaar) #7

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

(Abhishek D) #8

hi Rene,

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

thanks
abhishek

(Rene Molenaar) #9

Hi Abhishek,

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

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

Rene

(Abhishek D) #10

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.

(RSP R) #11

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.

(Andrew P) #12

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.

(Mark R) #13

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

(Rene Molenaar) #14

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
(Sebasrian Z) #15

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
(Deep) #16

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’.

(Rene Molenaar) #17

Hi @dpex77,

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

(Hoan N) #18

there are two statements, which one being used?

ISP1(config)#route-map PREPEND_EU permit 10

ISP1(config)#route-map PREPEND_EU permit 20
(Rene Molenaar) #19

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

(sed r) #20

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

(Lazaros Agapides) #21

Hello sed

@ReneMolenaar has not yet created a lesson that encompasses extended communities as well. However, in the meantime you can take a look at this Cisco documentation that covers some configuration issues:

I hope this has been helpful!

Laz

(Staut S) #22

Hello,

I haven’t read yet the well known communities chapters, but can you give an example for Internet community (I don’t see a lesson for this one)? The description sounds strange (advertise the prefix to all BGP neighbors), this should be done by default (I guess…).

Many thanks,
Stefanita

(Lazaros Agapides) #23

Hello Staut

You make a good point, and this is an opportunity for clarification.

The Internet community is actually a Cisco defined community. It is kind of like a “catch all” that defines “normal” behaviour in the event that no other communities are defined. So in a sense, it is the “default” community that allows all prefixes to be advertised. Where the other three say “don’t advertise such and such” the Internet community says “advertise everything!”

I hope this has been helpful!

Laz

1 Like