最佳答案
您好,参考
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
monitor port: GigabitEthernet1/0/3
配置完成后,用户可以通过Server监控所有进、出市场部和技术部的报文。
l 在一个二层网络中,Device A通过端口GigabitEthernet1/0/1连接市场部,并通过Trunk端口GigabitEthernet1/0/2与Device B的Trunk端口GigabitEthernet1/0/1相连;Device C通过端口GigabitEthernet1/0/2连接Server,并通过Trunk端口GigabitEthernet1/0/1与Device B的Trunk端口GigabitEthernet1/0/2相连。
l 通过配置远程端口镜像,使Server可以穿越二层网络监控所有进、出市场部的报文。
图1-4 二层远程端口镜像配置组网图
(1) 配置Device A
# 创建远程源镜像组1。
<DeviceA> system-view
[DeviceA] mirroring-group 1 remote-source
# 创建VLAN 2。
[DeviceA] vlan 2
[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] quit
(2) 配置Device B
# 配置端口GigabitEthernet1/0/1为Trunk口,并允许VLAN 2的报文通过。
<DeviceB> system-view
[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-GigabitEthernet1/0/1] quit
[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 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
# 创建远程目的镜像组1。
[DeviceC] mirroring-group 1 remote-destination
# 创建VLAN 2。
[DeviceC] vlan 2
[DeviceC-vlan2] quit
# 配置远程目的镜像组1的远程镜像VLAN为VLAN 2,目的端口为GigabitEthernet1/0/2,并将端口GigabitEthernet1/0/2加入VLAN 2。
[DeviceC] mirroring-group 1 remote-probe vlan 2
[DeviceC] interface gigabitethernet 1/0/2
[DeviceC-GigabitEthernet1/0/2] mirroring-group 1 monitor-port
[DeviceC-GigabitEthernet1/0/2] port access vlan 2
[DeviceC-GigabitEthernet1/0/2] quit
(4) 检验配置效果
配置完成后,用户可以通过Server监控所有进、出市场部的报文。
三个部门A、B、C分别使用GigabitEthernet1/0/1~GigabitEthernet1/0/3端口接入SwitchA,现要求通过镜像功能,使三台数据检测设备ServerA、ServerB、ServerC都能够对三个部门发送和接收的报文进行镜像。
图1-5 利用远程镜像VLAN实现本地镜像支持多个目的端口配置组网图
# 创建远程源镜像组1。
<SwitchA> system-view
[SwitchA] mirroring-group 1 remote-source
# 将接入部门A、B、C的三个端口配置为远程源镜像组1的源端口。
[SwitchA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 to gigabitethernet 1/0/3 both
# 将设备上任意未使用的端口(此处以GigabitEthernet1/0/5为例)配置为镜像组1的反射口。
[SwitchA] mirroring-group 1 reflector-port GigabitEthernet 1/0/5
# 创建VLAN10作为镜像组1的远程镜像VLAN,并将接入三台数据检测设备的端口加入VLAN10。
[SwitchA] vlan 10
[SwitchA-vlan10] port gigabitethernet 1/0/11 to gigabitethernet 1/0/13
[SwitchA-vlan10] quit
# 配置VLAN10作为镜像组1的远程镜像VLAN。
[SwitchA] mirroring-group 1 remote-probe vlan 10
(0)
以下是远程端口镜像的配置案例:
组网说明:
本案例使用H3C HCL模拟器中的S5820交换机来模拟二层远程端口镜像的典型组网配置案例,其中SW1为源、SW2为目的,将SW1的GI1/0/1端口的数据流量镜像到SW2的GI1/0/1端口的监控设备。Remote_vlan采用vlan 999
SW1:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW1
[SW1]vlan 10
[SW1-vlan10]quit
[SW1]int vlan 10
[SW1-Vlan-interface10]ip address 192.168.10.1 24
[SW1-Vlan-interface10]quit
[SW1]int gi 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type access
[SW1-GigabitEthernet1/0/1]port access vlan 10
[SW1-GigabitEthernet1/0/1]quit
[SW1]vlan 999
[SW1-vlan999]undo mac-address mac-learning enable
[SW1-vlan999]quit
[SW1]mirroring-group 1 remote-source
[SW1]mirroring-group 1 remote-probe vlan 999
[SW1]mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 both
[SW1]mirroring-group 1 monitor-egress GigabitEthernet 1/0/2
[SW1]int gi 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type trunk
[SW1-GigabitEthernet1/0/2]undo port trunk permit vlan 1
[SW1-GigabitEthernet1/0/2]port trunk permit vlan 999
[SW1-GigabitEthernet1/0/2]quit
SW2:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW2
[SW2]vlan 999
[SW2-vlan999]undo mac-address mac-learning enable
[SW2-vlan999]quit
[SW2]int gi 1/0/2
[SW2-GigabitEthernet1/0/2]port link-type trunk
[SW2-GigabitEthernet1/0/2]undo port trunk permit vlan 1
[SW2-GigabitEthernet1/0/2]port trunk permit vlan 999
[SW2-GigabitEthernet1/0/2]quit
[SW2]mirroring-group 1 remote-destination
[SW2]mirroring-group 1 remote-probe vlan 999
[SW2]mirroring-group 1 monitor-port GigabitEthernet 1/0/1
[SW2]int gi 1/0/1
[SW2-GigabitEthernet1/0/1]port link-type access
[SW2-GigabitEthernet1/0/1]port access vlan 999
[SW2-GigabitEthernet1/0/1]quit
查看SW1的端口镜像的显示信息:
[SW1]dis 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: 999
查看SW2的端口镜像的显示信息:
[SW2]dis mirroring-group all
Mirroring group 1:
Type: Remote destination
Status: Active
Monitor port: GigabitEthernet1/0/1
Remote probe VLAN: 999
至此,S5820二层远程端口镜像的典型组网配置案例已完成!
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论