hw configuration mirror port and observation port

Example for Configuring Local Port Mirroring (N:1)
Networking Diagram

Figure 1 Network diagram for configuring local port mirroring
insert image description here

https://support.huawei.com/hedex/pages/EDOC1100037158AZI0129V/06/EDOC1100037158AZI0129V/06/resources/public_sys-resources/showDiagram.png

· Networking requirements

· Configuration ideas

· Steps

· Configuration file

Networking Requirements
As shown in Figure 1, a company's Technology Department 1, Technology Department 2, and Administration Department communicate with the external Internet through the Switch, and the monitoring device Server is directly connected to the Switch.

Now it is hoped that the traffic of these three departments accessing the Internet can be monitored through the Server.

Configuration Roadmap
Perform the following configurations on the Switch so that the Server can monitor the Internet access traffic of all departments:

  1.   配置接口GE0/0/4为本地观察端口,负责向Server转发镜像报文。
    
  2.   配置接口GE0/0/1~GE0/0/3为镜像端口,将所有部门访问Internet的流量复制一份到本地观察端口。
    

Steps

  1.   配置观察端口
    

Configure GE0/0/4 on the Switch as a local observing port.

system-view
[HUAWEI] sysname Switch
[Switch] observe-port 1 interface gigabitethernet 0/0/4
2. Configure the mirror port

Configure interfaces GE0/0/1 to GE0/0/3 on the Switch as mirror ports, and bind their inbound directions to the local observing port, that is, copy the packets received by the mirroring port to the local observing port.

[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port-mirroring to observe-port 1 inbound
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port-mirroring to observe-port 1 inbound
[Switch-GigabitEthernet0/0/2] quit
[Switch] interface gigabitethernet 0/0/3
[Switch-GigabitEthernet0/0/3] port-mirroring to observe-port 1 inbound
[Switch-GigabitEthernet0/0/3] return
3. 验证配置结果

Check the configuration of the observing port.

display observe-port

Index : 1
Untag-packet : No
Interface : GigabitEthernet0/0/4

Check the configuration of the mirror port.

display port-mirroring

Observe-port 1 : GigabitEthernet0/0/4

Port-mirror:

   Mirror-port               Direction  Observe-port

1 GigabitEthernet0/0/1 Inbound Observe-port 1
2 GigabitEthernet0/0/2 Inbound Observe-port 1
3 GigabitEthernet0/0/3 Inbound Observe-port 1

Configuration file
· Configuration file for Switch

· #
· sysname Switch
· #
· observe-port 1 interface GigabitEthernet0/0/4
· #
· interface GigabitEthernet0/0/1
· port-mirroring to observe-port 1 inbound
· #
· interface GigabitEthernet0/0/2
· port-mirroring to observe-port 1 inbound
· #
· interface GigabitEthernet0/0/3
· port-mirroring to observe-port 1 inbound
· #
· return

Guess you like

Origin blog.csdn.net/Chen118222/article/details/126522714