redirect

Use redirect to configure a traffic redirecting action in the traffic behavior.

Use undo redirect to delete the traffic redirecting action.

Syntax

redirect { cpu | interface interface-type interface-number [ track-oap ] [ vlan vlan-id ] }

undo redirect { cpu | interface interface-type interface-number }

Default

No traffic redirecting action is configured.

Views

Traffic behavior view

Predefined user roles

network-admin

mdc-admin

Parameters

cpu: Redirects traffic to the CPU.

interface: Redirects traffic to an interface.

interface-type interface-number: Specifies an interface by its type and number. Only Layer 2 Ethernet interfaces and Layer 2 aggregate interfaces are supported.

track-oap: Redirects traffic only when OAP clients are present.

vlan vlan-id: Tags traffic redirected to an interface with the VLAN tag specified by vlan-id, which ranges from 1 to 4094.

Usage guidelines

Redirecting traffic to the CPU and redirecting traffic to an interface are mutually exclusive with each other in the same traffic behavior. The most recent redirecting action configured takes effect.

If you specify the track-oap keyword, the switch detects the presence of OAP clients and redirects traffic to the interface only when OAP clients are present.

In IRF mode, the switch does not support redirecting traffic to an aggregate interface.

In IRF mode, the switch supports cross-chassis redirecting for only OAP cards (redirecting traffic to an outgoing interface on an OAP card of a different IRF member device than the incoming interface).

Examples

# Configure redirecting traffic to GigabitEthernet 3/0/1 in traffic behavior database.

<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect interface gigabitethernet 3/0/1

Related commands