The mac-mirroring command copies packets with a specified MAC address to a specified observing port.
The undo mac-mirroring command restores the default configuration.
By default, packets with a specified MAC address are not copied to a specified observing port.
mac-mirroring mac-address to observe-port observe-port-index inbound
undo mac-mirroring mac-address [ to observe-port observe-port-index ] inbound
Parameter |
Description |
Value |
---|---|---|
mac-address |
Specifies the MAC address. |
The value is in H-H-H format, where H is a hexadecimal number of 1 to 4 digits. |
observe-port-index |
Specifies the index of the observing port. |
The specified observing port must exist. |
Usage Scenario
In MAC address mirroring, you can run the mac-mirroring command to copy packets received with a specified source or destination MAC address in a specified VLAN to a specified observing port.
Prerequisites
An observing port has been configured using the observe-port or observe-port command in the system view.
# Copy packets received of which the source or destination MAC address is 0000-0000-0001 in VLAN 3 to the observing port with index 1.
<HUAWEI> system-view [HUAWEI] observe-port 1 interface gigabitethernet 0/0/1 [HUAWEI] vlan 3 [HUAWEI-vlan3] mac-mirroring 0000-0000-0001 to observe-port 1 inbound