< Home

redirect interface

Function

The redirect interface command configures an action of redirecting packets to an interface in a traffic behavior.

The undo redirect command deletes the redirection configuration.

By default, no action of redirecting packets to an interface is configured in a traffic behavior.

Format

redirect interface interface-type interface-number [ forced ]

undo redirect

Tunnel interfaces do not support forced.

Only the S5720-HI, S5730-HI, S6720-HI, S5731-H, S5731S-H, S5731-S, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S support the action of redirecting packets to a tunnel interface.

Parameters

Parameter

Description

Value

interface interface-type interface-number

Specifies the interface to which packets are redirected.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

forced

Directly discards packets when the interface is in Down state.

-

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The redirect interface command configures an action of redirecting packets to an interface in a traffic behavior. For example, packets can be redirected to a firewall for security check.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing redirection to an interface.

Precautions

The traffic policy that contains the redirection action can only be applied to the system, an interface, or a VLAN in the inbound direction.

The device supports only redirection to Layer 2 physical interfaces and Eth-Trunk interfaces.

The packets that are redirected to an interface will be discarded if the VLAN of the packets on the interface is not allowed.

Example

# Redirect packets to GE0/0/1 in the traffic behavior b1.

<HUAWEI> system-view
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] redirect interface gigabitethernet 0/0/1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >