Allied Telesis X8100 Network Router User Manual


 
Examples
Page 42 | Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes
With this combination, neither 156.23.4.32/27 nor 156.34.4.144/28 appear in the IP route
table. The route 156.23.4.32/27 is dropped by the route map filter, and the route
156.34.4.144/28 is dropped by the ASPath-list filter.
7. Now create an ACL that drops the route 156.23.4.0/28, and allows all others.
access-list standard list3 deny 156.23.4.0/28
access-list standard list3 permit any
8.
Add that ACL as a distribute-list in-filter on the neighbor:
router bgp 34567
redistribute connected
neighbor 45.45.45.46 remote-as 34568
neighbor 45.45.45.46 distribute-list list3 in
neighbor 45.45.45.46 route-map com in
neighbor 45.45.45.46 filter-list list1 in
9.
Shut down the neighbor, and then bring it up again:
BGP#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
B 45.0.0.0/8 [20/0] via 45.45.45.46, vlan1, 00:16:21
C 45.45.45.0/24 is directly connected, vlan1
B 52.0.0.0/8 [20/0] via 45.45.45.46, vlan1, 00:16:21
C 64.0.0.0/4 is directly connected, vlan64
awplus(config-router)#
neighbor 45.45.45.46 shutdown
awplus(config-router)# neighbor 45.45.45.46 no shutdown
Then all the 156.23.4.x routes are filtered out. The distribute-list filter drops both the
routes 156.23.4.0/29 and 156.23.4.8/29 because the effect of the distribute-list filter is to
drop all routes within the address range covered by 156.23.4.0/28, that have a prefix-
length of 28 or longer.
BGP#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
B 45.0.0.0/8 [20/0] via 45.45.45.46, vlan1, 00:06:39
C 45.45.45.0/24 is directly connected, vlan1
B 52.0.0.0/8 [20/0] via 45.45.45.46, vlan1, 00:06:39
C 64.0.0.0/4 is directly connected, vlan64
B 156.23.4.0/29 [20/0] via 45.45.45.46, vlan1, 00:06:39
B 156.23.4.8/29 [20/0] via 45.45.45.46, vlan1, 00:06:39