OECG – Chapter 11

O

There are times that you don’t want to redistribute all routes from one protocol into another. Route maps can help you with this, allowing you to select which routes to redistribute. Also, you can use route maps to manipulate routes before you redistribute them.

Consider the following brief IOS code example:

router ospf 1
network 10.0.0.0

router eigrp 1
redistribute ospf 1 route-map ospf-into-eigrp
network 172.16.0.0
default-metric 1544 5 1 1 1
no auto-summary

route-map ospf-into-eigrp permit 10
match ip next-hop GW_10-254-254-254
set tag 50

ip access-list standard GW_10-254-254-254
permit 10.254.254.254

In this example, OSPF routes are candidates for redistribution into EIGRP AS 1. Their candidacy is governed by a route map called “ospf-into-eigrp”. The ospf-into-eigrp route map will redistribute routes with a next-hop matching access control entries in the access list “GW_10-254-254-254”. That ACL permits 10.254.254.254 – ergo, routes will a next hop of 10.254.254.254 will be redistributed. In addition, the route tag field will be populated with “50”. When these routes are redistributed, the default-metric will be used of 1544 for bandwidth, and 5 for delay. The remaining 1’s in the default metric are irrelevant, unless your network is configured for non-default K-values.

There’s a lot of other things that you could do with the route-maps, including set metrics, permit based on advertising router, and permit based on route-type, but you get the idea. Remember that at the bottom of a route-map is an implicit “deny any any”. Therefore, in the above example, routes that do NOT have a next-hop of 10.254.254.254 would not be redistributed.

By Ethan Banks

Ethan Banks is a podcaster and writer with a BSCS and 20+ years in enterprise IT. He's operated data centers with a special focus on infrastructure — especially networking. He's been a CNE, MCSE, CEH, CCNA, CCNP, CCSP, and CCIE R&S #20655. He's the co-founder of Packet Pushers Interactive, LLC where he creates content for humans in the hot aisle.

Newsletter