Configuring BGP

BGP Configuration Examples

The second example shows how the route map named set-community is applied to the outbound updates to neighbor 171.69.232.90. All the routes that originate from autonomous system 70 have the community values 200 200 added to their already existing values. All other routes are advertised as normal.

route-map bgp 200

neighbor 171.69.232.90 remote-as 100 neighbor 171.69.232.90 send-community

neighbor 171.69.232.90 route-map set-community out

!

route-map set-community 10 permit match as-path 1

set community 200 200 additive

!

route-map set-community 20 permit

!

ip as-path access-list 1 permit 70$ ip as-path access-list 2 permit .*

The third example shows how community-based matching is used to selectively set MED and local preference for routes from neighbor 171.69.232.55. All the routes that match community list 1 get the MED set to 8000, including any routes that have the communities 100 200 300 or 900 901. These routes could have other community values also.

All the routes that pass community list 2 get the local preference set to 500. This includes the routes that have community values 88 or 90. If they belong to any other community, they will not be matched by community list 2.

All the routes that match community list 3 get the local preference set to 50. Community list 3 will match all the routes because all the routes are members of the Internet community. Thus, all the remaining routes from neighbor 171.69.232.55 get a local preference 50.

router bgp 200

neighbor 171.69.232.55 remote-as 100

neighbor 171.69.232.55 route-map filter-on-community in

!

route-map filter-on-community 10 permit match community 1

set metric 8000

!

route-map filter-on-community 20 permit match community 2 exact-match

set local-preference 500

!

route-map filter-on-community 30 permit match community 3

set local-preference 50

!

ip community-list 1 permit 100 200 300 ip community-list 1 permit 900 901

!

ip community-list 2 permit 88 ip community-list 2 permit 90

!

ip community-list 3 permit internet

The next two examples show how BGP community attributes are used with BGP confederation configurations to filter routes.

Cisco IOS IP Configuration Guide

IPC-342

Page 388
Image 388
Cisco Systems 78-11741-02 manual IPC-342, Route-map bgp, Ip community-list 3 permit internet