| You can use the ip
route command to dictate
which path a router will select to a given destination. However,
through policy routing, you can program a router to choose a route
based not only on destination, but on source as well.
Concerns such as monetary expense,
organizational jurisdiction, or security issues can lead
administrators to establish policies, or rules that routed traffic
should follow. Left to their default behavior, routing protocols may
arrive at path decisions that conflict with these policies. For that
reason, administrators use policy routing to override dynamic
routing and take precise control of how their routers handle certain
traffic.
Although policy routing can be used to control traffic within an AS,
it is typically used to control routing between autonomous systems.
For that reason, policy routing is used extensively with exterior
gateway protocols (EGPs), such as BGP.
The route-map
command is used to configure policy routing, which is often a
complicated task. A route map is defined using the syntax shown in
the figure.
The map-tag is the name, or
ID, of the route map. You can set this to something easily
recognizable, such as route2ISP or CHANGEROUTE. The route-map
command changes the router's mode to the route-map configuration
mode, from which you can configure conditions for the route map.
Route maps operate similar to access
lists in that they examine one line at a time and when a match is
found, action is taken. Route maps are different from numbered
access lists in that they can be modified without changing the
entire list. Each route map statement is given a number. If a
sequence number is not specified, the first route map condition will
automatically be numbered as 10, the second condition will
automatically be numbered as 20, and so on. The optional
sequence-number can be used to indicate the position that a new
route map is to have in the list of route maps already configured
with the same name.
After you have entered the route-map
command, you can enter set
and match
commands in the route-map configuration mode. Each route-map
command has a list of match and
set
commands associated with it. The match
commands specify the match
criteria-the conditions that should be tested to determine whether
to take action. The set
commands specify the set actions - the actions to perform if the match
criteria are met.
|