Allied Telesis x908, X8100 manual Filter out a range of different prefix lengths

Models: X8100 x908

1 52
Download 52 pages 56.44 Kb
Page 24
Image 24
Filter out a range of different prefix lengths

BGP: Configuring Prefix Filters

awplus(config-router)#neighbor 45.45.45.46 prefix-list list1 in

4.Shut down the neighbor, and then bring it up again.

awplus(config-router)#neighbor 45.45.45.46 shutdown awplus(config-router)#neighbor 45.45.45.46 no shutdown

5.Check that the IP route table now contains one of the routes learnt from that neighbor, but not the other.

awplus(config-router)# do show ip route

Codes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

* - candidate default

B45.0.0.0/8 [20/0] via 45.45.45.46, vlan1, 00:00:06

C45.45.45.0/24 is directly connected, vlan1

C 64.0.0.0/4 is directly connected, vlan64

Filter out a range of different prefix lengths

This example filters out routes to 45.0.0.0 with prefix lengths in the range 5-8, accepts routes to 52.0.0.0/8, and implicitly filters out all other BGP routes.

1. Remove the existing prefix list entry.

awplus(config)# no ip prefix-list list1 permit 45.0.0.0/8

2.Add the following prefix list entries.

awplus(config)# ip prefix-list list1 deny 45.0.0.0/4 ge 5 le 8 awplus(config)# ip prefix-list list1 permit 52.0.0.0/8

3. Set that prefix list as the prefix list filter for neighbor 45.45.45.46

awplus(config)# router bgp 34567

awplus(config)# neighbor 45.45.45.46 prefix-list list2 in

4.Shut down the neighbor, and then bring it up again.

awplus(config-router)#neighbor 45.45.45.46 shutdown awplus(config-router)#neighbor 45.45.45.46 no shutdown

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

Page 24
Image 24
Allied Telesis x908, X8100 manual Filter out a range of different prefix lengths