42-3
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
!
route-map rm-test deny 25
match ip address 105
set ip next-hop 25.5.5.1
!
route-map rm-test permit 26
match ip address 2104
set ip next-hop 26.6.6.1
The numbers 21, 22, ... 26 are the sequence numbers of the route-map statements.
PBR Route-Map Processing Logic
When a packet is received on an interface configured with a route map, the forwarding logic processes
each route map statement according to the sequence number.
If the route map statement encountered is a route-map... permit statement:
• The packet is matched against the criteria in the match command. This command may refer to an
ACL that may itself have one or more permit and/or deny expressions. The packet is matched against
the expressions in the ACL, and a permit/deny decision is reached.
• If the decision reached is permit, then the PBR logic executes the action specified by the set
command on the packet.
• If the decision reached is deny, then the PBR action (specified in the set command) is not applied.
Instead the processing logic moves forward to look at the next route-map statement in the sequence
(the statement with the next higher sequence number). If no next statement exists, PBR processing
terminates, and the packet is routed using the default IP routing table.
If the route map statement encountered is a route-map... deny statement:
• The packet is matched against the criteria given in the match command. This command may refer
to an ACL that may itself have one or more permit and/or deny expressions. The packet is matched
against the expressions in the ACL, and a permit/deny decision is reached.
• If the criteria decision is permit, then the PBR processing terminates, and the packet is routed using
the default IP routing table.
• If the criteria decision is deny, then the PBR processing logic moves forward to look at the next
route-map statement in the sequence (the statement with the next higher sequence number). If no
next statement exists, PBR processing terminates, and the packet is routed using the default IP
routing table.
Note The set command has no effect inside a route-map... deny statement.
A route map statement can have multiple set commands that are applied in the following priority:
set ip next-hop verify-availability
set ip next-hop
set ip next-hop recursive
set interface
set default ip next-hop
set default interface
If both the set ip next-hop and set ip next-hop recursive commands are present in the same route-map
statement, the next-hop set command is applied.