Policy-based routing (PBR) is a process whereby the device puts packets through a route map before routing them. The route
map determines which packets are routed to which device next. You might enable policy-based routing if you want certain packets
to be routed some way other than the obvious shortest path. Possible applications for policy-based routing are to provide
equal access, protocol-sensitive routing, source-sensitive routing, routing based on interactive versus batch traffic, and
routing based on dedicated links. Policy-based routing is a more flexible mechanism for routing packets than destination routing.
To enable policy-based routing, you must identify which route map to use for policy-based routing and create the route map.
The route map itself specifies the match criteria and the resulting action if all of the match clauses are met.
To enable policy-based routing on an interface, indicate which route map the device should use by using the ip policy route-map
map-tag command in interface configuration mode. A packet arriving on the specified interface is subject to policy-based routing.
This ip policy route-map command disables fast switching of all packets arriving on this interface.
To define the route map to be used for policy-based routing, use the route-map
map-tag [permit | deny] [sequence-number] [ordering-seq] [sequence-name global configuration command.
To define the criteria by which packets are examined to learn
if they will be policy-based routed, use either the
match length
minimum-length
maximum-length command or the
match ip address {access-list-number |
access-list-name} [access-list-number |
access-list-name] command or both in route map
configuration mode. No match clause in the route map indicates all packets.
To display the cache
entries in the policy route cache, use the
show ip cache
policy command.
Note |
Mediatrace will show
statistics of incorrect interfaces with policy-based routing (PBR) if the PBR
does not interact with CEF or Resource Reservation Protocol (RSVP). Hence
configure PBR to interact with CEF or RSVP directly so that mediatrace collects
statistics only on tunnel interfaces and not physical interfaces.
|