Interior routing protocols and policy routing

A typical use of route maps involves redistributing routes. While you can use the distribute-list router configuration and standard access lists to implement policies, route maps can do things that you cannot do easily with access lists alone. As an example, let’s say we want to redistribute static routes to an EIGRP routing process with the following policy:

Distribute all static routes to networks 172.16.20.0/24 172.16.25.0/24, 172.16.52.0/24, 192.168.56.0/24, 192.168.57.0/24, and 192.168.59.0/24 to the routing process EIGRP 100

In EIGRP 100, distribute only the certain static routes (172.16.20.0/24 172.16.25.0/24, and 192.168.59.0/24) out of Fast Ethernet 1/0

We could implement this with:

ip access-list standard some-static-routes
 permit 172.16.20.0
 permit 172.16.25.0
 permit 172.16.52.0
 permit 192.168.56.0 0.0.1.0
 permit 192.168.59.0
ip access-list standard statics-for-Fast-1-0
 permit 172.16.20.0
 permit 172.16.25.0
 permit 192.168.59.0
router eigrp 100
 redistribute static
 distribute-list some-static-routes out static
 distribute-list statics-for-Fast-1-0 out FastEthernet 1/0

Note that every time we add static routes that would be distributed out of FastEthernet 1/0, we have to update two access lists. We can get around this problem by using route maps:

ip access-list standard statics-not-for-Fast-1-0 permit 172.16.52.0 permit 192.168.56.0 0.0.1.0 ip access-list standard statics-for-Fast-1-0 permit 172.16.20.0 permit 172.16.25.0 permit ...

Get Cisco IOS Access Lists now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.