set etxcommunity

To set the Border Gateway Protocol (BGP) extended communities attribute, use the set extcommunity command. To delete the entry, use the no form of this command.

set extcommunity { none | { generic { transitive | nontransitive } aa4 : nn [... aa4:nn ] } | additive }

no set extcommunity { none | { generic { transitive | nontransitive } aa4 : nn [... aa4:nn ] } | additive }

Syntax Description

none
Specifies the no community attribute.
generic
Specifies the generic specific extended community type.
transitive
Configures BGP to propagate the extended community attributes to other autonomous systems.
nontransitive
Configures BGP to propagate the extended community attributes to other autonomous systems.
aa4 : nn
Autonomous system number and network number. This value is configured with a 4-byte AS number and a 2-byte network number separated by a colon. The 4-byte AS number range is from 1 to 4294967295 in plaintext notation, or from 1.0 to 56636.65535 in AS.dot notation. You can enter a single community or multiple communities, each separated by a space.
additive
Adds to existing community.

Command Default

No BGP communities attributes exist.

Command Modes

Route-map configuration mode

Command History

Release
Modification
5.0(3)N1(1)
This command was introduced.

Usage Guidelines

Use the set extcommunity command in a route map to set the extended community attribute in a BGP route.

You must have a match clause in a route map (even if it points to a “permit everything” list) if you want to use set commands.

The set commands specify the set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.

Examples

This example shows how to configure a route map that sets the extended community to 1.5:

switch(config)# route-map test1 10 permit
switch(config-route-map)# match as-path 1
switch(config-route-map)# set extcommunity generic transitive 1.5
switch(config-route-map)# exit
 

Related Commands

Command
Description
ip extcommunity-list
Creates a community list for BGP and controls access to it.
match extcommunity
Matches an extended community in a route map.
route-map
Defines the conditions for redistributing routes from one routing protocol into another.
send-community
Configures BGP to propagate community attributes to BGP peers.