Install guide

2-38 Release Note
Software Version 2.7.5
C613-10454-00 REV A
Filtering Inbound and Outbound BGP Routes:
Using Communities
This example extends the basic BGP configuration shown in Basic BGP
Configuration in the BGP chapter of the Software Reference, which connects
two routers or switches as EBGP peers and gives:
Router or Switch A an IP address of 10.0.0.2 and AS number of 65000
Router or Switch B an IP address of 10.0.0.1 and AS number of 65001
This example filters inbound and outbound routes on the basis of the
community the route belongs to. Router or Switch A assigns routes to different
communities depending on the route’s subnet. Router or Switch B only accepts
routes that belong to one of these communities.
To use the community attributes
1. On Router or Switch A, create route maps that set the community attribute.
The community number is given in the form as-number:community.
add ip routemap=map0 entry=1 set community=2:1
add ip routemap=map1 entry=1 set community=2:2
add ip routemap=map2 entry=1 set community=2:3
add ip routemap=map3 entry=1 set community=2:4
add ip routemap=map4 entry=1 set community=2:5
add ip routemap=map5 entry=1 set community=2:6
add ip routemap=map6 entry=1 set community=2:7
2. On Router or Switch A, associate the route maps with subnets.
When BGP imports the routes, the route maps set the community attribute.
add bgp net=192.168.0.0/24 routemap=map0
add bgp net=192.168.1.0/24 routemap=map1
add bgp net=192.168.2.0/24 routemap=map2
add bgp net=192.168.3.0/24 routemap=map3
add bgp net=192.168.4.0/24 routemap=map4
add bgp net=192.168.5.0/24 routemap=map5
add bgp net=192.168.6.0/24 routemap=map6
add bgp net=192.168.7.0/24 routemap=map6
add bgp net=192.168.8.0/24 routemap=map6
add bgp net=192.168.9.0/24 routemap=map6
add bgp net=192.168.10.0/24 routemap=map6
Note that the community attribute of the last five routes are set to the same
value (2:7).
3. On Router or Switch A, set BGP to send the community attribute to the peer
(Router or Switch B).
set bgp peer=10.0.0.1 sendcommunity=yes
4. On Router or Switch B, create a community list.
add ip communitylist=1 entry=1 include=2:7
add ip communitylist=1 entry=2 exclude=internet