首页 > IT基础架构 > 网络通信/物联网 > 交换机M:N端口镜像配置
交换机M:N端口镜像配置
昨天,在BBS上看到有问“怎样做镜像分流”的,原因是现网环境下,需要旁路部署的安全设备越来越多,交换机上需要将流量镜像到多个目标端口/监视端口。
交换机要进行M:N的端口镜像,从配置上来讲,也是一个M:1的端口镜像,只是这个“1”是1个特殊端口,称为“反射端口”,再通过这个特殊端口,将流量引入由N个端口组成的另一个“1”,1个VLAN,加入这个VLAN的接口就都能接收到镜像的流量了。
不多说了,直接贴出设备的相关配置。
锐捷交换机配置:
S12010#sh runn
version RGOS 10.4(3b17)p3T49 Release(217732)(Fri Jan 5 10:05:13 CST 2018 -ngcf63)
vlan 4050
remote-span
!
interface GigabitEthernet 1/1/19
switchport mode trunk
switchport trunk allowed vlan remove 4050 //Trunk 接口裁减掉镜像流量的VLAN
!
interface GigabitEthernet 1/7/28
switchport access vlan 4050 // 加入VLAN的接口可以接收镜像流量
!
interface AggregatePort 6
switchport mode trunk
switchport trunk allowed vlan remove 4050 //Trunk 接口裁减掉镜像流量的VLAN
!
monitor session 3 remote-source
monitor session 3 destination remote vlan 4050 interface GigabitEthernet 2/8/12
monitor session 3 source interface AggregatePort 6 both // 加入镜像源端口
......
H3C V5 交换机配置:
[HXSW]disp cur
version 5.20, Release 6708P03
#
mirroring-group 1 remote-source
mirroring-group 1 remote-probe vlan 999
#
vlan 999
#
interface Bridge-Aggregation10
port link-type trunk
port trunk permit vlan 1 to 998 1000 to 4094 //Trunk 接口裁减掉镜像流量的VLAN
#
interface GigabitEthernet1/2/0/13
port access vlan 999
#
interface GigabitEthernet1/2/0/14
port access vlan 999
#
interface GigabitEthernet1/3/0/1
mirroring-group 1 mirroring-port inbound
#
interface GigabitEthernet1/3/0/2
mirroring-group 1 mirroring-port inbound
#
H3C V7 交换机配置:
[core]disp cur
version 7.1.070, Release 7536P05
#
mirroring-group 1 local
mirroring-group 2 local
#
interface GigabitEthernet1/2/0/1
mirroring-group 1 mirroring-port both
mirroring-group 2 mirroring-port both
#
interface GigabitEthernet1/2/0/2
mirroring-group 1 mirroring-port both
mirroring-group 2 mirroring-port both
#
interface GigabitEthernet2/2/0/43
mirroring-group 1 monitor-port
#
interface GigabitEthernet2/2/0/44
mirroring-group 2 monitor-port
#
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/81227/viewspace-2671049/ ,如需转载,请注明出处,否则将追究法律责任。