42-2
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 42 Configuring Policy-Based Routing
Policy-Based Routing
Some applications or traffic can benefit from source-specific routing; for example, you can transfer stock
records to a corporate office on a higher-bandwidth, higher-cost link for a short time while sending
routine application data, such as e-mail, over a lower-bandwidth, lower-cost link
Policies can be based on IP address, port numbers, or protocols. For a simple policy, use any one of these
descriptors; for a complicated policy, all of them.
Route Maps
The following topics are discussed in the section:
•
Understanding Route Maps, page 42-2
•
PBR Route-Map Processing Logic, page 42-3
•
Load Balancing with Recursive Next Hop, page 42-4
•
Packet Matching Criteria, page 42-4
•
PBR Route-Map Processing Logic Example, page 42-4
Understanding Route Maps
All packets received on an interface with PBR enabled (except those sent directly to the switch IP) are
handled by enhanced packet filters known as route maps. The route maps dictate the policy that
determines where the packets are forwarded.
Route maps contain statements that can be marked as permit or deny. They are interpreted in the
following ways:
•
If a statement is marked as deny, the packets meeting the match criteria are sent back using the
normal forwarding channels and destination-based routing is performed.
•
If the statement is marked as permit and a packet matches the access-lists, then the first valid set
clause is applied to that packet.
You can implement PBR by applying a route map on an incoming interface. A given interface can have
only one route-map configured. A route map is configured at the global configuration parser mode. You
can then apply this route map on one or more interfaces (in the interface configuration parser sub-mode).
Each route map statement contains
match
and
set
commands. The
match
command denotes the match
criteria to be applied on the packet data. The
set
command denotes the PBR action to be taken on the
packet.
The following example shows a single route map called rm-test and six route map statements:
route-map rm-test permit 21
match ip address 101
set ip next-hop 21.1.1.1
!
route-map rm-test permit 22
match ip address 102
set ip next-hop 22.2.2.1
!
route-map rm-test permit 23
match ip address 101 2102
set interface vlan23
!
route-map rm-test deny 24
match ip address 104
set ip next-hop 24.4.4.1
Summary of Contents for Catalyst 4500 Series
Page 2: ......
Page 4: ......
Page 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...