Configuring Layer 3 Features > Configuring BGP on a vRouter > Support for Border Gateway Protocol (BGP) Communities
Was this helpful?
Support for Border Gateway Protocol (BGP) Communities
A BGP community consists of a group of prefixes sharing some common property and can be configured with the BGP community attribute. The BGP Community attribute comprises an optional transitive attribute of variable length. The attribute consists of a set of four octet values specifying a community. Netvisor ONE encodes the community attribute values with an Autonomous System (AS) number in the first two octets, with the remaining two octets defined by the AS. A prefix may have more than one community attribute. A BGP speaker sees multiple community attributes in a prefix can act based on one, some or all the attributes. You have the option to add or modify a community attribute before the router passes the attribute on to other peers.
The local preference attribute indicates to the AS the preferred path in order to reach a certain network. When multiple paths to the same destination occur, Netvisor ONE uses the path with the higher preference (the default value of the local preference attribute is 100).
Common Community Attributes
Standard (well known) — These community attributes are 4 octets long, with well known values
l Internet (0) — advertise these routes to all neighbors.
l no-export (0xFFFFFF01) — do not advertise to outside a BGP confederation boundary.
l no-advertise (0xFFFFFF02) — do not advertise to other BGP peers .
l local-AS (0xFFFFFF03) — do not advertise to external BGP peers.
Standard - generic (AS:value) — These community attributes are also 4 octet long, but values can be really generic. The first 16-bit number is normally the AS number of the network that sets the community or looks for it, and the second number is one that conveys the intended information, for example: 65001:100.
For example to set the community attribute, no-export, to all route prefixes matching prefix subnet100, use the following syntax:
CLI network-admin@Leaf1 > vrouter-route-map-add vrouter-name vr1 name rmap1 seq 10 action permit match-prefix subnet100 community-attribute no-export
To set the community attribute, 65002:200 to all route prefixes matching prefix subnet100, use the following syntax:
CLI network-admin@Leaf1 > vrouter-route-map-add vrouter-name vr1 name peer vr2 action permit seq 20 match-prefix subnet99 community-attribute-generic 65002:200
Community Lists
BGP community list consists of a user defined BGP communities attribute list. The BGP community list can be used for matching or manipulating BGP communities attribute in updates. Netvisor ONE uses community list on the receive side of the BGP updates to match existing in the received updates. Community lists can be used in route-map with match-community keyword to apply any policy on the receive side.
Standard — Standard community list defines attribute which matches standard communities as defined above (well known or generic).
To set the community list permitting the community value 300 for AS 65002, use the following syntax:
CLI network-admin@Leaf1 > vrouter-community-list-add vrouter-name vr2 style standard name clist300 action permit community-attribute 65002:300
Expanded — Expanded means the string entered for the community-attribute can be a regular expression instead of AS:NN format or some well-known attributes.
To set an expanded community list denying updates with community values 1 through 99 in autonomous System 50000, use the following syntax:
CLI network-admin@Leaf1 > vrouter-community-list-add vrouter-name vr1 style expanded name c199 action deny community-attribute 50000:[0-9][0-9]
The Netvisor ONE commands for vrouter-route-maps-* support additional parameters for BGP communities:
CLI network-admin@Leaf1 > vrouter-route-map-add
 
match-community match-community-string
Specify the community string to match. (BGP only)
exact-match|no-exact-match
Specify if the community string is an exact match or not. (BGP only)
community-attribute-generic community-attribute-generic-string
Specify a generic community attribute such as AA:NN. (BGP only)
additive|no-additive
Specify if a given community is appended to existing communities value.
comm-list-del vrouter community-list name
Specify if you want to remove community values from BGP community attributes.
New commands support creating BGP Communities:
CLI network-admin@Leaf1 > vrouter-community-list-add
 
vrouter-name name-string
Specify a vRouter to add the community list.
Add the following community list parameters:
style standard|expanded
Specify the style of the community list.
name name-string
Specify a name for the community list.
action permit|deny
Specify the action for the community list.
community-attribute community-attribute-string
Specify the community attribute.
CLI network-admin@Leaf1 > vrouter-community-list-remove
 
vrouter-name name-string
Specify a vRouter to remove the community list.
Add the following community list parameters:
style standard|expanded
Specify the style of the community list.
name name-string
Specify a name for the community list.
action permit|deny
Specify the action for the community list.
community-attribute community-attribute-string
Specify the community attribute.
CLI network-admin@Leaf1 > vrouter-community-list-show
 
vrouter-name name-string
Displays the vRouter name.
Add the following community list parameters:
style standard|expanded
Displays the style of the community list.
name name-string
Displays a name for the community list.
action permit|deny
Displays the action for the community list.
community-attribute community-attribute-string
Displays the community attribute.