Thursday, October 13, 2011

notes: BGP Communities

- OPTIONAL TRANSITIVE, 32-bit number
- BGP communities are a means of tagging routes to ensure consistent filtering or route selection policy, in incoming/outgoing routing updates, or with redistribution.
- By default, communities are stripped in outgoing BGP updates.
- Routers that do not support communities pass them along unchanged.
- Cisco IOS parser allows the community format as [AS-number]:[low-order-16-bits]

- A 32-bit community value is split into two parts:
   The high-order 16 bits contains the AS number of the AS which defines the community meaning.
   The low-order 16 bits have local significance.
  
 The standards define several filtering-oriented communities:
  - no-advertise : Do not advertise routes to any peer.
  - no-export : Do not advertise routes to REAL eBGP peers. Will be advertised to intra-confederation peers.
  - local-as : Do not advertise routes to any eBGP peers. (Either eBGP peers or intra-confederation peers).
 - internet : Advertise this route to the internet community. Also used to match all communities.

Community values specified with the "set" command in a route-map overwrites existing communities unless the 'additive' keyword is specified.

> Example using a route-map:

- Sets the community/ies for matching routes
- [additive] Preserves the original communities and appends new ones

route-map name
match {condition}
set community {value} [up to 32 values] [additive]

- By default, communities are stripped in outgoing updates

router bgp 1
neighbor {IP} route-map {map-name} IN|OUT
neighbor {IP|Peer} send-community standard

- Community-lists are similar to access-lists, they are evaluated sequentially, line by line.
- All values listed in one line have to match for the line to match and permit or deny a route.

- Standard community-list
   - The keyword 'internet' is used to match any community value.
   - Permit = match, Deny = don't match.

Standard community-list

ip community-list {1-99} {permit|deny} value [value…]

- Extended community-lists
 - Are like simple community-lists, but allows matching based on regular expressions
 - Use “.*” to match any community value.

Extended community-list

ip community-list 100-199 permit|deny regexp



- Named community-lists
> Allows the network operator to assign meaningful names to community-lists.
> Can be configured with regular expressions and with numbered community-lists.
> No limitation on the number of community attributes that can be configured for a named community-list.

ip extcommunity-list {standard|expanded} {community-list-name} {permt|deny} {community-number | reg-exp}

- Cost community
  - Allows the BGP best-path selection process to be customized for a local AS or confederation.
  - Influences the BGP best-path selection process at the POI (Point of Interest).

- Applied ONLY to internal routes by configuring the following:

set extcommunity cost [igp] {community-id} {cost-value}

- BGP dmzlink bandwidth extended community:
  - Used to enable multipath load balancing for external link with unequal bandwidth capacity.
  - Supports iBGP, eBGP multipath load balancing.
  - Indicates the preference of an AS exit link in terms of bandwidth.

- Distributes traffic proportionally over external links,
with unequal bandwidth when multipath is enabled

bgp {ip} dmzlink-bw

- Used by BGP to advertise the bandwidth of links which are used to exit an AS

neighbor {ip} dmzlink-bw


- By default communities are striped in outgoing updates, this enables sending communities

neighbor {ip} send-community [std|ext|both]

No comments:

Post a Comment