Previous section   Next section

Recipe 7.4 Redistributing Routes into EIGRP Using Route Maps

7.4.1 Problem

You require greater control over the routes that are redistributed and their associated metrics and route tags.

7.4.2 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)#end
Router1#

7.4.3 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 7.1 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.

7.4.4 See Also

Recipe 7.3; Recipe 6.4


  Previous section   Next section
Top