配置远程端口镜像举例
组网需求:
Switch A 通过 GigabitEthernet 2/0/2 和数据检测设备相连
Switch A 的 Trunk 端口 GigabitEthernet 2/0/1 和 Switch B 的 Trunk 端口
GigabitEthernet 2/0/1 相连
Switch B 的 Trunk 端口 GigabitEthernet 2/0/2 和 Switch C 的 Trunk 端口
GigabitEthernet 2/0/1 相连
witch C 的端口 GigabitEthernet 2/0/2 和 PC1 相连
需求为通过数据检测设备对 PC1 发送的报文进行监控和分析。
使用远程端口镜像功能实现该需求,进行如下配置。
定义 VLAN 10 为 Remote-probe VLAN;
Switch A 为目的交换机,连接数据监控设备的端口 GigabitEthernet 2/0/2 为镜
像目的端口。 GigabitEthernet 2/0/2 必须为 Access 端口,并且不能使能 STP及 LACP。
Switch B 为中间交换机
Switch C 为 源 交 换 机 , GigabitEthernet 2/0/2 为 镜 像 源 端 口 , 定 义
GigabitEthernet 2/0/3 为反射端口。 GigabitEthernet 2/0/3 必须为 Access 端口,
并且不能使能 STP 及 LACP。
配置步骤:
# Switch C 的配置
<H3C> system-view
[H3C] vlan 10
[H3C-vlan10] remote-probe vlan enable
[H3C-vlan10] quit
[H3C] interface GigabitEthernet 2/0/1
[H3C-GigabitEthernet2/0/1] port link-type trunk
[H3C-GigabitEthernet2/0/1] port trunk permit vlan 10
[H3C-GigabitEthernet2/0/1] quit
[H3C] mirroring-group 1 remote-source
[H3C] mirroring-group 1 mirroring-port GigabitEthernet 2/0/2 inbound
[H3C] mirroring-group 1 reflector-port GigabitEthernet 2/0/3
[H3C] mirroring-group 1 remote-probe vlan 10
[H3C] display mirroring-group remote-source
mirroring-group 1:
type: remote-source
status: active
mirroring port:
GigabitEthernet2/0/2 inbound
reflector port: GigabitEthernet2/0/3
remote-probe vlan: 10
# Switch B 的配置
<H3C> system-view
[H3C] vlan 10
[H3C-vlan10] remote-probe vlan enable
[H3C-vlan10] quit
[H3C] interface GigabitEthernet 2/0/1
[H3C-GigabitEthernet2/0/1] port link-type trunk
[H3C-GigabitEthernet2/0/1] port trunk permit vlan 10
[H3C-GigabitEthernet2/0/1] quit
[H3C] interface GigabitEthernet 2/0/2
[H3C-GigabitEthernet2/0/2] port link-type trunk
[H3C-GigabitEthernet2/0/2] port trunk permit vlan 10
# Switch A 的配置
<H3C> system-view
[H3C] vlan 10
[H3C-vlan10] remote-probe vlan enable
[H3C-vlan10] quit
[H3C] interface GigabitEthernet 2/0/1
[H3C-GigabitEthernet2/0/1] port link-type trunk
[H3C-GigabitEthernet2/0/1] port trunk permit vlan 10
[H3C-GigabitEthernet2/0/1] quit
[H3C] mirroring-group 1 remote-destination
[H3C] mirroring-group 1 monitor-port GigabitEthernet 2/0/2
[H3C] mirroring-group 1 remote-probe vlan 10
[H3C] display mirroring-group remote-destination
mirroring-group 1:
type: remote-destination
status: active
monitor port: GigabitEthernet2/0/2
remote-probe vlan: 10