< Home

port-mirroring to observe-port

Function

The port-mirroring to observe-port command configures a mirrored port and bind it to an observing port. That is, copy packets on the mirrored port to a specified observing port.

The undo port-mirroring command restores the default configuration.

By default, there are no mirrored ports on the device.

Format

port-mirroring to observe-port observe-port-index { both | inbound | outbound }

undo port-mirroring [ to observe-port observe-port-index ] { both | inbound | outbound }

Parameters

Parameter Description Value

observe-port-index

Specifies the index of observing ports.

The specified observing port must exist.

both

Copies inbound and outbound packets on a mirrored port to observing ports.

-

inbound

Copies inbound packets on a mirrored port to observing ports.

-

outbound

Copies outbound packets on a mirrored port to observing ports.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

In port mirroring, you can run the port-mirroring to observe-port command to copy packets that pass through a mirrored port to specified observing ports.

Prerequisites

Observing ports have been configured using the observe-port (local observing port) or observe-port (Layer 2 remote observing port) command in the system view.

Precautions

To prevent mirrored packets from being lost, ensure that mirrored and monitoring ports have the same port type and bandwidth.

Both physical interfaces and Eth-Trunks can be configured as mirrored ports. If an Eth-Trunk is configured as a mirrored port, its member ports cannot be configured as observing ports.

Example

# Configure port mirroring for inbound packets on GigabitEthernet0/0/1.

<HUAWEI> system-view
[HUAWEI] observe-port 1 interface gigabitethernet 0/0/2
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port-mirroring to observe-port 1 inbound
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic