Community no-export for the advertising route in BGP

Posted in NETWORKING/IP ROUTING by edeguzman on October 20, 2007

This configuration shows how to set a community attribute of no-export to your advertising route. Perhaps that you want that your route will only be given to your neighboring AS and you don’t want that route to be advertised to another AS. Basically it is just telling your neighboring that this route is only for you and you should adverstised to other AS. This is done by setting the community attribute no-export your advertising route. Below is the configuration.

router eigrp 100

passive-interface Serial0/0


no auto-summary


router bgp 100

bgp log-neighbor-changes

aggregate-address attribute-map ORIGIN suppress-map VERMONT

redistribute eigrp 100

neighbor remote-as 200

neighbor send-community

neighbor route-map COMMUNITY out


ip classless

ip route Null0

ip http server


access-list 1 permit

access-list 1 permit

access-list 101 permit ip host host

route-map ORIGIN permit 10

set origin incomplete


route-map COMMUNITY permit 10

match ip address 101

set community none


route-map COMMUNITY permit 20

set community no-export


route-map VERMONT permit 10

match ip address 1


The configuration shows that the router is advertising an aggregated route which has attribute-map and suppress-map. I will break down this configuration into pieces,

Aggregate-address , this command triggers an aggregated route to be advertised to the neighboring AS.

Attribute-map, this command sets attribute to the advertising aggregated route. The ORIGIN in the configuration is a route-map calling function which it will set the attribute. The ORIGIN route-map I specify in my configuration simply changing the default origin into incomplete.

Suppress-map, this command specifies a more specific route to be included in the advertising route. Of course a matching access list should be followed.

Notice in my configuration the command neighbor route-map COMMUNITY out, this specifies a route-map calling function for COMMUNITY. The route-map under the COMMUNITY will match all the conditions. There area two route maps for COMMUNITY, the sequence 10 route map for COMMUNITY will be the first one to be process. It will match the access list 101 specified and if there’s a match it will set a none attribute for that route. If there’s no match it will go to the sequence 20 route map for processing, this will right away set the attribute of no-export community for the route entry.