Redistributing Routes Using Route Maps
Problem
You want to use route maps for more detailed control over how RIP redistributes routing information from other sources.
Solution
Route maps give you much better control over how RIP redistributes external routes. This example uses static routes, but the same principles apply when redistributing routes from other protocols:
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)#
2
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)#
8
route-map
STATIC
deny
Router1(config-route-map)#
30
exit
Router1(config)#router rip
Router1(config-router)#redistribute static route-map
Router1(config-router)#
STATIC
exit
Router1(config)#end
Router1#
Discussion
In this example, we want RIP to distinguish among the different routes. There are two parameters that we can change, the metric and the route tag. We have already discussed metrics, which basically ...
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.