Below are two route maps that perform the same function to deny rfc1918 routes and allow all other prefixes. In the example for the "good" neighbor, the route-map statement is a permit with an enclosed match condition using a deny prefix-list entries for the rfc1918 addresses. In the example for "cheap" the scenario is reversed. Examine the example and see if you can understand how they are both doing the samething.
Example:
router bgp 1
neighbor 192.168.20.20 route-map good-in in
neighbor 192.168.20.22 route-map cheap-in in
******************************************
good
******************************************
ip prefix-list rfc1918 deny 10.0.0.0/8 le32
ip prefix-list rfc1918 deny 172.16.0.0/12 le32
ip prefix-list rfc1918 deny 192.168.0.0/16 le32
ip prefix-list rfc1918 permit 0.0.0.0/0 le 32
route-map good-in permit 10
match ip address prefix-list rfc1918
route-map good-in deny 9999
********************************************
cheap
********************************************
ip prefix-list rfc1918x permit 10.0.0.0/8 le32
ip prefix-list rfc1918x permit 172.16.0.0/12 le32
ip prefix-list rfc1918x permit 192.168.0.0/16 le32
ip prefix-list rfc1918 deny 0.0.0.0/0 le 32
route-map cheap-in deny 10
match ip address prefix-list rfc1918x
route-map good-in permit 9999
No comments:
Post a Comment