华为交换机:S3900、S5600系列端口镜像配置流程
monitor-port用来定义监控端口;结合acl的配置,在以太网物理端口配置视图下使用mirroed-to命令,将匹配acl规则的数据报文镜像到监控端口。或者直接将某物理端口配置为镜像端口。好网址好上网.
方法一,流镜像
【SwitchA相关配置】
1.将端口G1/0/2配置为监控端口
1.
2.
3. [SwitchA]interfaceGigabitEthernet1/0/2 [SwitchA-GigabitEthernet1/0/2]monitor-port
2.配置acl,定义符合监控的数据流规则
1.
2.
3.
4.
5. [SwitchA]aclnumber3000 [SwitchA-acl-link-3000]rulepermitipsource10.10.1.10destinationany [SwitchA-acl-link-3000]rulepermitipsourceanydestination10.10.1.10
3.将经过端口G1/0/1,匹配acl规则的报文镜像到监控端口
1.
2.
3.
4.
5. [SwitchA]interfaceGigabitEthernet1/0/1 [SwitchA-GigabitEthernet1/0/1]mirrored-toinboundip-group3000monitor-interface [SwitchA-GigabitEthernet1/0/1]mirrored-tooutboundip-group3000monitor
-interface
方法二,端口镜像
【SwitchA相关配置】
1.将端口G1/0/2配置为监控端口
1.
2.
3. [SwitchA]interfaceGigabitEthernet1/0/2 [SwitchA-GigabitEthernet1/0/2]monitor-port
2.将端口G1/0/1配置为镜像端口
镜像端口简单的说,就是把交换机一个(数个)端口(源端口)的流量完全拷贝一份,从另外一个端口(目的端口)发出去,以便网络管理人员从目的端口通过分析源端口的流量来找出网络存在问题的原因。
1.
2.
3. [SwitchA]interfaceGigabitEthernet1/0/1 [SwitchA-GigabitEthernet1/0/1]mirroring-portboth 华为6502做端口镜像
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Cisco 镜像口
[cur]mirroring-group1local创建组 [cur-GigabitEthernet1/0/8]mirroring-group1monitor-port监控口 [cur-GigabitEthernet0/0/1]mirroring-group1mirroring-portboth被监控口 [cur]dismirroring-groupall mirroring-group1: type:local status:active mirroringport: GigabitEthernet0/0/1both
sw-1#show monitor 检查是否已存在镜像的配置
sw-1#conf t 进入全局模式
sw-1<config>#monitor session 1 source vlan 3 - 10 rx 监控vlan 3 -10 sw-1<config>#monitor session 1 destination int f0/24 把信息复制到f0/24 sw-1<config>#end 返回
sw-1#show monitor
端口在VLAN1 把1/0/1 镜像到 1/0/2 怎么做?
首先把端口1/0/1划到vlan1去
inter fa1/0/1
switchport access vlan 1
monitor session 1 source vlan 1 rx //设置监控的源端口
monitor session 1 destination int fa1/0/2 //设置监控的目的端口
end
show monitor