Allied Telesis X8100 Network Router User Manual


 
Examples
Page 40 | Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes
4. Set the prefix-list to be the match criterion on a permit entry in the route map:
route-map com permit 2
match ip address prefix-list test1
If the route 52.0.0.0/8 is dropped by this route map, we can be sure that it was dropped by
the first deny entry, and not by the implicit deny-all entry at the end of the route map.
5. Apply this route map as the incoming filter for the neighbor 45.45.45.46:
neighbor 45.45.45.46 route-map com in
6.
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
C 45.45.45.0/24 is directly connected, vlan1
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
If the deny clause in the routemap does its job, then the routes advertised from the peer will
be dropped. And, indeed they are dropped.
Example H
Combination of a distribute list and a route map and an AS-Path list filter
1. Add some new static routes to the AW peer, and configure the peer to redistribute these
static routes into BGP:
add ip rou=156.23.4.0 mask=255.255.255.248 int=vlan2
next=52.34.5.4
add ip rou=156.23.4.8 mask=255.255.255.248 int=vlan2
next=52.45.45.45
add ip rou=156.23.4.32 mask=255.255.255.224 int=vlan2
next=52.45.45.45
add ip rou=156.23.4.144 mask=255.255.255.240 int=vlan2
next=52.45.45.45
add bgp import=static
2.
Configure the peer to give Community 89:89 to the route 156.23.4.32/27 and append AS
path 34599 to the route 156.34.4.144/28.
add ip prefixlist=com entry=1 action=match prefix=156.23.4.32
masklength=27
add ip prefixlist=as entry=1 action=match prefix=156.23.4.144
masklength=28