WP5024交换机如何做端口镜像,需要怎么配置?配置举个例子,谢谢
WP5024交换机如何做端口镜像,需要怎么配置?配置举个例子,谢谢
(0)
最佳答案
Device通过端口GigabitEthernet1/0/1和GigabitEthernet1/0/2分别连接市场部和技术部,并通过端口GigabitEthernet1/0/3连接Server。
通过配置源端口方式的本地端口镜像,使Server可以监控所有进、出市场部和技术部的报文。
# 创建本地镜像组1。
<Device> system-view
[Device] mirroring-group 1 local
# 配置本地镜像组1的源端口为GigabitEthernet1/0/1和GigabitEthernet1/0/2,对源端口收发的报文都进行镜像,目的端口为GigabitEthernet1/0/3。
[Device] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 gigabitethernet 1/0/2 both
[Device] mirroring-group 1 monitor-port gigabitethernet 1/0/3
# 在目的端口GigabitEthernet1/0/3上关闭生成树协议。
[Device] interface gigabitethernet 1/0/3
[Device-GigabitEthernet1/0/3] undo stp enable
[Device-GigabitEthernet1/0/3] quit
# 显示所有镜像组的配置信息。
[Device] display mirroring-group all
Mirroring group 1:
Type: Local
Status: Active
Mirroring port:
GigabitEthernet1/0/1 Both
GigabitEthernet1/0/2 Both
Monitor port: GigabitEthernet1/0/3
配置完成后,用户可以通过Server监控所有进、出市场部和技术部的报文。
在一个二层网络中,Device A、Device B、Device C及Server如下图所示连接。其中,Device A通过端口GigabitEthernet1/0/1连接市场部。
通过配置二层远程端口镜像,使Server可以监控所有进、出市场部的报文。
(1) 配置Device C
# 配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过。
<DeviceC> system-view
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-GigabitEthernet1/0/1] port trunk permit vlan 2
[DeviceC-GigabitEthernet1/0/1] quit
# 创建远程目的镜像组2。
[DeviceC] mirroring-group 2 remote-destination
# 创建VLAN 2作为远程镜像VLAN。
[DeviceC] vlan 2
# 关闭VLAN 2的MAC地址学习功能。
[DeviceC-vlan2] undo mac-address mac-learning enable
[DeviceC-vlan2] quit
# 配置远程目的镜像组2的远程镜像VLAN为VLAN 2,目的端口为GigabitEthernet1/0/2,在该端口上关闭生成树协议并将其加入VLAN 2。
[DeviceC] mirroring-group 2 remote-probe vlan 2
[DeviceC] interface gigabitethernet 1/0/2
[DeviceC-GigabitEthernet1/0/2] mirroring-group 2 monitor-port
[DeviceC-GigabitEthernet1/0/2] undo stp enable
[DeviceC-GigabitEthernet1/0/2] port access vlan 2
[DeviceC-GigabitEthernet1/0/2] quit
(2) 配置Device B
# 创建VLAN 2作为远程镜像VLAN。
<DeviceB> system-view
[DeviceB] vlan 2
# 关闭VLAN 2的MAC地址学习功能。
[DeviceB-vlan2] undo mac-address mac-learning enable
[DeviceB-vlan2] quit
# 配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan 2
[DeviceB-GigabitEthernet1/0/1] quit
# 配置端口GigabitEthernet1/0/2为Trunk口,并允许VLAN 2的报文通过。
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan 2
[DeviceB-GigabitEthernet1/0/2] quit
(3) 配置Device A
# 创建远程源镜像组1。
<DeviceA> system-view
[DeviceA] mirroring-group 1 remote-source
# 创建VLAN 2作为远程镜像VLAN。
[DeviceA] vlan 2
# 关闭VLAN 2的MAC地址学习功能。
[DeviceA-vlan2] undo mac-address mac-learning enable
[DeviceA-vlan2] quit
# 配置远程源镜像组1的远程镜像VLAN为VLAN 2,源端口为GigabitEthernet1/0/1,反射端口为GigabitEthernet1/0/3。
[DeviceA] mirroring-group 1 remote-probe vlan 2
[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both
[DeviceA] mirroring-group 1 reflector-port gigabitethernet 1/0/3
This operation may delete all settings made on the interface. Continue? [Y/N]: y
# 配置端口GigabitEthernet1/0/2为Trunk口,并允许VLAN 2的报文通过。
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 2
[DeviceA-GigabitEthernet1/0/2] quit
# 显示Device C上所有镜像组的配置信息。
[DeviceC] display mirroring-group all
Mirroring group 2:
Type: Remote destination
Status: Active
Monitor port: GigabitEthernet1/0/2
Remote probe VLAN: 2
# 显示Device A上所有镜像组的配置信息。
[DeviceA] display mirroring-group all
Mirroring group 1:
Type: Remote source
Status: Active
Mirroring port:
GigabitEthernet1/0/1 Both
Reflector port: GigabitEthernet1/0/3
Remote probe VLAN: 2
配置完成后,用户可以通过Server监控所有进、出市场部的报文。
在一个二层网络中,Device A、Device B、Device C及Server如下图所示连接。其中,Device A通过端口GigabitEthernet1/0/1连接市场部。
通过配置二层远程端口镜像,使Server可以监控所有进、出市场部的报文。
图1-5 二层远程端口镜像配置组网图
(1) 配置Device C
# 配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过。
<DeviceC> system-view
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-GigabitEthernet1/0/1] port trunk permit vlan 2
[DeviceC-GigabitEthernet1/0/1] quit
# 创建远程目的镜像组2。
[DeviceC] mirroring-group 2 remote-destination
# 创建VLAN 2作为远程镜像VLAN。
[DeviceC] vlan 2
# 关闭VLAN 2的MAC地址学习功能。
[DeviceC-vlan2] undo mac-address mac-learning enable
[DeviceC-vlan2] quit
# 配置远程目的镜像组2的远程镜像VLAN为VLAN 2,目的端口为GigabitEthernet1/0/2,在该端口上关闭生成树协议并将其加入VLAN 2。
[DeviceC] mirroring-group 2 remote-probe vlan 2
[DeviceC] interface gigabitethernet 1/0/2
[DeviceC-GigabitEthernet1/0/2] mirroring-group 2 monitor-port
[DeviceC-GigabitEthernet1/0/2] undo stp enable
[DeviceC-GigabitEthernet1/0/2] port access vlan 2
[DeviceC-GigabitEthernet1/0/2] quit
(2) 配置Device B
# 创建VLAN 2作为远程镜像VLAN。
<DeviceB> system-view
[DeviceB] vlan 2
# 关闭VLAN 2的MAC地址学习功能。
[DeviceB-vlan2] undo mac-address mac-learning enable
[DeviceB-vlan2] quit
# 配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan 2
[DeviceB-GigabitEthernet1/0/1] quit
# 配置端口GigabitEthernet1/0/2为Trunk口,并允许VLAN 2的报文通过。
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan 2
[DeviceB-GigabitEthernet1/0/2] quit
(3) 配置Device A
# 创建远程源镜像组1。
<DeviceA> system-view
[DeviceA] mirroring-group 1 remote-source
# 创建VLAN 2作为远程镜像VLAN。
[DeviceA] vlan 2
# 关闭VLAN 2的MAC地址学习功能。
[DeviceA-vlan2] undo mac-address mac-learning enable
[DeviceA-vlan2] quit
# 配置远程源镜像组1的远程镜像VLAN为VLAN 2,源端口为GigabitEthernet1/0/1,出端口为GigabitEthernet1/0/2。
[DeviceA] mirroring-group 1 remote-probe vlan 2
[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both
[DeviceA] mirroring-group 1 monitor-egress gigabitethernet 1/0/2
# 配置端口GigabitEthernet1/0/2为Trunk口,允许VLAN 2的报文通过,并在该端口上关闭生成树协议。
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 2
[DeviceA-GigabitEthernet1/0/2] undo stp enable
[DeviceA-GigabitEthernet1/0/2] quit
# 显示Device C上所有镜像组的配置信息。
[DeviceC] display mirroring-group all
Mirroring group 2:
Type: Remote destination
Status: Active
Monitor port: GigabitEthernet1/0/2
Remote probe VLAN: 2
# 显示Device A上所有镜像组的配置信息。
[DeviceA] display mirroring-group all
Mirroring group 1:
Type: Remote source
Status: Active
Mirroring port:
GigabitEthernet1/0/1 Both
Monitor egress port: Gigabitethernet1/0/2
Remote probe VLAN: 2
配置完成后,用户可以通过Server监控所有进、出市场部的报文。
(0)
l Device A通过端口GigabitEthernet1/0/1和GigabitEthernet1/0/2分别连接市场部和技术部,并通过端口GigabitEthernet1/0/3连接Server。
l 通过配置源端口方式的本地端口镜像,使Server可以监控所有进、出市场部和技术部的报文。
(1) 配置本地镜像组
# 创建本地镜像组1。
<DeviceA> system-view
[DeviceA] mirroring-group 1 local
# 配置本地镜像组1的源端口为GigabitEthernet1/0/1和GigabitEthernet1/0/2,目的端口为GigabitEthernet1/0/3。
[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 gigabitethernet 1/0/2 both
[DeviceA] mirroring-group 1 monitor-port gigabitethernet 1/0/3
(2) 检验配置效果
# 显示所有镜像组的配置信息。
[DeviceA] display mirroring-group all
mirroring-group 1:
type: local
status: active
mirroring port:
GigabitEthernet1/0/1 both
GigabitEthernet1/0/2 both
mirroring CPU:
monitor port: GigabitEthernet1/0/3
配置完成后,用户可以通过Server监控所有进、出市场部和技术部的报文
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论