Allied Telesis X908 Network Router User Manual


 
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/665] via 45.45.45.46, vlan1, 00:00:02
C 45.45.45.0/24 is directly connected, vlan1
C 64.0.0.0/4 is directly connected, vlan64
Use Route Ma
ps and Other Filters to Filter and Alter BGP and OSPF Routes | Page 37
Examples
Example C Match on a community list, and apply to a deny entry of a route map
1. Create a community list that has no community types specified:
ip community-list 1 permit
The updates from a BGP peer switch will match this community list, if they have no
community attribute.
2. Create an IP access-list that matches ALL routes:
access-list 1 permit any
3.
Create a route map that has two clauses: one which denies all updates matching the
community list, and one which permits all else.
route-map com-deny-test deny 1
match community 1
route-map com-deny-test permit 2
match ip address 1
4.
Apply this route map as the in route map on the neighbor 45.45.45.46
awplus(config-router)# neighbor 45.45.45.46 route-map com-deny-
test in
5.
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
6.
The routes from the neighbor are now denied, as they match the community-list, and
therefore the deny entry in the route map:
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#
show ip route