![]() ![]() |
8.2 | ![]() |
Policy Routing | |
8.2.1 | ![]() |
Policy routing overview |
Use the
ip route
command to dictate which path a router will select to a given
destination. However, through policy routing, a router can be
programmed 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 autonomous system (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 Border Gateway Protocol (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. This map-tag can be set to something easily recognizable, such as route2ISP or CHANGEROUTE. The route-map command changes the mode on the router to the route-map configuration mode, from there conditions can be configured for the route map. Route maps operate similar to access lists, by examining one line at a time and when a match is found, action is taken. Route maps are different from numbered access lists because 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 ten (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 entering the route-map command, 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. They are the conditions that should be tested to determine whether to take action. The set commands specify the set actions. They are the actions to be performed if the match criteria are met.
|