port-mirroring to interface

Function

The port-mirroring to interface command configures port mirroring in integrated mode.

The undo port-mirroring to interface command cancels port mirroring in integrated mode.

By default, port mirroring is not configured on an interface.

Format

port-mirroring to { null0 | interface { interface-type interface-number | interface-name } observe-index observe-index } { inbound | cpu-packet | outbound } [ user-defined-filter id ]

undo port-mirroring to { null0 | interface { interface-type interface-number | interface-name } observe-index observe-index } { inbound | cpu-packet | outbound } [ user-defined-filter id ]

Parameters

Parameter Description Value
interface-type

Specifies an interface type.

-

interface-number

Specifies an interface number.

-

interface-name

Specifies an interface name.

-

observe-index observe-index

Specifies the index of an observing port.

The value is an integer ranging from 1 to 255.

inbound

Indicates incoming packets, to be specific, the packets received by the mirrored port.

-

outbound

Indicates outgoing packets, to be specific, the packets sent by the mirrored port.

-

null0

Indicates that interface null0 functions as the observing port.

-

cpu-packet

Indicates packets to be sent to the CPU.

-

user-defined-filter id

Specifies a user-defined rule ID. Before configuring the user-defined-filter-id parameter to match a packet against a user-defined any byte matching rule, run the observe user-defined-filter command to configure a user-defined any byte matching rule.

The value is an integer ranging from 1 to 8.

Views

100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10G LAN interface view, 10G WAN interface view, 25GE sub-interface view, 25GE interface view, 40GE sub-interface view, 40GE interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, GE optical interface view, GE sub-interface view, EVC view of an Eth-Trunk interface, EVC view of an Ethernet interface

Default Level

3: Management level

Task Name and Operations

Task Name Operations
mirror write

Usage Guidelines

Usage Scenario

In any earlier version, configuring port mirroring is complex and requires the following operations:

  • Run the port-observing observe-index command to configure the observing port.
  • Run the port-mirroring { inbound [ cpu-packet ] | outbound } [ user-defined-filter ] command to configure the mirrored port.
  • Run the port-mirroring to { observe-index | null0 } command to configure the observing port for mirroring.

    To simplify port mirroring configuration, the preceding commands have been integrated into the port-mirroring to interface command.

Precautions

Packets received on an interface can be mirrored to an observing port on any interface board. To be specific, the observing port can be on the local interface board or a different one. If observing ports are specified both on an interface and on an interface board, the traffic on the interface is mirrored to the observing port specified on the interface.

Example

# Configure packets received on GE 0/1/0 to be mirrored to GE 0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/0
[~HUAWEI-GigabitEthernet0/1/0] port-mirroring to interface GigabitEthernet 0/1/1 observe-index 1 inbound
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >