Configuring Port Mirroring:
By configuring port mirroring, you can copy the traffic on a specified mirroring port to an observing port for analysis. In this manner, you can know the status of the traffic passing through the mirroring port.
Procedure:
Common mirroring mode
a. Run system-view
The system view is displayed.
b. (Optional) Run observe user-defined-filter
A user-defined any byte matching rule for packet mirroring is configured.
c. Run interface interface-type interface-number
The interface view is displayed.
d. Perform either of the following configurations based on requirements:
- Run the port-mirroring { inbound [ cpu-packet ] | outbound } [ user-defined-filter user-defined-filter-id ] command to configure port mirroring.
Note:
If the cpu-packet keyword is configured, only packets to be sent to the CPU are mirrored on the interface.
- Run the port-mirroring { inbound | outbound } vlan vlan-id1 [ to vlan-id2 ] command to configure VLAN-based mirroring.
- Run the port-mirroring { inbound | outbound } pe-vid low-vid [ to high-vid ] ce-vid ce-vlan-id-begin [ to ce-vlan-id-end ] command to configure mirroring based on VLAN segments for inner and outer VLAN tags.
- Run the port-mirroring { inbound | outbound } fragment command to configure the mirroring function in the MP-group interface view.
Note:
This command applies only to the MP-group interface view.
e. Run commit
The configuration is committed.
https://support.huawei.com/enterprise/en/doc/EDOC1100055025/f5bf45d5/configuring-port-mirroring#dc_ne_portmirror_cfg_0025