Redistributing Routes into EIGRP Using Route Maps
Problem
You require greater control over the routes that are redistributed and their associated metrics and route tags.
Solution
You can use route maps to do more sophisticated redistribution of routes into EIGRP:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip route
Router1(config)#
192.168.10.0 255.255.255.0 172.22.1.4
ip route
Router1(config)#
192.168.11.0 255.255.255.0 172.22.1.4
ip route
Router1(config)#
192.168.12.0 255.255.255.0 172.22.1.4
access-list
20
permit
Router1(config)#
192.168.10.0
access-list
21
permit
Router1(config)#
192.168.11.0
route-map
STATIC
permit
Router1(config-route-map)#
10
match ip address
Router1(config-route-map)#
20
set metric
Router1(config-route-map)#
56 100 255 1 1500
set tag
Router1(config-route-map)#
2
exit
Router1(config)#route-map
STATIC
permit
Router1(config-route-map)#
20
match ip address
Router1(config-route-map)#
21
set metric
Router1(config-route-map)#
128 200 255 1 1500
exit
Router1(config)#route-map
STATIC
deny
Router1(config-route-map)#
30
exit
Router1(config)#router eigrp
Router1(config-router)#
55
redistribute static route-map
Router1(config-router)#
STATIC
exit
Router1(config)#end
Router1#
Discussion
This recipe is extremely similar to Recipe 6.4 in the RIP chapter of this book. And just as in that example, we use route maps to set not only metrics, but also route tags for redistributed static routes. Please refer to Recipe 6.4 for a detailed ...
Get Cisco IOS Cookbook, 2nd Edition 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.