Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Series Switches
Common Operation Guide 5 Common Mirroring Operations
<HUAWEI> system-view
[HUAWEI] observe-port 1 interface-range gigabitethernet 1/0/1 to
gigabitEthernet 1/0/3 vlan 10
Related Content
Support Community
Mirroring – an Effective Network Monitoring Tool (Working Mechanism and
Configuration)
Videos
How to Configure Port Mirroring
2. Create an ACL. For example, create a Layer 2 ACL to match packets with 802.1p
priority 6.
[HUAWEI] acl 4001
[HUAWEI-acl-L2-4001] rule permit 8021p 6
[HUAWEI-acl-L2-4001] quit
– Copy packets with 802.1p priority 6 in the inbound direction of all the ports in
VLAN 10 to observing port GE1/0/1.
[HUAWEI] traffic-mirror vlan 10 inbound acl 4001 to observe-port 1
2. Create a traffic classifier. For example, create a traffic classifier c1 to match packets with
802.1p priority 6.
[HUAWEI] traffic classifier c1
[HUAWEI-classifier-c1] if-match 8021p 6
[HUAWEI-classifier-c1] quit
3. Create a traffic behavior with the mirroring action. For example, create a traffic behavior
b1 and set the action to traffic mirroring.
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] mirroring to observe-port 1
[HUAWEI-behavior-b1] quit
4. Create a traffic policy and bind the traffic classifier and traffic behavior to the traffic
policy. For example, create a traffic policy p1 and bind the traffic classifier and traffic
behavior to the traffic policy.
[HUAWEI] traffic policy p1
[HUAWEI-trafficpolicy-p1] classifier c1 behavior b1
[HUAWEI-trafficpolicy-p1] quit
– Copy packets with 802.1p priority 6 in the inbound direction of all the ports in
VLAN 10 to observing port GE1/0/1.
[HUAWEI] vlan 10
[HUAWEI-vlan10] traffic-policy p1 inbound
...
#
interface GigabitEthernet1/0/1
#
interface GigabitEthernet1/0/2
...
...
#
interface GigabitEthernet2/0/1
port-mirroring to observe-port 2 inbound
#
...
...
2. Run the undo port-mirroring command on the mirrored port to delete the binding
between the observing port and mirrored port and restore the mirrored port as a common
port. For example, restore GE2/0/1 in step 1 to a common port.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] undo port-mirroring to observe-port 2 inbound
[HUAWEI-GigabitEthernet2/0/1] quit
3. Run the undo observe-port command in the system view to delete the observing port.
For example, delete the observing port in step 1 and restore GE1/0/1 to a common port.
[HUAWEI] undo observe-port 2
You can delete the observing port only after deleting the binding between the observing
port and mirrored port.