25-4
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter25 Configuring Policy-Based Routing
Policy-Based Routing Configuration Task List
The set commands can be used in conjunction with each other. These commands are evaluated in the
order shown in Step 3 in the previous task table. A usable next hop implies an interface. Once the local
router finds a next hop and a usable interface, it routes the packet.
Step3
Switch(config-route-map)# set ip next-hop
ip-address
[...
ip-address
]
Switch(config-route-map)# set interface
interface-type interface-number
[...
type number
]
Switch(config-route-map)# set ip default
next-hop
ip-address
[...
ip-address
]
Switch(config-route-map)# set default
interface
interface-type interface-number
[...
type ...number
]
Specifies the action or actions to take on the packets that
match the criteria. You can specify any or all of the following:
Specifies the next hop for which to route the packet (the
next hop must be adjacent). This behavior is identical to
a next hop specified in the normal routing table.
Sets output interface for the packet. This action specifies
that the packet is forwarded out of the local interface. The
interface must be a Layer 3 interface (no switchports),
and the destination address in the packet must lie within
the IP network assigned to that interface. If the
destination address for the packet does not lie within that
network, the packet is dropped.
Sets next hop to which to route the packet if there is no
explicit route for this destination. Before forwarding the
packet to the next hop, the switch looks up the packet’s
destination address in the unicast routing table. If a match
is found, the packet is forwarded by way of the routing
table. If no match is found, the packet is forwarded to the
specified next hop.
Sets output interface for the packet if there is no explicit
route for this destination. Before forwarding the packet to
the next hop, the switch looks up the packet’s destination
address in the unicast routing table. If a match is found,
the packet is forwarded via the routing table. If no match
is found, the packet is forwarded to the specified output
interface. If the destination address for the packet does
not lie within that network, the packet is dropped.
Step4 Switch(config-route-map)# interface
interface-type interface-number
Specifies the interface. This command puts the router into
interface configuration mode.
Step5 Switch(config-if)# ip policy route-map
map-tag
Identifies the route map to use for PBR. One interface can
only have one route map tag, but you can have multiple route
map entries with different sequence numbers. These entries
are evaluated in sequence number order until the first match.
If there is no match, packets will be routed as usual.
Command Purpose