您当前的位置: 首页 > 

月梦工作室

暂无认证

  • 3浏览

    0关注

    144博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

端口镜像典型配置

月梦工作室 发布时间:2022-03-28 15:56:43 ,浏览量:3

一、本地端口镜像配置实例 1. 组网需求 某公司内部通过交换机实现各部门之间的互连,网络环境描述如下: 研发部通过端口Ethernet 1/0/1接入Switch C; 市场部通过端口Ethernet 1/0/2接入Switch C; 数据监测设备连接在Switch C的Ethernet 1/0/3端口上。 网络管理员希望通过数据监测设备对研发部和市场部收发的报文进行监控。

使用本地端口镜像功能实现该需求,在Switch C上进行如下配置: 端口Ethernet 1/0/1和Ethernet 1/0/2为镜像源端口; 连接数据监测设备的端口Ethernet 1/0/3为镜像目的端口。

2.组网图 图1配置本地端口镜像组网图

3.配置步骤 配置Switch C: # 创建本地镜像组。 system-view [SwitchC] mirroring-group 1 local # 为本地镜像组配置源端口和目的端口。 [SwitchC] mirroring-group 1 mirroring-port Ethernet 1/0/1 Ethernet 1/0/2 both [SwitchC] mirroring-group 1 monitor-port Ethernet 1/0/3

# 显示所有镜像组的配置信息。 [SwitchC] display mirroring-group all mirroring-group 1: type: local status: active mirroring port: Ethernet1/0/1 both Ethernet1/0/2 both monitor port: Ethernet1/0/3

配置完成后,用户就可以在Server上监控部门1和部门2收发的所有报文。

二、远程端口镜像配置 1.组网需求 某公司内部通过交换机实现各部门之间的互连,网络环境描述如下: Switch A、Switch B和Switch C都为S3610&S5510系列以太网交换机; 部门1通过端口Ethernet 1/0/1接入Switch A; 部门2通过端口Ethernet 1/0/2接入Switch A; Switch A的端口Ethernet 1/0/3和Switch B的端口Ethernet 1/0/1相连; Switch B的端口Ethernet 1/0/2和Switch C的端口Ethernet 1/0/1相连; 数据监测设备连接在Switch C的Ethernet 1/0/2端口上。

网络管理员希望通过数据监测设备对部门1和部门2发送的报文进行监控。

使用远程端口镜像功能实现该需求,进行如下配置: Switch A充当源设备,Switch B充当中间设备,Switch C充当目的设备; 在Switch A上配置远程源镜像组,定义VLAN 2为远程镜像VLAN,端口Ethernet 1/0/1和Ethernet 1/0/2为镜像源端口,端口Ethernet 1/0/4为反射端口; 配置Switch A的端口Ethernet 1/0/3、Switch B的端口Ethernet 1/0/1和Ethernet 1/0/2、Switch C的端口Ethernet1/0/1的端口类型为Trunk端口,并且都允许VLAN 2的报文通过; 在Switch C上配置远程目的镜像组,定义VLAN 2为远程镜像VLAN,连接数据监测设备的端口Ethernet 1/0/2为镜像目的端口。 2.组网图   图2配置远程端口镜像组网图

3.配置步骤 (1) 配置Switch A: # 创建远程源镜像组。 system-view [SwitchA] mirroring-group 1 remote-source # 创建VLAN 2。 [SwitchA] vlan 2 [SwitchA-vlan2] quit

# 为远程源镜像组配置远程镜像VLAN、源端口和反射端口。 [SwitchA] mirroring-group 1 remote-probe vlan 2 [SwitchA] mirroring-group 1 mirroring-port Ethernet 1/0/1 Ethernet 1/0/2 inbound [SwitchA] mirroring-group 1 reflector-port Ethernet 1/0/4

# 配置端口Ethernet 1/0/3的端口类型为Trunk端口,允许VLAN 2的报文通过。 [SwitchA] interface Ethernet 1/0/3 [SwitchA-Ethernet1/0/3] port link-type trunk [SwitchA-Ethernet1/0/3] port trunk permit vlan 2

(2) 配置Switch B: # 配置端口Ethernet 1/0/1的端口类型为Trunk端口,允许VLAN 2的报文通过。 system-view [SwitchB] interface Ethernet 1/0/1 [SwitchB-Ethernet1/0/1] port link-type trunk [SwitchB-Ethernet1/0/1] port trunk permit vlan 2 [SwitchB-Ethernet1/0/1] quit

# 配置端口Ethernet 1/0/2的端口类型为Trunk端口,允许VLAN 2的报文通过。 [SwitchB] interface Ethernet 1/0/2 [SwitchB-Ethernet1/0/2] port link-type trunk [SwitchB-Ethernet1/0/2] port trunk permit vlan 2

(3) 配置Switch C: # 配置端口Ethernet 1/0/1的端口类型为Trunk端口,允许VLAN 2的报文通过。 system-view [SwitchC] interface Ethernet 1/0/1 [SwitchC-Ethernet1/0/1] port link-type trunk [SwitchC-Ethernet1/0/1] port trunk permit vlan 2 [SwitchC-Ethernet1/0/1] quit

# 创建远程目的镜像组。 [SwitchC] mirroring-group 1 remote-destination # 创建VLAN 2。 [SwitchC] vlan 2 [SwitchC-vlan2] quit

# 为远程目的镜像组配置远程镜像VLAN和目的端口。 [SwitchC] mirroring-group 1 remote-probe vlan 2 [SwitchC] mirroring-group 1 monitor-port Ethernet 1/0/2

配置完成后,用户就可以在数据监测设备上监控部门1和部门2发送的所有报文。

关注
打赏
1657736795
查看更多评论
立即登录/注册

微信扫码登录

0.0505s