Configuring BGP

BGP Configuration Examples

The next example shows how the route map named set-community is applied to the outbound updates to neighbor 171.69.232.50 and the local-as community attribute is used to filter the routes. The routes that pass access list 1 have the special community attribute value local-as. The remaining routes are advertised normally. This special community value automatically prevents the advertisement of those routes by the BGP speakers outside autonomous system 200.

router bgp 65000

network 1.0.0.0 route-map set-community bgp confederation identifier 200

bgp confederation peers 65001 neighbor 171.69.232.50 remote-as 100 neighbor 171.69.233.2 remote-as 65001

!

route-map set-community permit 10 match ip address 1

set community local-as

!

The following example shows how to use the local-as community attribute to filter the routes. Confederation 100 contains three autonomous systems: 100, 200, and 300. For network 1.0.0.0, the route map named set-local-as specifies that the advertised routes have the community attribute local-as. These routes are not advertised to any eBGP peer outside the local autonomous system. For network 2.0.0.0, the route map named set-no-export specifies that the routes advertised have the community attribute no-export.

A route between router 6500 and router 65001 does not cross the boundary between autonomous systems within the confederation. A route between subautonomous systems for which router 65000 is the controlling router does not cross the boundary between the confederation and an external autonomous system, and also does not cross the boundary between subautonomous systems within the local autonomous system. A route to from router 65000 to router 65001 would not be acceptable for network 1.0.0.0 because it crosses the boundary between subautonomous systems within the confederation.

router bgp 65001

bgp confederation identifier 200 bgp confederation peer 65000

network 2.0.0.0 route-map set-community neighbor 171.69.233.1 remote-as 65000

route-map set-community permit 10 set community no-export

BGP Conditional Advertisement Configuration Examples

This section provides a configuration example of the BGP Conditional Advertisement feature. In the following example, the ip-addressargument refers to the IP address of the neighbor, and the map1-nameand map2-namearguments, refer to the names of the route maps:

neighbor{ip-address}advertise-map {map1-name}non-exist-map {map2-name}no neighbor{ip-address}advertise-map {map1-name}non-exist-map {map2-name}

The route map associated with the non-exist-map specifies the prefix that the BGP speaker tracks. The route map associated with the advertise map specifies the prefix that is advertised when the prefix in the non-exist-map no longer exists. The prefix tracked by the BGP speaker must be present in the BGP table for the conditional advertisement not to take place. In the following example, the router advertises 172.16.0.0/16 to its neighbor only if 192.168.7.0/24 is not present in the IP routing table.

Cisco IOS IP Configuration Guide

IPC-343

Page 389
Image 389
Cisco Systems 78-11741-02 manual BGP Conditional Advertisement Configuration Examples, IPC-343