设为首页收藏本站language 语言切换
查看: 2107|回复: 9
收起左侧

[分享] H3C各种型号交换机端口镜像配置方法总结

[复制链接]
发表于 2012-5-19 12:27:04 | 显示全部楼层 |阅读模式
H3C各种型号交换机端口镜像配置方法总结~一、端口镜像概念:
Port Mirror(端口镜像)是用于进行网络性能监测。可以这样理解:在端口A 和端口B 之间建立镜像关系,这样,通过端口A 传输的数据将同时复制到端口B ,以便于在端口B 上连接的分析仪或者分析软件进行性能分析或故障判断。

二、端口镜像配置

『环境配置参数』

1. PC1接在交换机E0/1端口,IP地址1.1.1.1/24

2. PC2接在交换机E0/2端口,IP地址2.2.2.2/24

3. E0/24为交换机上行端口

4. Server接在交换机E0/8端口,该端口作为镜像端口

『组网需求』

1. 通过交换机端口镜像的功能使用server对两台pc的业务报文进行监控。

2. 按照镜像的不同方式进行配置:

1) 基于端口的镜像

2) 基于流的镜像

2 数据配置步骤
『端口镜像的数据流程』

基于端口的镜像是把被镜像端口的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。

【3026等交换机镜像】

S2008/S2016/S2026/S2403H/S3026等交换机支持的都是基于端口的镜像,有两种方法:

方法一

1. 配置镜像(观测)端口

[SwitchA]monitor-port e0/8

2. 配置被镜像端口

[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2

方法二

1. 可以一次性定义镜像和被镜像端口

[SwitchA]port 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/15

2. 设置端口1/0/0为被镜像端口,对其输入输出数据都进行镜像。

[SwitchA] port mirroring ethernet 1/0/0 both ethernet 1/0/15

也可以通过两个不同的端口,对输入和输出的数据分别镜像

1. 设置E1/0/15和E2/0/0为镜像(观测)端口

[SwitchA] port monitor ethernet 1/0/15

2. 设置端口1/0/0为被镜像端口,分别使用E1/0/15和E2/0/0对输入和输出数据进行镜像。

[SwitchA] port mirroring gigabitethernet 1/0/0 ingress ethernet 1/0/15

[SwitchA] port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0



『基于流镜像的数据流程』

基于流镜像的交换机针对某些流进行镜像,每个连接都有两个方向的数据流,对于交换机来说这两个数据流是要分开镜像的。

【3500/3026E/3026F/3050】

〖基于三层流的镜像〗

1. 定义一条扩展访问控制列表

[SwitchA]acl num 100

2. 定义一条规则报文源地址为1.1.1.1/32去往所有目的地址

[SwitchA-acl-adv-101]rule 0 permit ip source 1.1.1.1 0 destination any

3. 定义一条规则报文源地址为所有源地址目的地址为1.1.1.1/32

[SwitchA-acl-adv-101]rule 1 permit ip source any destination 1.1.1.1 0

4. 将符合上述ACL规则的报文镜像到E0/8端口

[SwitchA]mirrored-to ip-group 100 interface e0/8



〖基于二层流的镜像〗

1. 定义一个ACL

[SwitchA]acl num 200

2. 定义一个规则从E0/1发送至其它所有端口的数据包

[SwitchA]rule 0 permit ingress interface Ethernet0/1 egress interface Ethernet0/2

3. 定义一个规则从其它所有端口到E0/1端口的数据包

[SwitchA]rule 1 permit ingress interface Ethernet0/2 egress interface Ethernet0/1

4. 将符合上述ACL的数据包镜像到E0/8

[SwitchA]mirrored-to link-group 200 interface e0/8



【5516/6506/6503/6506R】

目前该三款产品支持对入端口流量进行镜像

1. 定义镜像端口

[SwitchA]monitor-port Ethernet 3/0/2

2. 定义被镜像端口

[SwitchA]mirroring-port Ethernet 3/0/1 inbound



【补充说明】

1. 镜像一般都可以实现高速率端口镜像低速率端口,例如1000M端口可以镜像100M端口,反之则无法实现

2. 8016支持跨单板端口镜像端口镜像配置

『环境配置参数』

1. PC1接在交换机E0/1端口,IP地址1.1.1.1/24

2. PC2接在交换机E0/2端口,IP地址2.2.2.2/24

3. E0/24为交换机上行端口

4. Server接在交换机E0/8端口,该端口作为镜像端口

『组网需求』

1. 通过交换机端口镜像的功能使用server对两台pc的业务报文进行监控。

2. 按照镜像的不同方式进行配置:

1) 基于端口的镜像

2) 基于流的镜像

2 数据配置步骤
『端口镜像的数据流程』

基于端口的镜像是把被镜像端口的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。

【3026等交换机镜像】

S2008/S2016/S2026/S2403H/S3026等交换机支持的都是基于端口的镜像,有两种方法:

方法一

1. 配置镜像(观测)端口

[SwitchA]monitor-port e0/8

2. 配置被镜像端口

[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2

方法二

1. 可以一次性定义镜像和被镜像端口

[SwitchA]port 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/15

2. 设置端口1/0/0为被镜像端口,对其输入输出数据都进行镜像。

[SwitchA] port mirroring ethernet 1/0/0 both ethernet 1/0/15

也可以通过两个不同的端口,对输入和输出的数据分别镜像

1. 设置E1/0/15和E2/0/0为镜像(观测)端口

[SwitchA] port monitor ethernet 1/0/15

2. 设置端口1/0/0为被镜像端口,分别使用E1/0/15和E2/0/0对输入和输出数据进行镜像。

[SwitchA] port mirroring gigabitethernet 1/0/0 ingress ethernet 1/0/15

[SwitchA] port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0



『基于流镜像的数据流程』

基于流镜像的交换机针对某些流进行镜像,每个连接都有两个方向的数据流,对于交换机来说这两个数据流是要分开镜像的。

【3500/3026E/3026F/3050】

〖基于三层流的镜像〗

1. 定义一条扩展访问控制列表

[SwitchA]acl num 100

2. 定义一条规则报文源地址为1.1.1.1/32去往所有目的地址

[SwitchA-acl-adv-101]rule 0 permit ip source 1.1.1.1 0 destination any

3. 定义一条规则报文源地址为所有源地址目的地址为1.1.1.1/32

[SwitchA-acl-adv-101]rule 1 permit ip source any destination 1.1.1.1 0

4. 将符合上述ACL规则的报文镜像到E0/8端口

[SwitchA]mirrored-to ip-group 100 interface e0/8



〖基于二层流的镜像〗

1. 定义一个ACL

[SwitchA]acl num 200

2. 定义一个规则从E0/1发送至其它所有端口的数据包

[SwitchA]rule 0 permit ingress interface Ethernet0/1 egress interface Ethernet0/2

3. 定义一个规则从其它所有端口到E0/1端口的数据包

[SwitchA]rule 1 permit ingress interface Ethernet0/2 egress interface Ethernet0/1

4. 将符合上述ACL的数据包镜像到E0/8

[SwitchA]mirrored-to link-group 200 interface e0/8



【5516/6506/6503/6506R】

目前该三款产品支持对入端口流量进行镜像

1. 定义镜像端口

[SwitchA]monitor-port Ethernet 3/0/2

2. 定义被镜像端口

[SwitchA]mirroring-port Ethernet 3/0/1 inbound





                               
登录/注册后可看大图
该贴已经同步到 goodluck的微博
 成长值: 55000
发表于 2012-5-19 12:38:34 | 显示全部楼层
沙发 2012-5-19 12:38:34 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-5-19 13:03:45 | 显示全部楼层
板凳 2012-5-19 13:03:45 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-5-19 13:55:49 | 显示全部楼层
地板 2012-5-19 13:55:49 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-5-22 08:41:17 | 显示全部楼层
5# 2012-5-22 08:41:17 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-6-9 21:14:00 | 显示全部楼层
6# 2012-6-9 21:14:00 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-25 09:54:11 | 显示全部楼层
7# 2013-3-25 09:54:11 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-25 09:54:33 | 显示全部楼层
8# 2013-3-25 09:54:33 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-25 15:20:34 | 显示全部楼层
9# 2013-3-25 15:20:34 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-5-9 08:25:49 | 显示全部楼层
华三和华为设备,配置一样诶
10# 2017-5-9 08:25:49 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-1 20:41 , Processed in 0.104121 second(s), 15 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表