05-H3C_镜像典型配置举例
本章节下载: 05-H3C_镜像典型配置举例 (712.95 KB)
H3C 镜像典型配置举例
Copyright © 2017 新华三技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
|
目 录
本文介绍了端口镜像和流镜像的典型配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解镜像特性。
如图3-1所示,某公司内部各部门使用不同网段的IP地址,其中研发部使用10.1.1.0/24网段,市场部使用12.1.1.0/24网段。现要求通过配置本地端口镜像功能,使用数据监测设备对研发部和市场部访问Internet的流量以及两个部门之间互访的流量进行监控。
本举例是在S3210-CMW710-R7566版本上进行配置和验证的。
· 本地镜像组需要配置源端口、目的端口才能生效。其中目的端口不能是现有镜像组的成员端口。
· 目的端口收到的报文包括复制自源端口的报文和来自其它端口的正常转发报文。为了保证数据监测设备只对源端口的报文进行分析,请将目的端口只用于端口镜像,不作其它用途。
· 如果目的端口是二层接口,请不要将在目的端口上使能生成树协议,否则会影响镜像功能的正常使用。
# 请参考以上方法配置图3-1中其它接口的IP地址,配置步骤这里省略。
# 创建本地镜像组。
[DeviceA] mirroring-group 1 local
# 将GigabitEthernet1/0/17和GigabitEthernet1/0/18配置为镜像源端口,对这两个端口接收的报文进行镜像。
[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/17 gigabitethernet 1/0/18 inbound
# 将GigabitEthernet1/0/19配置为镜像目的端口。
[DeviceA] mirroring-group 1 monitor-port gigabitethernet 1/0/19
# 关闭目的端口GigabitEthernet1/0/19上的生成树协议。
[DeviceA] interface gigabitethernet 1/0/19
[DeviceA-GigabitEthernet1/0/19] undo stp enable
[DeviceA-GigabitEthernet1/0/19] quit
# 在完成上述配置后,在DeviceA上显示镜像组1的配置信息。
[DeviceA] display mirroring-group 1
Mirroring group 1:
Type: Local
Status: Active
Mirroring port:
GigabitEthernet1/0/17 Inbound
GigabitEthernet1/0/18 Inbound
Monitor port: GigabitEthernet1/0/19
# 以研发部某台主机10.1.1.2通过ping方式访问56.56.56.6为例,进行镜像测试,数据监测设备的抓包数据如图3-2所示。
图3-2 Wireshark的抓包数据
以上抓包信息表明,配置的本地镜像功能生效,数据监测设备可以成功对需要监控的流量进行监控。
#
mirroring-group 1 local
#
interface GigabitEthernet1/0/17
combo enable copper
mirroring-group 1 mirroring-port inbound
#
interface GigabitEthernet1/0/18
combo enable copper
mirroring-group 1 mirroring-port inbound
#
interface GigabitEthernet1/0/19
combo enable copper
undo stp enable
mirroring-group 1 monitor-port
#
interface GigabitEthernet1/0/20
combo enable copper
#
如图4-1所示,某公司内部各部门通过二层网络连接到核心设备Device A,各部门使用不同网段的IP地址,其中研发部使用10.1.1.0/24网段,市场部使用12.1.1.0/24网段。现要求通过配置二层远程端口镜像功能,使用数据监测设备对研发部发送的报文进行监控。
· 为确保源设备与目的设备之间的镜像报文可以二层转发,中间设备连接到源设备和目的设备方向的端口上需允许远程镜像VLAN通过。
· 建议用户先配目的设备,再配中间设备,最后配源设备,以保证镜像流量的正常转发。
本举例是在S3210-CMW710-R7566版本上进行配置和验证的。
配置远程端口镜像的目的设备和源设备时均需要注意:
· 配置远程镜像VLAN时:
¡ 要求该VLAN为静态VLAN并预先创建。
¡ 要求该VLAN不用做其他用途,仅用于远程镜像功能。
¡ 要求该VLAN只能被一个远程源镜像组使用。
· 源设备和目的设备上的远程镜像组必须使用相同的远程镜像VLAN。
配置远程端口镜像的目的设备时需要注意:
· 目的端口不能是现有镜像组的成员端口。
· 目的端口不用做其他用途,仅用于端口镜像。
· 如果目的端口是二层接口,请不要在目的端口上使能生成树协议,否则会影响镜像功能的正常使用。
配置远程端口镜像的源设备时需要注意:
· 请不要将源端口加入到远程镜像VLAN中,否则会影响镜像功能的正常使用。
· 建议选择设备上未被使用的端口作为反射端口,且不要在该端口上连接网线,否则会影响镜像功能的正常使用。
· 在将端口配置为反射端口时,该端口上已存在的所有配置都将被清除;在配置为反射端口后,该端口上不能再配置其他业务。
· 只有当端口的双工模式、端口速率和MDI属性值均为缺省值时,才能将其配置为反射端口。当端口已配置为反射端口后,不能再修改其双工模式、端口速率和MDI属性值,即这些属性只能取缺省值。
# 创建业务VLAN 2和VLAN 3。
<DeviceA> system-view
[DeviceA] vlan 2 to 3
# 创建VLAN 2接口和VLAN 3接口并配置IP地址作为相应VLAN的网关。
[DeviceA] interface Vlan-interface 2
[DeviceA-Vlan-interface2] ip address 10.1.1.1 24
[DeviceA-Vlan-interface2] quit
[DeviceA] interface Vlan-interface 3
[DeviceA-Vlan-interface3] ip address 12.1.1.1 24
[DeviceA-Vlan-interface3] quit
# 配置端口GigabitEthernet 1/0/17的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/17
[DeviceA-GigabitEthernet1/0/17] port link-type trunk
[DeviceA-GigabitEthernet1/0/17] port trunk permit vlan 2 3 5
[DeviceA-GigabitEthernet1/0/17] quit
# 配置端口GigabitEthernet1/0/18的端口类型为Trunk端口,允许业务VLAN 2和镜像VLAN 5的报文通过。
[DeviceA] interface gigabitethernet 1/0/18
[DeviceA-GigabitEthernet1/0/18] port link-type trunk
[DeviceA-GigabitEthernet1/0/18] port trunk permit vlan 2 5
[DeviceA-GigabitEthernet1/0/18] quit
# 创建远程目的镜像组1。
[DeviceA] mirroring-group 1 remote-destination
# 创建VLAN 5作为远程镜像VLAN。
[DeviceA] vlan 5
[DeviceA-vlan5] quit
# 为远程目的镜像组1配置远程镜像VLAN为VLAN 5,及配置连接数据监测设备的端口GigabitEthernet 1/0/19为目的端口。
[DeviceA] mirroring-group 1 remote-probe vlan 5
[DeviceA] mirroring-group 1 monitor-port gigabitethernet 1/0/19
# 将镜像目的端口加入远程镜像VLAN。将镜像数据发送给监测设备时,不需要携带远程镜像VLAN的VLAN Tag,因此将该端口配置为Access端口。
[DeviceA] interface gigabitethernet 1/0/19
[DeviceA-GigabitEthernet1/0/19] port access vlan 5
# 关闭目的端口GigabitEthernet1/0/19上的生成树协议。
[DeviceA-GigabitEthernet1/0/19] undo stp enable
[DeviceA-GigabitEthernet1/0/19] quit
# 创建业务VLAN 2和VLAN 3。
<DeviceB> system-view
[DeviceB] vlan 2 to 3
# 创建VLAN 5作为远程镜像VLAN。
[DeviceB] vlan 5
[DeviceB-vlan5] quit
# 配置端口GigabitEthernet 1/0/17的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
[DeviceB] interface gigabitethernet 1/0/17
[DeviceB-GigabitEthernet1/0/17] port link-type trunk
[DeviceB-GigabitEthernet1/0/17] port trunk permit vlan 2 3 5
[DeviceB-GigabitEthernet1/0/17] quit
# 配置端口GigabitEthernet 1/0/18的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
[DeviceB] interface gigabitethernet 1/0/18
[DeviceB-GigabitEthernet1/0/18] port link-type trunk
[DeviceB-GigabitEthernet1/0/18] port trunk permit vlan 2 3 5
[DeviceB-GigabitEthernet1/0/18] quit
# 创建业务VLAN 2和VLAN 3。
<DeviceC> system-view
[DeviceC] vlan 2 to 3
# 将端口GigabitEthernet 1/0/17加入VLAN 2。
[DeviceC] interface gigabitethernet 1/0/17
[DeviceC-GigabitEthernet1/0/17] port access vlan 2
[DeviceC-GigabitEthernet1/0/17] quit
# 将端口GigabitEthernet 1/0/18加入VLAN 3。
[DeviceC] interface gigabitethernet 1/0/18
[DeviceC-GigabitEthernet1/0/18] port access vlan 3
[DeviceC-GigabitEthernet1/0/18] quit
# 创建远程源镜像组1。
[DeviceC] mirroring-group 1 remote-source
# 创建VLAN 5作为远程镜像VLAN。
[DeviceC] vlan 5
[DeviceC-vlan5] quit
# 配置远程源镜像组1的远程镜像VLAN为VLAN 5,源端口为GigabitEthernet1/0/17,反射端口为GigabitEthernet1/0/21。
[DeviceC] mirroring-group 1 remote-probe vlan 5
[DeviceC] mirroring-group 1 mirroring-port gigabitethernet 1/0/17 inbound
[DeviceC] mirroring-group 1 reflector-port gigabitethernet 1/0/21
This operation may delete all settings made on the interface. Continue? [Y/N]: y
# 配置端口GigabitEthernet 1/0/19的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
[DeviceC] interface gigabitethernet 1/0/19
[DeviceC-GigabitEthernet1/0/19] port link-type trunk
[DeviceC-GigabitEthernet1/0/19] port trunk permit vlan 2 3 5
[DeviceC-GigabitEthernet1/0/19] quit
# 创建业务VLAN 2。
<DeviceD> system-view
[DeviceD] vlan 2
[DeviceD-vlan2] quit
# 将端口GigabitEthernet 1/0/17加入VLAN 2。
[DeviceD] interface gigabitethernet 1/0/17
[DeviceD-GigabitEthernet1/0/17] port access vlan 2
[DeviceD-GigabitEthernet1/0/17] quit
# 创建远程源镜像组1。
[DeviceD] mirroring-group 1 remote-source
# 创建VLAN 5作为远程镜像VLAN。
[DeviceD] vlan 5
[DeviceD-vlan5] quit
# 配置远程源镜像组1的远程镜像VLAN为VLAN 5,对源端口GigabitEthernet1/0/17入方向进行镜像,反射端口为GigabitEthernet1/0/21。
[DeviceD] mirroring-group 1 remote-probe vlan 5
[DeviceD] mirroring-group 1 mirroring-port gigabitethernet 1/0/17 inbound
[DeviceD] mirroring-group 1 reflector-port gigabitethernet 1/0/21
This operation may delete all settings made on the interface. Continue? [Y/N]: y
# 配置端口GigabitEthernet 1/0/18的端口类型为Trunk端口,允许业务VLAN 2和镜像VLAN 5的报文通过。
[DeviceD] interface gigabitethernet 1/0/18
[DeviceD-GigabitEthernet1/0/18] port link-type trunk
[DeviceD-GigabitEthernet1/0/18] port trunk permit vlan 2 5
# 在完成上述配置后,在DeviceC上显示镜像组1的配置信息。
[DeviceC] display mirroring-group 1
Mirroring group 1:
Type: Remote source
Status: Active
Mirroring port:
GigabitEthernet1/0/17 Inbound
Reflector port: GigabitEthernet1/0/21
Remote probe VLAN: 5
# 在DeviceA上显示镜像组1的配置信息。
[DeviceA] display mirroring-group 1
Mirroring group 1:
Type: Remote destination
Status: Active
Monitor port: GigabitEthernet1/0/19
Remote probe VLAN: 5
# 以研发部某台主机10.1.1.2通过ping方式访问市场部某台主机12.1.1.2为例,进行镜像测试,数据监测设备的抓包数据如图4-2所示。
图4-2 Wireshark的抓包数据
以上抓包信息表明,配置的二层远程端口镜像功能生效,数据监测设备可以成功对对研发部发送的报文进行监控。
· 设备Device A:
#
mirroring-group 1 remote-destination
mirroring-group 1 remote-probe vlan 5
#
vlan 2 to 3
#
vlan 5
#
interface Vlan-interface2
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface3
ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/17
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
interface GigabitEthernet1/0/18
port link-type trunk
port trunk permit vlan 1 to 2 5
combo enable copper
#
interface GigabitEthernet1/0/19
port access vlan 5
combo enable copper
undo stp enable
mirroring-group 1 monitor-port
#
· 设备Device B:
#
vlan 2 to 3
#
vlan 5
#
interface GigabitEthernet1/0/17
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
interface GigabitEthernet1/0/18
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
· 设备Device C:
#
mirroring-group 1 remote-source
mirroring-group 1 remote-probe vlan 5
#
vlan 2 to 3
#
vlan 5
#
interface GigabitEthernet1/0/17
port access vlan 2
combo enable copper
mirroring-group 1 mirroring-port inbound
#
interface GigabitEthernet1/0/18
combo enable copper
port access vlan 3
#
interface GigabitEthernet1/0/19
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
interface GigabitEthernet1/0/21
combo enable copper
mirroring-group 1 reflector-port
#
· 设备Device D:
#
mirroring-group 1 remote-source
mirroring-group 1 remote-probe vlan 5
#
vlan 2
#
vlan 5
#
interface GigabitEthernet1/0/17
port access vlan 2
combo enable copper
mirroring-group 1 mirroring-port inbound
#
interface GigabitEthernet1/0/18
port link-type trunk
port trunk permit vlan 1 to 2 5
combo enable copper
#
interface GigabitEthernet1/0/21
combo enable copper
mirroring-group 1 reflector-port
#
如图4-1所示,某公司内部各部门通过二层网络连接到核心设备Device A,各部门使用不同网段的IP地址,其中研发部使用10.1.1.0/24网段,市场部使用12.1.1.0/24网段。现要求通过配置二层远程端口镜像功能,使用数据监测设备对研发部发送的报文进行监控。
图5-1 二层远程端口镜像组网图
· 为确保源设备与目的设备之间的镜像报文可以二层转发,中间设备连接到源设备和目的设备方向的端口上需允许远程镜像VLAN通过。
· 建议用户先配目的设备,再配中间设备,最后配源设备,以保证镜像流量的正常转发。
本举例是在S3210-CMW710-R7566版本上进行配置和验证的。
配置远程端口镜像的目的设备和源设备时均需要注意:
· 配置远程镜像VLAN时:
¡ 要求该VLAN为静态VLAN并预先创建。
¡ 要求该VLAN不用做其他用途,仅用于远程镜像功能。
¡ 要求该VLAN只能被一个远程源镜像组使用。
· 源设备和目的设备上的远程镜像组必须使用相同的远程镜像VLAN。
配置远程端口镜像的目的设备时需要注意:
· 目的端口不能是现有镜像组的成员端口。
· 目的端口不用做其他用途,仅用于端口镜像。
· 如果目的端口是二层接口,请不要在目的端口上使能生成树协议,否则会影响镜像功能的正常使用。
配置远程端口镜像的源设备时需要注意:
· 请不要将源端口加入到远程镜像VLAN中,否则会影响镜像功能的正常使用。
· 请不要在出端口上配置下列功能:生成树协议、IGMP Snooping、静态ARP和MAC地址学习,否则会影响镜像功能的正常使用。
· 出端口不能是现有镜像组的成员端口。
· 一个镜像组内只能配置一个出端口。
· 源端口为三层接口时,只能通过配置出端口方式实现二层远程镜像。
# 创建业务VLAN 2和VLAN 3。
<DeviceA> system-view
[DeviceA] vlan 2 to 3
# 创建VLAN 2接口和VLAN 3接口并配置IP地址作为相应VLAN的网关。
[DeviceA] interface Vlan-interface 2
[DeviceA-Vlan-interface2] ip address 10.1.1.1 24
[DeviceA-Vlan-interface2] quit
[DeviceA] interface Vlan-interface 3
[DeviceA-Vlan-interface3] ip address 12.1.1.1 24
[DeviceA-Vlan-interface3] quit
# 配置端口GigabitEthernet 1/0/17的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/17
[DeviceA-GigabitEthernet1/0/17] port link-type trunk
[DeviceA-GigabitEthernet1/0/17] port trunk permit vlan 2 3 5
[DeviceA-GigabitEthernet1/0/17] quit
# 配置端口GigabitEthernet1/0/18的端口类型为Trunk端口,允许业务VLAN 2和镜像VLAN 5的报文通过。
[DeviceA] interface gigabitethernet 1/0/18
[DeviceA-GigabitEthernet1/0/18] port link-type trunk
[DeviceA-GigabitEthernet1/0/18] port trunk permit vlan 2 5
[DeviceA-GigabitEthernet1/0/18] quit
# 创建远程目的镜像组1。
[DeviceA] mirroring-group 1 remote-destination
# 创建VLAN 5作为远程镜像VLAN。
[DeviceA] vlan 5
[DeviceA-vlan5] quit
# 为远程目的镜像组1配置远程镜像VLAN为VLAN 5,及配置连接数据监测设备的端口GigabitEthernet 1/0/19为目的端口。
[DeviceA] mirroring-group 1 remote-probe vlan 5
[DeviceA] mirroring-group 1 monitor-port gigabitethernet 1/0/19
# 将镜像目的端口加入远程镜像VLAN。将镜像数据发送给监测设备时,不需要携带远程镜像VLAN的VLAN Tag,因此将该端口配置为Access端口。
[DeviceA] interface gigabitethernet 1/0/19
[DeviceA-GigabitEthernet1/0/19] port access vlan 5
# 关闭目的端口GigabitEthernet1/0/19上的生成树协议。
[DeviceA-GigabitEthernet1/0/19] undo stp enable
[DeviceA-GigabitEthernet1/0/19] quit
# 创建业务VLAN 2和VLAN 3。
<DeviceB> system-view
[DeviceB] vlan 2 to 3
# 创建VLAN 5作为远程镜像VLAN。
[DeviceB] vlan 5
[DeviceB-vlan5] quit
# 配置端口GigabitEthernet 1/0/17的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
[DeviceB] interface gigabitethernet 1/0/17
[DeviceB-GigabitEthernet1/0/17] port link-type trunk
[DeviceB-GigabitEthernet1/0/17] port trunk permit vlan 2 3 5
[DeviceB-GigabitEthernet1/0/17] quit
# 配置端口GigabitEthernet 1/0/18的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
[DeviceB] interface gigabitethernet 1/0/18
[DeviceB-GigabitEthernet1/0/18] port link-type trunk
[DeviceB-GigabitEthernet1/0/18] port trunk permit vlan 2 3 5
[DeviceB-GigabitEthernet1/0/18] quit
# 创建业务VLAN 2和VLAN 3。
<DeviceC> system-view
[DeviceC] vlan 2 to 3
# 将端口GigabitEthernet 1/0/17加入VLAN 2。
[DeviceC] interface gigabitethernet 1/0/17
[DeviceC-GigabitEthernet1/0/17] port access vlan 2
[DeviceC-GigabitEthernet1/0/17] quit
# 将端口GigabitEthernet 1/0/18加入VLAN 3。
[DeviceC] interface gigabitethernet 1/0/18
[DeviceC-GigabitEthernet1/0/18] port access vlan 3
[DeviceC-GigabitEthernet1/0/18] quit
# 创建远程源镜像组1。
[DeviceC] mirroring-group 1 remote-source
# 创建VLAN 5作为远程镜像VLAN。
[DeviceC] vlan 5
[DeviceC-vlan5] quit
# 配置远程源镜像组1的远程镜像VLAN为VLAN 5,源端口为GigabitEthernet1/0/17,出端口为GigabitEthernet1/0/19。
[DeviceC] mirroring-group 1 remote-probe vlan 5
[DeviceC] mirroring-group 1 mirroring-port gigabitethernet 1/0/17 inbound
[DeviceC] mirroring-group 1 monitor-egress gigabitEthernet 1/0/19
# 配置端口GigabitEthernet 1/0/19的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。
[DeviceC] interface gigabitethernet 1/0/19
[DeviceC-GigabitEthernet1/0/19] port link-type trunk
[DeviceC-GigabitEthernet1/0/19] port trunk permit vlan 2 3 5
[DeviceC-GigabitEthernet1/0/19] quit
# 关闭出端口GigabitEthernet1/0/19上的生成树协议、MAC地址学习功能。
[DeviceC-GigabitEthernet1/0/19] undo stp enable
[DeviceC-GigabitEthernet1/0/19] undo mac-address mac-learning enable
[DeviceC-GigabitEthernet1/0/19] quit
# 创建业务VLAN 2。
<DeviceD> system-view
[DeviceD] vlan 2
[DeviceD-vlan2] quit
# 将端口GigabitEthernet 1/0/17加入VLAN 2。
[DeviceD] interface gigabitethernet 1/0/17
[DeviceD-GigabitEthernet1/0/17] port access vlan 2
[DeviceD-GigabitEthernet1/0/17] quit
# 创建远程源镜像组1。
[DeviceD] mirroring-group 1 remote-source
# 创建VLAN 5作为远程镜像VLAN。
[DeviceD] vlan 5
[DeviceD-vlan5] quit
# 配置远程源镜像组1的远程镜像VLAN为VLAN 5,对源端口GigabitEthernet1/0/17入方向进行镜像,出端口为GigabitEthernet1/0/18。
[DeviceD] mirroring-group 1 remote-probe vlan 5
[DeviceD] mirroring-group 1 mirroring-port gigabitethernet 1/0/17 inbound
[DeviceD] mirroring-group 1 monitor-egress gigabitEthernet 1/0/18
# 配置端口GigabitEthernet 1/0/18的端口类型为Trunk端口,允许业务VLAN 2和镜像VLAN 5的报文通过。
[DeviceD] interface gigabitethernet 1/0/18
[DeviceD-GigabitEthernet1/0/18] port link-type trunk
[DeviceD-GigabitEthernet1/0/18] port trunk permit vlan 2 5
# 关闭出端口GigabitEthernet1/0/18上的生成树协议、MAC地址学习功能。
[DeviceD-GigabitEthernet1/0/18] undo stp enable
[DeviceD-GigabitEthernet1/0/18] undo mac-address mac-learning enable
[DeviceD-GigabitEthernet1/0/18] quit
# 在完成上述配置后,在DeviceC上显示镜像组1的配置信息。
[DeviceC] display mirroring-group 1
Mirroring group 1:
Type: Remote source
Status: Active
Mirroring port:
GigabitEthernet1/0/17 Inbound
Monitor egress port: GigabitEthernet1/0/19
Remote probe VLAN: 5
# 在DeviceA上显示镜像组1的配置信息。
[DeviceA] display mirroring-group 1
Mirroring group 1:
Type: Remote destination
Status: Active
Monitor port: GigabitEthernet1/0/19
Remote probe VLAN: 5
# 以研发部某台主机10.1.1.2通过ping方式访问市场部某台主机12.1.1.2为例,进行镜像测试,数据监测设备的抓包数据如图4-2所示。
图5-2 Wireshark的抓包数据
以上抓包信息表明,配置的二层远程端口镜像功能生效,数据监测设备可以成功对对研发部发送的报文进行监控。
· 设备Device A:
#
mirroring-group 1 remote-destination
mirroring-group 1 remote-probe vlan 5
#
vlan 2 to 3
#
vlan 5
#
interface Vlan-interface2
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface3
ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/17
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
interface GigabitEthernet1/0/18
port link-type trunk
port trunk permit vlan 1 to 2 5
combo enable copper
#
interface GigabitEthernet1/0/19
port access vlan 5
combo enable copper
undo stp enable
mirroring-group 1 monitor-port
#
· 设备Device B:
#
vlan 2 to 3
#
vlan 5
#
interface GigabitEthernet1/0/17
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
interface GigabitEthernet1/0/18
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
#
· 设备Device C:
#
mirroring-group 1 remote-source
mirroring-group 1 remote-probe vlan 5
#
vlan 2 to 3
#
vlan 5
#
interface GigabitEthernet1/0/17
port access vlan 2
mirroring-group 1 mirroring-port inbound
combo enable copper
#
interface GigabitEthernet1/0/18
port access vlan 3
combo enable copper
#
interface GigabitEthernet1/0/19
port link-type trunk
port trunk permit vlan 1 to 3 5
combo enable copper
mirroring-group 1 monitor-egress
#
interface GigabitEthernet1/0/21
combo enable copper
mirroring-group 1 reflector-port
#
· 设备Device D:
#
mirroring-group 1 remote-source
mirroring-group 1 remote-probe vlan 5
#
vlan 2
#
vlan 5
#
interface GigabitEthernet1/0/17
port access vlan 2
combo enable copper
mirroring-group 1 mirroring-port inbound
#
interface GigabitEthernet1/0/18
port link-type trunk
port trunk permit vlan 1 to 2 5
combo enable copper
mirroring-group 1 monitor-egress
#
· H3C S3210系列以太网PON OLT交换机 网络管理和监控配置指导-R7566
· H3C S3210系列以太网PON OLT交换机 网络管理和监控命令参考-R7566
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!