Allied Telesis X908 Network Router User Manual


 
Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes | Page 23
BGP: Configuring Prefix Filters
Using prefix lists as prefix filters
When you have created a prefix list, you can use it 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 prefixes in update packets with each entry in the prefix list,
looking for matches.
If a matching entry has the parameter permit, then there will be effectively no action. If a
matching entry has the parameter deny, then the specified prefix will be removed from the
update packet.
Once the update packet has been compared against every entry in the prefix list, it will be
sent to the neighbor (out filters) or processed (in filters), minus any prefixes that have been
removed by the filter.
Example: Prefix filters
Filter out one particular route from a neighbor
This example expands on the basic configuration in "BGP: Example" on page 8.
It creates a prefix list on the AlliedWare Plus switch that explicitly permits one of the routes
that is advertised from the AW neighbor, and therefore implicitly denies the other route.
awplus(config-router)#
neighbor <neighbor> prefix-list <list-name> in
awplus(config-router)#
neighbor <neighbor> prefix-list <list-name>
out
1. If you previously configured an AS path filter, as shown in "Example: AS path
filters" on page 18, remove it from the neighbor definition.
awplus(config)#
router bgp 34567
awplus(config-router)#
no neighbor 45.45.45.46 filter-list list1 in
2. Create an IP prefix list to include the route 45.0.0.0/8. Prefix lists end in an implicit
exclude clause, so this will exclude all other routes.
awplus(config)#
ip prefix-list list1 permit 45.0.0.0/8
3. Set that prefix list as the prefix list filter for the BGP neighbor 45.45.45.46.
awplus(config)#
router bgp 34567