Install guide

2-34 Release Note
Software Version 2.7.5
C613-10454-00 REV A
Configuration Examples
These examples apply filters to BGP routes in the following situations:
Filtering When Writing BGP Routes to the RIB: Using an AS Path Filter
Filtering When Writing BGP Routes to the RIB: Using a Route Map
Filtering Before Advertising Routes with BGP: Using an AS Path Filter
Filtering Before Advertising Routes with BGP: Using a Route Map
Filtering Inbound and Outbound BGP Routes: Using Communities
Filtering When Importing Routes from BGP to OSPF
Filtering When Writing BGP Routes to the RIB:
Using an AS Path Filter
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 uses the inpathfilter filteron a BGP peer. It filters received BGP
update messages on the basis of their AS path attributes. Therefore, this
example stops the router or switch from using routes that originated in a
particular AS, or that passed through a particular AS.
To set Router or Switch A to filter out update messages that originate
from AS 300
1. Add an AS path list entry.
add ip aspathlist=1 entry=1 exclude="300$"
This AS path list includes all update messages that have originated from
any AS except AS 300.
2. Apply the AS path list to the BGP peer.
set bgp peer=10.0.0.1 inpathfilter=1
To set Router or Switch A to filter out update messages that originate
from AS 300 or pass through AS 200
1. Add an AS path list entry to exclude update messages that originate in AS 300
add ip aspathlist=1 entry=1 exclude="300$"
This AS path list includes all update messages that have originated from
any AS except AS 300.
2. Add an AS path list entry to exclude update messages that go through AS 200
add ip aspathlist=1 entry=2 exclude="200"
If a route originated from AS 300 and passes through AS 200, then its
update message matches the first entry in the aspathlist. BGP does not
check the update message against the second entry.
3. Apply the AS path list to the BGP peer.
set bgp peer=10.0.0.1 inpathfilter=1