BGP Community Attribute

Community Attribute

The community attribute is a transitive, optional attribute in the range 0 to 4,294,967,200. The community attribute is a way to group destinations in a certain community and apply routing decisions (accept, prefer, redistribute, etc.) according to those communities.

We can use route maps to set the community attributes. The route map set command has the following syntax:

set community community−number [additive]

A few predefined well known communities (community−number) are:

  • no−export (Do not advertise to EBGP peers)
  • no−advertise (Do not advertise this route to any peer)
  • internet (Advertise this route to the internet community, any router belongs to it)
An example of route maps where community is set is:
route−map communitymap
match ip address 1
set community no−advertise
or
route−map setcommunity
match as−path 1
set community 200 additive
If the additive keyword is not set, 200 replaces any old community that already exits; if we use the keyword additive then the 200 is added to the community. Even if we set the community attribute, this attribute is not sent to neighbors by default. In order to send the attribute to our neighbor we have to use the following:
neighbor {ip−address|peer−group−name} send−community

Here's an example:

RTA#
router bgp 100
neighbor 3.3.3.3 remote−as 300
neighbor 3.3.3.3 send−community
neighbor 3.3.3.3 route−map setcommunity out

0 Comments: