Saturday, June 25, 2016

BGP Communities




BGP Communities are optional transitive attributes used mainly to associate an administrative tag to a route.  Cisco IOS routers do not pass it across BGP sessions by default. To start sending the community values to a particular peer, you must activate this feature by using the command  neighbor send-community
Community attribute has a 32-bit value
global configuration command  ip bgp-community new-format
NO_EXPORT (0xFFFF:0xFF01),
NO_ADVERTISE (0xFFFF:0xFF02)
NO_EXPORT_SUBCONFED (0xFFFF:0xFF03) interpreted by all BGP speakers

The well-known NO_ADVERTISE BGP community signals the BGP speaker not to advertise the particular prefix to any BGP peer
Output R1 Before


Output R3


R5(config)#
ip access-list extended MATCH-IP
 permit ip 5.5.5.0 0.0.0.255 any

route-map TEST-COMMINUTY permit 10
 match ip address MATCH-IP
 set community no-advertise
route-map TEST-COMMINUTY permit 20

Output R1 after Community No-advertise


Output R3


The well-known NO_EXPORT community instructs the BGP speaker to advertise the prefix only across iBGP peering links. This restricts the prefix to remain within the boundaries of the local AS.
R5(config)#
route-map TEST-COMMINUTY permit 10
 match ip address MATCH-IP
 set community no-export
route-map TEST-COMMINUTY permit 20



Before

After

 The use of Local-AS community is the same as of NO_EXPORT community, but only within the single confederation boundaries
R5(config)#
route-map TEST-COMMINUTY permit 10
 match ip address MATCH-IP
 set community local-AS
route-map TEST-COMMINUTY permit 20


Delete Community and Additive

R5(config)#do show run | s route-map
 neighbor 15.1.1.1 route-map TEST-COMMINUTY out
route-map TEST-COMMINUTY permit 10
 match ip address MATCH-IP
 set community 500:100 500:200 500:300
route-map TEST-COMMINUTY permit 20





R1#
route-map CHANGE-COMMUNITY permit 10
 set comm-list 1 delete
 set community 123:200 additive

#ip community-list 1 permit 500:200
#neighbor 12.1.1.2 route-map CHANGE-COMMUNITY out


No comments:

Post a Comment