端口镜像典型配置

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

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

2.组网图

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

3.配置步骤
配置Switch C:
# 创建本地镜像组。
<SwitchC> 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.组网需求
某公司内部通过交换机实现各部门之间的互连,网络环境描述如下:
<1>Switch A、Switch B和Switch C都为S3610&S5510系列以太网交换机;
<2>部门1通过端口Ethernet 1/0/1接入Switch A;
<3>部门2通过端口Ethernet 1/0/2接入Switch A;
<4>Switch A的端口Ethernet 1/0/3和Switch B的端口Ethernet 1/0/1相连;
<5>Switch B的端口Ethernet 1/0/2和Switch C的端口Ethernet 1/0/1相连;
<6>数据监测设备连接在Switch C的Ethernet 1/0/2端口上。

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

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

3.配置步骤
(1) 配置Switch A:
# 创建远程源镜像组。
<SwitchA> 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的报文通过。
<SwitchB> 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的报文通过。
<SwitchC> 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发送的所有报文。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月梦工作室

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值