How can I configure port mirroring on a CE switch

18

Perform the following operations to configure port mirroring:

  1. Run the system-view command to enter the system view.
  2. Run the observe-port [ observe-port-index ] interface interface-type interface-number command to configure a local observing port.
    To configure multiple local observing ports, run this command multiple times.
  3. Run the interface interface-type interface-number command to enter the interface view.
  4. Run the port-mirroring observe-port observe-port-index { both inbound outbound } command to copy traffic to a specified observing port.
    To copy traffic to multiple observing ports, run this command multiple times.
  5. Run the commit command to commit the configuration.


Configuring 1:1 Port Mirroring
You can copy packets on a mirrored port to an observing port. For example, copy incoming packets on mirrored port 10GE1/0/1 to observing port 10GE1/0/2.

<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/2
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 1 inbound
[*HUAWEI-10GE1/0/1] commit

Configuring 1:N Port Mirroring
You can copy packets on one mirrored port to N observing ports. For example, copy incoming packets on mirrored port 10GE1/0/1 to observing ports 10GE1/0/2 and 10GE1/0/3.

<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/2
[*HUAWEI] observe-port 2 interface 10ge 1/0/3
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 1 inbound
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 2 inbound
[*HUAWEI-10GE1/0/1] commit

Configuring N:1 Port Mirroring
You can copy packets on N mirrored ports to one observing port. For example, copy incoming packets on mirrored ports 10GE1/0/1 and 10GE1/0/2 to observing port 10GE1/0/3.

<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/3
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 1 inbound
[*HUAWEI-10GE1/0/1] quit
[*HUAWEI] interface 10ge 1/0/2
[*HUAWEI-10GE1/0/2] port-mirroring observe-port 1 inbound
[*HUAWEI-10GE1/0/2] commit

Other related questions:
How can I configure VLAN mirroring on a CE switch
Perform the following operations to configure VLAN mirroring.
  1. Run the system-view command to enter the system view.
  2. Run the observe-port [ observe-port-index ] interface interface-type interface-number command to configure a local observing port.
    To configure multiple observing ports, run the preceding command multiple times.
  3. Run the vlan vlan-id command to enter the VLAN view.
  4. Run the mirroring observe-port observe-port-index inbound command to copy traffic of the VLAN to the specified observing port.
    To copy traffic to multiple observing ports, run this command multiple times.
  5. Run the commit command to commit the configuration.


For example, you can run the following command to copy traffic of VLAN 10 to the observing port 10GE1/0/2.
<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/2
[*HUAWEI] vlan 10
[*HUAWEI-vlan10] mirroring observe-port 1 inbound
[*HUAWEI-vlan10] commit

Can an Eth-Trunk be configured as a mirrored port on CE switches
An Eth-Trunk can be configured as a mirrored port.
- If an Eth-Trunk is configured as a mirrored port, its member ports cannot be configured as mirrored ports.
- If a member port of an Eth-Trunk is configured as a mirrored port, the Eth-Trunk cannot be configured as a mirrored port.

Configure port mirroring on the S1728GWR-4P switch
Configure port mirroring on an S1728GWR-4P switch as follows: 1. Choose Interface > Port > Mirror and select Add from the Action drop-down list box. 2. Configure Source Port, Target Port, and Type. 3. After completing the configuration, click Apply. Select Show/Delete from the Action drop-down list box to check the current port mirroring configuration.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top