IP Routing—Configuring RIP, OSPF, BGP, and PBR
Configuring BGP
13-86
You should configure filters to advertise only the local routes and accept only
the remote private routes as follows:
ProCurve(config)# ip prefix-list FilterOut seq 1 permit 10.1.0.0/20
ProCurve(config)# ip prefix-list FilterIn seq 1 permit 10.1.0.0/16 ge 20 le 20
ProCurve(config)# router bgp 1
ProCurve(config-bgp)# neighbor 1.1.1.1
ProCurve(config-bgp-neighbor)# prefix-list FilterOut out
ProCurve(config-bgp-neighbor)# prefix-list FilterIn in
ProCurve(config-bgp-neighbor)# exit
ProCurve(config-bgp)# neighbor 2.2.2.2
ProCurve(config-bgp-neighbor)# prefix-list FilterOut out
ProCurve(config-bgp-neighbor)# prefix-list FilterIn in
Configuring Route Maps: Creating More Complex Policies
for Route Exchange
Route maps allow you to configure more complex policies than do prefix lists.
You associate a route map with each neighbor to define which routes the BGP
interface can advertise to and accept from that neighbor.
However, as well as filtering routes according to network address and prefix
length, you can also filter routes according to their AS path and BGP commu-
nity. (A BGP community is a group of routes to which a BGP router applies
the same policies. You will learn more about communities in "Configuring a
Community List" on page 13-88 and "Placing a Route in a Community: Request-
ing a Neighbor to Advertise a Route to Certain Peers Only" on page 13-94.)
You can also configure a route map to apply various attributes to the routes it
filters. For example, when advertising a route, the router can request that the
neighbor restrict advertisement of that route to certain peers. You would
configure the router to make this request by creating an outbound route map
to add community attributes to the route.
A route map applied to outbound data determines how the router advertises
routes to a neighbor. You can configure this route map to perform such
tasks as:
defining the routes that the router can advertise according to:
•
network address or prefix length
•
AS through which traffic must pass
•
community attributes
•
metric