Allied Telesis X8100 Network Router User Manual


 
BGP: Configuring AS Path Filters
Page 18 | Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes
Using AS path lists as path filters
When an AS path list has been created, it can be applied to filter incoming or outgoing
update messages for a particular BGP peer, by using the following commands in BGP router
mode for the AS.
Filter incoming updates (received from a particular neighbor):
Filter outgoing updates (destined for a particular neighbor):
The router will then compare the AS path attribute in BGP update packets with each entry
in the AS path list until a match is found. If the AS path list entry that matches has the
parameter permit, then the update packet will be allowed through by the filter. If the
matching entry has the parameter deny, then the update packet will be blocked by the filter.
Note: All update packets whose AS paths do not explicitly match an entry in the AS path
list will be dropped, because the list ends in an implicit deny all entry.
Example: AS path filters
Discard or allow routes from a neighbor
This example expands on the basic configuration in "BGP: Example" on page 8.
First, it creates an AS path filter on the AlliedWare Plus switch that explicitly includes only AS
23456. AS path filters end in an implicit deny clause, so this filter implicitly excludes
AS 34568. After demonstrating that AS 34568 is excluded, the example then adds an entry
to the filter to explicitly allow AS 34568.
Implicitly
exclude a
neighbor
awplus(config-router)#
neighbor <neighbor> filter-list <list-name> in
awplus(config-router)#
neighbor <neighbor> filter-list
<list-name> out
1. If you previously configured a distribute filter, as shown in "Example: Distribute
filters" on page 12, remove it from the neighbor definition.
awplus(config)#
router bgp 34567
awplus(configrouter)# no neighbor 45.45.45.46 distribute-list
1301 in
2. Create an AS path access list that includes AS 23456.
awplus(config)#
ip as-path access-list list1 permit 23456
3. Set that access list as the in-filter for the BGP neighbor 45.45.45.46.
awplus(config)#
router bgp 34567
awplus(config-router)#
neighbor 45.45.45.46 filter-list list1 in