H3C 二层远程端口镜像(反射端口方式)

H3C 二层远程端口镜像(反射端口方式)

实验拓扑

image

实验需求

在一个二层网络中,SW1、SW2、SW3及监控设备如上图所示连接。

其中,SW1通过端口GigabitEthernet1/0/2和GigabitEthernet1/0/3分别连接PC1和PC2。

SW1 作为镜像源设备,SW2 作为镜像中间设备,SW3 作为镜像目的设备

通过配置二层远程端口镜像,使监控设备可以监控所有进、出市场部的报文。

实验步骤

配置SW1(源设备)

创建远程源镜像组1
<SW1> system-view
[SW1] mirroring-group 1 remote-source
创建VLAN 2作为远程镜像VLAN
[SW1] vlan 2
关闭VLAN 2的MAC地址学习功能
[SW1-vlan2] undo mac-address mac-learning enable
[SW1-vlan2] quit
配置远程源镜像组1的远程镜像VLAN,源端口,反射端口
[SW1] mirroring-group 1 remote-probe vlan 2    //远程镜像VLAN
[SW1] mirroring-group 1 mirroring-port gigabitethernet 1/0/2 both    //源端口
[SW1] mirroring-group 1 mirroring-port gigabitethernet 1/0/3 both    //源端口
[SW1] mirroring-group 1 reflector-port gigabitethernet 1/0/4    //反射端口
This operation may delete all settings made on the interface. Continue? [Y/N]: y
配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过
[SW1] interface gigabitethernet 1/0/1
[SW1-GigabitEthernet1/0/1] port link-type trunk
[SW1-GigabitEthernet1/0/1] port trunk permit vlan 2
[SW1-GigabitEthernet1/0/1] quit

配置SW2(中间设备)

创建VLAN 2作为远程镜像VLAN
<SW2> system-view
[SW2] vlan 2
关闭VLAN 2的MAC地址学习功能
[SW2-vlan2] undo mac-address mac-learning enable
[SW2-vlan2] quit
配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过
[SW2] interface gigabitethernet 1/0/1
[SW2-GigabitEthernet1/0/1] port link-type trunk
[SW2-GigabitEthernet1/0/1] port trunk permit vlan 2
[SW2-GigabitEthernet1/0/1] quit
配置端口GigabitEthernet1/0/2为Trunk口,并允许VLAN 2的报文通过
[SW2] interface gigabitethernet 1/0/2
[SW2-GigabitEthernet1/0/2] port link-type trunk
[SW2-GigabitEthernet1/0/2] port trunk permit vlan 2
[SW2-GigabitEthernet1/0/2] quit

配置SW3(目的设备)

配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过
<SW3> system-view
[SW3] interface gigabitethernet 1/0/1
[SW3-GigabitEthernet1/0/1] port link-type trunk
[SW3-GigabitEthernet1/0/1] port trunk permit vlan 2
[SW3-GigabitEthernet1/0/1] quit
创建远程目的镜像组2
[SW3] mirroring-group 2 remote-destination
创建VLAN 2作为远程镜像VLAN
[SW3] vlan 2
关闭VLAN 2的MAC地址学习功能
[SW3-vlan2] undo mac-address mac-learning enable
[SW3-vlan2] quit
配置远程目的镜像组2的远程镜像VLAN,目的端口,关闭生成树协议
[SW3] mirroring-group 2 remote-probe vlan 2    //远程镜像VLAN
[SW3] interface gigabitethernet 1/0/2
[SW3-GigabitEthernet1/0/2] mirroring-group 2 monitor-port    //远程镜像目的端口
[SW3-GigabitEthernet1/0/2] undo stp enable    //关闭生成树
[SW3-GigabitEthernet1/0/2] port access vlan 2    //加入VLAN2
[SW3-GigabitEthernet1/0/2] quit

配置验证

显示SW1上所有镜像组的配置信息

[SW1] display mirroring-group all
Mirroring group 1:
    Type: Remote source
    Status: Active
    Mirroring port:
        GigabitEthernet1/0/2  Both
        GigabitEthernet1/0/3  Both
    Reflector port: GigabitEthernet1/0/4
    Remote probe VLAN: 2

显示SW3上所有镜像组的配置信息

[SW3] display mirroring-group all
Mirroring group 2:
    Type: Remote destination
    Status: Active
    Monitor port: GigabitEthernet1/0/2
    Remote probe VLAN: 2

注意

二层远程端口镜像的配置需要分别在源设备和目的设备上进行;

如果存在中间设备,则需要在中间设备上允许远程镜像VLAN通过,以确保源设备与目的设备之间的二层网络畅通。

选择设备上未被使用的端口作为反射端口,并不要在该端口上连接网线,否则会影响镜像功能的正常使用。

端口配置为反射口时,该端口上已存在的所有配置都将被清除;在被配置为反射口后,该端口上不能再配置其他业务功能。

请不要将源端口加入到远程镜像VLAN中,否则会影响镜像功能的正常使用。

一个VLAN只能作为一个远程源镜像组的远程镜像VLAN,且建议该VLAN只用于端口镜像,请不要在该VLAN上配置其他业务功能或创建对应的VLAN接口。

远程镜像VLAN必须为静态VLAN,且在被配置成远程镜像VLAN后,该VLAN不能直接删除,必须先删除远程镜像VLAN的配置才能够删除这个VLAN。

HCL 不支持任何镜像 需使用真机测试效果

  • 12
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值