This chapter covers the following subjects:
- Basic Uses of Route Maps
- Configuring Route Maps
Route maps are similar to access lists; they both have criteria for matching the details of certain packets and an action of permitting or denying those packets. Unlike access lists, though, route maps can add to each "match" criterion a "set" criterion that actually changes the packet in a specified manner, or changes route information in a specified manner. Route maps also allow you more options for matching a given packet. Altogether, route maps are a powerful tool for creating customized routing policies in your network.
Basic Uses of Route Maps
Route maps can be used for both redistribution and for policy routing. Although redistribution has been covered extensively in previous chapters, this chapter introduces the topic of policy routing. And most commonly, they are an essential tool in large-scale Border Gateway Protocol (BGP) implementations. The use of route maps to implement BGP routing policies is outside the scope of this volume, and is covered in "Routing TCP/IP," Volume II (CCIE Professional Development) (1-57870-089-2).
Policy routes are nothing more than sophisticated static routes. Whereas static routes forward a packet to a specified next hop based on the destination address of the packet, policy routes can forward a packet to a specified next hop based on the source of the packet or other fields in the packet header. Policy routes can also be linked to extended IP access lists so that routing might be based on such things as protocol types and port numbers. Like a static route, a policy route influences the routing only of the router on which it is configured.
Figure 14-1 shows an example of a typical policy routing application. AbnerNet is connected to two Internet service providers via router Dogpatch. AbnerNet's corporate policy dictates that some users' Internet traffic should be sent via ISP 1 and other users' Internet traffic should be sent via ISP 2. If either ISP should become unavailable, the traffic normally using that provider would be sent to the other provider. A policy route at Dogpatch can distribute Internet traffic in accordance with local policy. The distribution of traffic might be based on subnet, specific user, or even user applications.
Figure 14-1 Policy routing allows traffic from AbnerNet to be routed to one of its two Internet service providers based on parameters such as source address, source/destination address combinations, packet size, or application-level ports.
Figure 14-2 shows another use for policy routing. One of the systems on the right watches for invasion forces from the planet Mongo, while the other stores back copies of Dilbert comic strips. Policy routes can be configured to route the critical traffic from the Mongo System to Flash_G over the FDDI (Fiber Distributed Data Interface) link and to route the lower-priority Dilbert traffic over the 56K links—or vice versa.
Figure 14-2 Policy routing allows high-priority traffic from the Mongo System to be routed over the FDDI link while low-priority traffic from the Dilbert System is routed over the 56K links.
Tables 14-1 and 14-2 show the match and set commands that can be used with redistribution, and Tables 14-3 and 14-4 show the match and set commands that can be used with policy routing.
Table 14-1. match commands that can be used with redistribution.
Command |
Description |
match interface type number [...type number] |
Matches routes that have their next hop out one of the interfaces specified |
match ip address {access-list-number| name} [...access-list-number| name] |
Matches routes that have a destination address specified by one of the access lists |
match ip next-hop{access-list-number| name} [...access-list-number| name] |
Matches routes that have a next-hop router address specified by one of the access lists |
match ip route-source{access-list-number| name} [...access-list-number| name] |
Matches routes that have been advertised by routers at the addresses specified in the access lists |
match metric metric-value |
Matches routes with the specified metric |
match route-type {internal| external[type-1| type-2] | level-1| level-2} |
Matches OSPF, EIGRP, or IS-IS routes of the specified type |
match tag tag-value [...tag-value] |
Matches routes with the specified tags |
Table 14-2. set commands that can be used with redistribution.
Command |
Description |
set level{level-1| level-2| level-1-2| stub-area| backbone} |
Sets the IS-IS level or the OSPF area into which a matched route is to be redistributed |
set metric{metric-value| bandwidth delay reliability loading mtu} |
Sets the metric value for a matched route |
set metric-type{internal| external| type-1| type-2} |
Sets the metric type for a matched route being redistributed into IS-IS or OSPF |
set next-hop next-hop |
Sets the next-hop router address for a matched route |
set tag tag-value |
Sets a tag value for a matched route |
Table 14-3. match commands that can be used with policy routing.
Command |
Description |
match ip address {access-list-number| name} [...access-list-number| name] |
Matches a packet with the characteristics specified in the standard or extended access lists |
match length min max |
Matches the Layer 3 length of a packet |
Table 14-4. set commands that can be used with policy routing.
Command |
Description |
set default interface type number [...type number] |
Sets the outgoing interface for matched packets when there is no explicit route to the destination |
set interface type number [...type number] |
Sets the outgoing interface for matched packets when there is an explicit route to the destination |
set ip default next-hop ip-address [...ip-address] |
Sets the next-hop router address for matched packets when there is no explicit route to the destination |
set ip next-hop ip-address [...ip-address] |
Sets the next-hop router address for matched packets when there is an explicit route to the destination |
set ip precedence precedence |
Sets the precedence bits in the Type of Service field of matched IP packets |
set ip tos type-of-service |
Sets the TOS bits in the Type of Service field of matched packets |