Huawei Switch Port Mirror Configuration
Introduction
Port mirroring is a feature that connects a monitoring device directly to the observation port to deliver copied packets from a mirroring port directly to the monitoring device. Port mirroring is very useful for locating faults and monitoring services.
Configuration Steps
Observation Port Configuration
- Set GE1/0/2 of the switch as the observation port.
<Switch> system-view
[Switch] sysname Switch
[Switch] observe-port 1 interface gigabitethernet 1/0/2
Mirroring Port Configuration
- Set GE1/0/1 of the switch as the mirroring port to copy internet access traffic of the management department to the observation port.
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] port-mirroring to observe-port 1 inbound
[Switch-GigabitEthernet1/0/1] return
Configuration Verification
- Verify the configuration of the observation and mirroring ports.
<Switch> display observe-port
---------------------------------------------
Index : 1
Untag-packet : No
Forwarding : No
Interface : GigabitEthernet1/0/2
---------------------------------------------
<Switch> display port-mirroring
---------------------------------------------
Observe-port 1 : GigabitEthernet1/0/2
---------------------------------------------
Port-mirror:
---------------------------------------------
1 GigabitEthernet1/0/1 Inbound Observe-port 1
---------------------------------------------
Configuration Precautions
- The observation port used for mirroring should be dedicated and not configured for other services. Do not configure Eth-Trunk member ports as observation ports. If you do so, ensure that the service traffic bandwidth and mirroring traffic bandwidth of this port do not exceed the port bandwidth limit.
- If many ports on a single device are assigned with mirroring functions, internal transmission bandwidth will be occupied, affecting the delivery of other services. Additionally, if the mirroring port bandwidth is higher than the observation port bandwidth (e.g., 1000 Mbit/s on the mirroring port and 100 Mbit/s on the observation port), the observation port will not have enough bandwidth to deliver all the mirroring packets in time, causing packet loss.
- Both physical interfaces and Eth-Trunks can be configured as mirroring ports. If an Eth-Trunk is configured as a mirroring port, its member ports cannot be configured as observation ports.
Conclusion
Port mirroring is very useful for locating faults and monitoring services. However, it is important to follow the precautions when configuring it and set the mirroring port bandwidth and observation port bandwidth appropriately. This will enable effective use of port mirroring.
반응형
댓글