As a further example, consider the network
shown in Figure .
You can configure RTA to send the NO_EXPORT Community attribute when
updating RTC about the route to 172.16.65.0/24.
To prevent AS2 from learning the
172.16.65.0/24 route from AS1, you can configure RTA (AS3) according to
configuration shown in the figure
(click on the topology to view the command output).
The command output in the example shows
that RTA has defined a route map SETCOMMUNITY and will send that value
toward neighbor 172.16.20.1 (RTC). Clause 10 of the route map will match
on prefix 172.16.65.0/24 and will set its Community attribute to
NO_EXPORT. Clause 20 of the route map will enable all other networks to
be passed with no change.
Notice that RTA is configured with the send-community
option in the neighbor
statement. This option is necessary to instruct RTA to send the assigned
community value out to that neighbor.
Although the NO_EXPORT and NO_ADVERTISE
values are common, autonomous systems can also agree on private
Community attributes to implement routing policy. For example, RTX in AS
100 can be configured to set the community attribute for certain routes
to the private value of 50, as shown in Figure .
In Figure ,
RTX is configured to match BGP routes according to access list 1 and to
set the Community attribute to 50 in outbound updates. The keyword additive
(included in the route map) instructs RTX to append the value 50 to the
existing community values. In this way, multiple community values will
form a list, allowing greater flexibility.
Assume RTX has a neighbor, RTZ(1.1.1.2).
RTZ resides in a different AS and has established an EBGP session with
RTX. The administrators of both systems have agreed on the significance
of the community value, 50. Thus, RTZ is configured to react accordingly.

When configured according to Figure ,
RTZ will match routes that arrive with a community value of 50 and then
will set the Local Preference attribute for those routes to 400.
|