华为交换机端口镜像配置

上传人:kms****20 文档编号:41012480 上传时间:2018-05-28 格式:DOC 页数:11 大小:40KB
返回 下载 相关 举报
华为交换机端口镜像配置_第1页
第1页 / 共11页
华为交换机端口镜像配置_第2页
第2页 / 共11页
华为交换机端口镜像配置_第3页
第3页 / 共11页
华为交换机端口镜像配置_第4页
第4页 / 共11页
华为交换机端口镜像配置_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《华为交换机端口镜像配置》由会员分享,可在线阅读,更多相关《华为交换机端口镜像配置(11页珍藏版)》请在金锄头文库上搜索。

1、华为交换机端口镜像配置华为交换机端口镜像配置华为交换机用户手册中,端口监听被称为“端口镜像” (Port Mirroring)1. 通过一条命令配置镜像端口和被镜像端口mirroring-port inte*ce_list observing-port inte*ce_typeinte*ce_num | inte*ce_name 2. 分别通过两条命令配置镜像端口和被镜像端口配置镜像端口 monitor-port inte*ce_type inte*ce_num| inte*ce_name 配置被镜像端口 mirroring-port inte*ce_list删除镜像端口 undo monit

2、or-port删除被镜像端口 undo mirroring-port inte*ce_list 需要注意的是:删除镜像端口后,被镜像端口即被删除;删除被镜像端口后,镜像端口还保留。例:设置以太网端口 Ethernet0/1 为镜像端口,Ethernet0/2 为被镜像端口。Quidway mirroring-port ethernet0/2 observing-port ethernet0/1例:设置以太网端口 Ethernet0/1 为镜像端口,Ethernet0/2 为被镜像端口。Quidway monitor-port ethernet0/1Quidway mirroring-port

3、ethernet0/2以下仅仅作为使用华为 3Com 公司产品按照镜像的不同方式进行配置:1) 基于端口的镜像2) 基于流的镜像端口镜像的数据流程基于端口的镜像是把被镜像端口的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。【3026 等交换机镜像】S2008/S2016/S2026/S2403H/S3026 等交换机支持的都是基于端口的镜像,有两种方法:方法一1. 配置镜像(观测)端口SwitchAmonitor-port e0/82. 配置被镜像端口SwitchAport mirror Ethernet 0/1 to Ethernet 0/2方法二1. 可以一次性定义镜

4、像和被镜像端口SwitchAport mirror Ethernet 0/1 to Ethernet 0/2 observing-port Ethernet 0/8【8016 交换机端口镜像配置】1. 假设 8016 交换机镜像端口为 E1/0/15,被镜像端口为 E1/0/0,设置端口 1/0/15 为端口镜像的观测端口。SwitchA port monitor ethernet 1/0/152. 设置端口 1/0/0 为被镜像端口,对其输入输出数据都进行镜像。SwitchA port mirroring ethernet 1/0/0 both ethernet 1/0/15也可以通过两个不

5、同的端口,对输入和输出的数据分别镜像1. 设置 E1/0/15 和 E2/0/0 为镜像(观测)端口SwitchA port monitor ethernet 1/0/152. 设置端口 1/0/0 为被镜像端口,分别使用 E1/0/15 和 E2/0/0 对输入和输出数据进行镜像。SwitchA port mirroring gigabitethernet 1/0/0 ingress ethernet 1/0/15SwitchA port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0基于流镜像的数据流程基于流镜像的交换机针对某些流

6、进行镜像,每个连接都有两个方向的数据流,对于交换机来说这两个数据流是要分开镜像的。【3500/3026E/3026F/3050】基于三层流的镜像1. 定义一条扩展访问控制列表SwitchAacl num 1002. 定义一条规则报文源地址为 1.1.1.1/32 去往所有目的地址SwitchA-acl-adv-101rule 0 permit ip source 1.1.1.1 0 destination any3. 定义一条规则报文源地址为所有源地址目的地址为 1.1.1.1/32SwitchA-acl-adv-101rule 1 permit ip source any destinati

7、on 1.1.1.1 04. 将符合上述 ACL 规则的报文镜像到 E0/8 端口SwitchAmirrored-to ip-group 100 inte*ce e0/8基于二层流的镜像1. 定义一个 ACLSwitchAacl num 2002. 定义一个规则从 E0/1 发送至其它所有端口的数据包SwitchArule 0 permit ingress inte*ce Ethernet0/1 egress inte*ce Ethernet0/23. 定义一个规则从其它所有端口到 E0/1 端口的数据包SwitchArule 1 permit ingress inte*ce Ethernet

8、0/2 egress inte*ce Ethernet0/14. 将符合上述 ACL 的数据包镜像到 E0/8SwitchAmirrored-to link-group 200 inte*ce e0/8【5516/6506/6503/6506R】目前该三款产品支持对入端口流量进行镜像1. 定义镜像端口SwitchAmonitor-port Ethernet 3/0/22. 定义被镜像端口SwitchAmirroring-port Ethernet 3/0/1 inbound【补充说明】镜像一般都可以实现高速率端口镜像低速率端口,例如 1000M 端口可以镜像 100M 端口,反之则无法实现 2

9、. 8016 支持跨单板端口镜像华为 S3900 交换机镜像配置方法一,流镜像【SwitchA 相关配置】 1. 将端口 G1/0/2 配置为监控端口SwitchAinte*ce GigabitEthernet 1/0/2SwitchA-GigabitEthernet1/0/2monitor-port2. 配置 acl,定义符合监控的数据流规则SwitchAacl number 3000SwitchA-acl-link-3000rule permit ip source 10.10.1.1 0 destination anySwitchA-acl-link-3000rule permit ip

10、 source any destination 10.10.1.1 03. 将经过端口 G1/0/1,匹配 acl 规则的报文镜像到监控端口SwitchAinte*ce GigabitEthernet 1/0/1SwitchA-GigabitEthernet1/0/1mirrored-to inbound ip-group 3000 monitor-inte*ceSwitchA-GigabitEthernet1/0/1mirrored-to outbound ip-group 3000 monitor-inte*ce方法二,端口镜像【SwitchA 相关配置】1. 将端口 G1/0/2 配置为

11、监控端口SwitchAinte*ce GigabitEthernet 1/0/2SwitchA-GigabitEthernet1/0/2monitor-port2. 将端口 G1/0/1 配置为镜像端口SwitchAinte*ce GigabitEthernet 1/0/1SwitchA-GigabitEthernet1/0/1mirroring-port both【补充说明】 S3900、S5600 系列交换机既支持流镜像,又支持端口镜像。 此系列交换机的具体型号包括:S3924、S3928P/F/TP 和S3952P;S5624P/F 和 S5648P。 cisco 交换机端口镜像配置:1

12、. Catalyst 2900XL/3500XL/2950 系列交换机端口监听配置以下命令配置端口监听:port monitor例如,F0/1 和 F0/2、F0/5 同属 VLAN1,F0/1 监听 F0/2、F0/5 端口:inte*ce FastEthernet0/1port monito* *stEthernet0/2port monito* *stEthernet0/5port monitor VLAN12. Catalyst 4000,5000,and 6000 系列交换机端口监听配置以下命令配置端口监听:set span例如,模块 6 中端口 1 和端口 2 同属 VLAN1,端

13、口 3 在 VLAN2,端口4 和 5 在 VLAN2,端口 2 监听端口 1 和 3、4、5,set span 6/1,6/3-5 6/2以下命令禁止端口监听:set span disable dest_mod/dest_port|all2900XL/3500XL 系列的:Switch(config)#int fa0/1Switch(config-if)#port monito* *stEthernet 0/2Switch(config-if)#port monito* *stEthernet 0/3fa0/1 监视 2 和 3,监视口和被监视口必须在同一 vlan 中,另外,监视口不能是

14、trunk,不能是 fec 或 gec,不能启用 port security,等一些限制,你在监视口放一台 pc,安上 sniffer,okCatalyst 2950/Catalyst 3550 :swi(config)#monitor session 1 source inte*ce fastEthernet 0/2swi(config)#monitor session 1 destination inte*ce fastEthernet 0/3这样 0/3 监视 0/2sigh.port monitor 就是 span 技术。2948G-l3 不支持该技术。关于 2950 交换机配置 mo

15、nitor 的问题我想让我装上 sniffer 的机器抓网络上的数据包。在交换机上做如下配置:monitor session 1 source inte*ce fasteternet 0/1 - 3, 0/5 - 24;monitor session 1 destination inte*ce fastethernet 0/4monitor session 1 source fa0/1 /定义监控口monitor session 1 desti fa0/2 /定义被监控口SW3550(config)#monitor session 1 source inte*ce fa0/15 ?, Spec

16、ify another range of inte*ces- Specify a range of inte*cesboth Monitor received and transmitted trafficrx Monitor received traffic onlytx Monitor transmitted traffic onlySW3550(config)#monitor session 1 destination inte*ce fa0/10 ?, Specify another range of inte*ces- Specify a range of inte*cesencapsulation Set encapsulatio

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号