Allied Telesis X8100, x908 manual Using prefix lists as prefix filters, Example Prefix filters

Models: X8100 x908

1 52
Download 52 pages 56.44 Kb
Page 23
Image 23
Using prefix lists as prefix filters

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):

awplus(config-router)#neighbor <neighbor> prefix-list <list-name> in

Filter outgoing updates (destined for a particular neighbor):

awplus(config-router)#neighbor <neighbor> prefix-list <list-name> out

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.

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

Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes Page 23

Page 23
Image 23
Allied Telesis X8100, x908 manual Using prefix lists as prefix filters, Example Prefix filters