Administrator Guide
CONFIG-ROUTE-MAP mode
set metric-type {external | internal | type-1 | type-2}
• Assign an IP address as the route’s next hop.
CONFIG-ROUTE-MAP mode
set next-hop ip-address
• Specify a tag for the redistributed routes.
CONFIG-ROUTE-MAP mode
set tag tag-value
To create route map instances, use these commands. There is no limit to the number of set commands per route map, but the
convention is to keep the number of set lters in a route map low. Set commands do not require a corresponding match command.
Congure a Route Map for Route Redistribution
Route maps on their own cannot aect trac and must be included in dierent commands to aect routing trac. To apply a route
map to trac, you must call or include that route map in a command such as the redistribute or default-information originate
commands in OSPF and BGP.
Route redistribution occurs when the system learns the advertising routes from static or directly connected routes or another
routing protocol. Dierent protocols assign dierent values to redistributed routes to identify either the routes and their origins. The
metric value is the most common attribute that is changed to properly redistribute other routes into a routing protocol. Other
attributes that can be changed include the metric type (for example, external and internal route types in OSPF) and route tag. Use
the
redistribute command in OSPF, RIP, ISIS, and BGP to set some of these attributes for routes that are redistributed into
those protocols.
Route maps add to that redistribution capability by allowing you to match specic routes and set or change more attributes when
redistributing those routes.
In the following example, the redistribute command calls the route map static ospf to redistribute only certain static
routes into OSPF. According to the route map static ospf, only routes that have a next hop of Gigabitethernet interface 0/0
and that have a metric of 255 are redistributed into the OSPF backbone area.
NOTE: When re-distributing routes using route-maps, you must create the route-map dened in the redistribute
command under the routing protocol. If you do not create a route-map, NO routes are redistributed.
Example of Calling a Route Map to Redistribute Specied Routes
router ospf 34
default-information originate metric-type 1
redistribute static metric 20 metric-type 2 tag 0 route-map staticospf
!
route-map staticospf permit 10
match interface GigabitEthernet 0/0
match metric 255
set level backbone
Congure a Route Map for Route Tagging
One method for identifying routes from dierent routing protocols is to assign a tag to routes from that protocol.
As the route enters a dierent routing domain, it is tagged. The tag is passed along with the route as it passes through dierent
routing protocols. You can use this tag when the route leaves a routing domain to redistribute those routes again.
In the following example, the redistribute ospf command with a route map is used in ROUTER RIP mode to apply a tag of 34
to all internal OSPF routes that are redistributed into RIP.
114
Access Control Lists (ACLs)