Concept Guide

ip redirect-group
Apply a redirect list (policy-based routing) on an interface. You can apply multiple redirect lists to an interface by entering this command
multiple times.
Syntax
ip redirect-group redirect-list-nametest [l2–switch]
To remove a redirect list from an interface, use the no ip redirect-group name command.
Parameters
redirect-list-name Enter the name of a congured redirect list.
l2–switch Enter the keyword l2–switch to enable PBR on Layer2 (switched) trac.
Defaults none
Command Modes INTERFACE (conf-if-vl-)
Supported Modes Full—Switch
Command History
Version Description
9.11(2.0) Introduced the l2–switch attribute.
9.9(0.0) Introduced on the FN IOM.
9.4(0.0) Introduced on the MXL 10/40GbE Switch IO Module.
8.4.2.1 Introduced on the C-Series and S-Series.
8.4.2.0 Introduced on the E-Series TeraScale.
7.4.2.0 Added support for LAG and VLAN interfaces.
7.7.1.0 Introduced on the E-Series ExaScale.
Usage Information
You can apply any number of redirect-groups to an interface. A redirect list can contain any number of congured
rules. These rules includes the next-hop IP address where the incoming trac is to be redirected.
If the next hop address is reachable, trac is forwarded to the specied next hop. Otherwise, the normal routing
table is used to forward trac. When a redirect-group is applied to an interface and the next-hop is reachable, the
rules are added into the PBR CAM region. When incoming trac hits an entry in the CAM, the trac is redirected
to the corresponding next-hop IP address specied in the rule.
NOTE: Apply the redirect list to physical, VLAN, or LAG interfaces only.
The Layer2 PBR option matches the layer2 trac ow. If you un-congure this option, then the Layer2 trac is
not matched. You can apply the
l2–switch option to redirect Layer2 trac only on a VLAN interface. This VLAN
interface must be congured with an IP address for ARP resolution.
NOTE: The l2–switch option that redirects Layer2 trac is applicable only on VLAN interfaces.
The Layer3 routing is not aected on the same interface on which Layer2 PBR is applied. The port from which
Layer2 packets egress and the destination MAC are re-written from static ARP. Layer 2 packets with the re-
written destination MAC are forwarded through the outgoing port on the same incoming VLAN interface. The
layer2-switch option ensures that the outgoing VLAN and MAC-SA are changed and TTL is not decremented.
Related Commands
show cam pbr – displays the content of the PBR CAM.
Policy-based Routing (PBR) 1001