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.
port-mirroring to observe-port observe-port-index { both | inbound | outbound }
undo port-mirroring [ to observe-port observe-port-index ] { both | inbound | outbound }
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. |
- |
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
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.