华为交换机配置镜像
镜像在交换机中使用场景比较多,如日志审计系统,数据审计系统等。
1、在交换机系统视图模式下,配置观察端口。命令:
[Huawei]observe-port 1 interface GigabitEthernet 0/0/1
2、进入端口之后设置为镜像端口,可设置出流量镜像和入流量镜像,也可全部设置。命令:
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port-mirroring to observe-port 1 inbound
[Huawei-GigabitEthernet0/0/2]port-mirroring to observe-port 1 outbound
//或者
[Huawei-GigabitEthernet0/0/2]port-mirroring to observe-port 1 both
3、查看镜像配置
[Huawei]display port-mirroring
Port-mirror:
Mirror-port Direction Observe-port
GigabitEthernet0/0/2 Both GigabitEthernet0/0/1
GigabitEthernet0/0/3 Both GigabitEthernet0/0/1
GigabitEthernet0/0/6 Inbound GigabitEthernet0/0/5
GigabitEthernet0/0/7 Inbound GigabitEthernet0/0/5
4、删除镜像
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]undo port-mirroring to observe-port 1 both
[Huawei-GigabitEthernet0/0/2]display port-mirroring Port-mirror:
Mirror-port Direction Observe-port
GigabitEthernet0/0/3 Both GigabitEthernet0/0/1
GigabitEthernet0/0/6 Inbound GigabitEthernet0/0/5
GigabitEthernet0/0/7 Inbound GigabitEthernet0/0/5
[Huawei-GigabitEthernet0/0/2]display observe-port
Index : 1
Interface: GigabitEthernet0/0/1
Used : 2
Index : 2
Interface: GigabitEthernet0/0/5
Used : 2
// 清除所有观察口对应的镜像,才可以删除观察口
[Huawei]undo observe-port 1
[Huawei]display observe-port
Index : 2
Interface: GigabitEthernet0/0/5
Used : 2
评论区