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 192.168.10.0 255.255.255.0 172.22.1.4
Router1(config)#ip route 192.168.11.0 255.255.255.0 172.22.1.4
Router1(config)#ip route 192.168.12.0 255.255.255.0 172.22.1.4
Router1(config)#access-list 20 permit 192.168.10.0
Router1(config)#access-list 21 permit 192.168.11.0
Router1(config)#route-map STATIC permit 10
Router1(config-route-map)#match ip address 20
Router1(config-route-map)#set metric 56 100 255 1 1500
Router1(config-route-map)#set tag 2
Router1(config-route-map)#exit
Router1(config)#route-map STATIC permit 20
Router1(config-route-map)#match ip address 21
Router1(config-route-map)#set metric 128 200 255 1 1500
Router1(config-route-map)#exit
Router1(config)#route-map STATIC deny 30
Router1(config-route-map)#exit
Router1(config)#router eigrp 55
Router1(config-router)#redistribute static route-map STATIC
Router1(config-router)#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 discussion of how route maps work.

The one thing that you need to be careful of with EIGRP is that, as we discussed in Recipe 7.3, there is no default default-metric. So if you don't define EIGRP metrics for foreign routing protocols, EIGRP will not redistribute anything. This is not necessary for the static routes shown in the example, though.

See Also

Recipe 6.4; Recipe 7.3





Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net