H3C_S7500E流量整形与接口限速典型配置举例
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
[DeviceA] traffic classifier ftp [DeviceA-classifier-ftp] if-match acl 3000 [DeviceA-classifier-ftp] quit
(2) 创建三个流行为,动作分别为重标记本地优先级为 6、4、2。 # 创建流行为 voice,动作为重标记本地优先级为 6。
# 将 QoS 策略应用到 Ten-GigabitEthernet1/0/2 端口的入方向。
[DeviceA] interface Ten-GigabitEthernet 1/0/2 [DeviceA-Ten-GigabitEthernet1/0/2] qos apply policy shaping inbound [DeviceA-Ten-GigabitEthernet1/0/2] quit
i
1 简介
本文档介绍了 GTS(Generic Traffic Shaping,通用流量整形)的配置举例。 GTS 是一种主动调整流量输出速率的措施。设备支持基于端口和基于队列的流量整形配置。基于 端口的流量整形是对端口所有的报文流进行整形,基于队列的流量整形只是对某一队列的报文流 进行整形。
2 配置前提
# 在 Ten-GigabitEthernet1/0/1 端口上配置流量整形,为业务应用报文(队列 4)配置承诺速率为 3Mbps。
[DeviceA-Ten-GigabitEthernet1/0/1] qos gts queue 4 cir 3072
[DeviceA] acl number 3000 [DeviceA-acl-adv-3000] rule permit tcp destination-port eq 20 source 192.168.1.0 0.0.0.255 [DeviceA-acl-adv-3000] quit
# 创建流分类 ftp,匹配规则为 IPv4 ACL 3000。
[DeviceA] traffic behavior voice [DeviceA-behavior-voice] remark local-precedence 6 [DeviceA-behavior-voice] quit
# 创建流行为 service,动作为重标记本地优先级为 4。
3
[DeviceA] traffic behavior service [DeviceA-behavior-service] remark local-precedence 4 [DeviceA-behavior-service] quit
# 创建流分类 voice,匹配规则为 IPv4 ACL 2000。
[DeviceA] traffic classifier voice [DeviceA-classifier-voice] if-match acl 2000 [DeviceA-classifier-voice] quit
# 创建基本 IPv4 ACL2001,匹配业务软件终端发送的流量(源地址为 192.168.2.0/24 网段)。
3.2 配置思路
• 要实现流量整形功能,首先要确认各类报文在发送时所在的队列编号。本例中没有给出各类 报文的优先级,因此需要使用重标记功能将不同类型的报文手工调度到不同的队列中。
• 手工调度报文队列可以通过重标记报文的 DSCP/802.1p 优先级或者重标记本地优先级来实 现,为保持原始报文内容不变,使用重标记本地优先级进行配置。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的 缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的 配置不冲突。 本文假设您已了解流量整形特性。
1
3 流量整形与接口限速典型配置举例
3.1 组网需求
如 图 1 所示,某公司通过专线连接分支机构与总部,专线中传输的流量主要有三类:FTP流量、 业务应用流量、IP语音流量。整个专线的速率为 15Mbps,在总部的边缘设备DeviceB上已经配置 了相应的流量监管功能: • IP 语音流量的承诺速率为 10Mbps • 业务应用流量的承诺速率为 3Mbps • FTP 流量的承诺速率为 7Mbps 为配合总部的流量监管,要求在分支机构的边缘设备 DeviceA 上配置流量整形功能,对各类流量 中突发的超出部分进行缓存,避免数据丢失。 由于整个专线的速率为 15Mbps,因此要求在 DeviceA 上配置接口限速功能,保证发往专线的所 有数据总速率不得超过 15Mbps。 图1 流量整形与接口限速组网示意图
[DeviceA] acl number 2001 [DeviceA-acl-basic-2001] rule permit source 192.168.2.0 0.0.0.255 [DeviceA-acl-basic-2001] quit
# 创建流分类 service,匹配规则为 IPv4 ACL 2001。
[DeviceA] qos policy shaping [DeviceA-qospolicy-shaping] classifier voice behavior voice [DeviceA-qospolicy-shaping] classifier service behavior service [DeviceA-qospolicy-shaping] classifier ftp behavior ftp [DeviceA-qospolicy-shaping] quit
3.1 组网需求 ··············································································································································· 2 3.2 配置思路 ··············································································································································· 2 3.3 使用版本 ··············································································································································· 2 3.4 配置步骤 ··············································································································································· 3 3.5 验证配置 ··············································································································································· 4 3.6 配置文件 ··············································································································································· 5 4 相关资料 ··············································································································································· 6
[DeviceA] traffic classifier service [DeviceA-classifier-service] if-match acl 2001 [DeviceA-classifier-service] quit
# 创建高级 IPv4 ACL 3000,匹配普通 PC 发送的 FTP 流量(源地址为 192.168.1.0/24 网段,目 的端口为 20)。
1. 重标记功能的配置 (1) 在 Device A 上创建三个流分类,分别匹配三类报文的源 IP 网段。 # 创建基本 IPv4 ACL2000,匹配 IP 电话发送的流量(源地址为 192.168.3.0/24 网段)。
<DeviceA> system-view [DeviceA] acl number 2000 [DeviceA-acl-basic-2000] rule permit source 192.168.3.0 0.0.0.255 [DeviceA-acl-basic-2000] quit
# 创建流行为 ftp,动作为重标记本地优先级为 2。
[DeviceA] traffic behavior ftp [DeviceA-behavior-ftp] remark local-precedence 2 [DeviceA-behavior-ftp] quit
(3) 创建 QoS 策略并应用 # 创建 QoS 策略 shaping,将上面三组流分类和流行为进行关联。
H3C S7500E 流量整形与接口限速司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。
目录
1 简介 ······················································································································································ 1 2 配置前提 ··············································································································································· 1 3 流量整形与接口限速典型配置举例········································································································ 2
3.3 使用版本
本举例是在 S7500E-CMW710-R7150 版本上进行配置和验证的软件版本。
2
3.4 配置步骤
在进行流量整形和接口限速配置前,应确保 3.1 图 1 中网络的连通性。关于在DeviceA和DeviceB 上为提供网络连通性而进行的配置(如创建VLAN接口及为其配置IP地址等),此处不进行介绍。
经过上述配置,三类报文在 DeviceA 中的本地优先级已经被修改,即可以确定三类报文的输出队 列分别为 6、4、2。 2. 流量整形配置 # 在 Ten-GigabitEthernet1/0/1 端口上配置流量整形,为语音报文(队列 6)配置承诺速率为 10Mbps。
[DeviceA] interface Ten-GigabitEthernet 1/0/1 [DeviceA-Ten-GigabitEthernet1/0/1] qos gts queue 6 cir 10240
(2) 创建三个流行为,动作分别为重标记本地优先级为 6、4、2。 # 创建流行为 voice,动作为重标记本地优先级为 6。
# 将 QoS 策略应用到 Ten-GigabitEthernet1/0/2 端口的入方向。
[DeviceA] interface Ten-GigabitEthernet 1/0/2 [DeviceA-Ten-GigabitEthernet1/0/2] qos apply policy shaping inbound [DeviceA-Ten-GigabitEthernet1/0/2] quit
i
1 简介
本文档介绍了 GTS(Generic Traffic Shaping,通用流量整形)的配置举例。 GTS 是一种主动调整流量输出速率的措施。设备支持基于端口和基于队列的流量整形配置。基于 端口的流量整形是对端口所有的报文流进行整形,基于队列的流量整形只是对某一队列的报文流 进行整形。
2 配置前提
# 在 Ten-GigabitEthernet1/0/1 端口上配置流量整形,为业务应用报文(队列 4)配置承诺速率为 3Mbps。
[DeviceA-Ten-GigabitEthernet1/0/1] qos gts queue 4 cir 3072
[DeviceA] acl number 3000 [DeviceA-acl-adv-3000] rule permit tcp destination-port eq 20 source 192.168.1.0 0.0.0.255 [DeviceA-acl-adv-3000] quit
# 创建流分类 ftp,匹配规则为 IPv4 ACL 3000。
[DeviceA] traffic behavior voice [DeviceA-behavior-voice] remark local-precedence 6 [DeviceA-behavior-voice] quit
# 创建流行为 service,动作为重标记本地优先级为 4。
3
[DeviceA] traffic behavior service [DeviceA-behavior-service] remark local-precedence 4 [DeviceA-behavior-service] quit
# 创建流分类 voice,匹配规则为 IPv4 ACL 2000。
[DeviceA] traffic classifier voice [DeviceA-classifier-voice] if-match acl 2000 [DeviceA-classifier-voice] quit
# 创建基本 IPv4 ACL2001,匹配业务软件终端发送的流量(源地址为 192.168.2.0/24 网段)。
3.2 配置思路
• 要实现流量整形功能,首先要确认各类报文在发送时所在的队列编号。本例中没有给出各类 报文的优先级,因此需要使用重标记功能将不同类型的报文手工调度到不同的队列中。
• 手工调度报文队列可以通过重标记报文的 DSCP/802.1p 优先级或者重标记本地优先级来实 现,为保持原始报文内容不变,使用重标记本地优先级进行配置。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的 缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的 配置不冲突。 本文假设您已了解流量整形特性。
1
3 流量整形与接口限速典型配置举例
3.1 组网需求
如 图 1 所示,某公司通过专线连接分支机构与总部,专线中传输的流量主要有三类:FTP流量、 业务应用流量、IP语音流量。整个专线的速率为 15Mbps,在总部的边缘设备DeviceB上已经配置 了相应的流量监管功能: • IP 语音流量的承诺速率为 10Mbps • 业务应用流量的承诺速率为 3Mbps • FTP 流量的承诺速率为 7Mbps 为配合总部的流量监管,要求在分支机构的边缘设备 DeviceA 上配置流量整形功能,对各类流量 中突发的超出部分进行缓存,避免数据丢失。 由于整个专线的速率为 15Mbps,因此要求在 DeviceA 上配置接口限速功能,保证发往专线的所 有数据总速率不得超过 15Mbps。 图1 流量整形与接口限速组网示意图
[DeviceA] acl number 2001 [DeviceA-acl-basic-2001] rule permit source 192.168.2.0 0.0.0.255 [DeviceA-acl-basic-2001] quit
# 创建流分类 service,匹配规则为 IPv4 ACL 2001。
[DeviceA] qos policy shaping [DeviceA-qospolicy-shaping] classifier voice behavior voice [DeviceA-qospolicy-shaping] classifier service behavior service [DeviceA-qospolicy-shaping] classifier ftp behavior ftp [DeviceA-qospolicy-shaping] quit
3.1 组网需求 ··············································································································································· 2 3.2 配置思路 ··············································································································································· 2 3.3 使用版本 ··············································································································································· 2 3.4 配置步骤 ··············································································································································· 3 3.5 验证配置 ··············································································································································· 4 3.6 配置文件 ··············································································································································· 5 4 相关资料 ··············································································································································· 6
[DeviceA] traffic classifier service [DeviceA-classifier-service] if-match acl 2001 [DeviceA-classifier-service] quit
# 创建高级 IPv4 ACL 3000,匹配普通 PC 发送的 FTP 流量(源地址为 192.168.1.0/24 网段,目 的端口为 20)。
1. 重标记功能的配置 (1) 在 Device A 上创建三个流分类,分别匹配三类报文的源 IP 网段。 # 创建基本 IPv4 ACL2000,匹配 IP 电话发送的流量(源地址为 192.168.3.0/24 网段)。
<DeviceA> system-view [DeviceA] acl number 2000 [DeviceA-acl-basic-2000] rule permit source 192.168.3.0 0.0.0.255 [DeviceA-acl-basic-2000] quit
# 创建流行为 ftp,动作为重标记本地优先级为 2。
[DeviceA] traffic behavior ftp [DeviceA-behavior-ftp] remark local-precedence 2 [DeviceA-behavior-ftp] quit
(3) 创建 QoS 策略并应用 # 创建 QoS 策略 shaping,将上面三组流分类和流行为进行关联。
H3C S7500E 流量整形与接口限速司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。
目录
1 简介 ······················································································································································ 1 2 配置前提 ··············································································································································· 1 3 流量整形与接口限速典型配置举例········································································································ 2
3.3 使用版本
本举例是在 S7500E-CMW710-R7150 版本上进行配置和验证的软件版本。
2
3.4 配置步骤
在进行流量整形和接口限速配置前,应确保 3.1 图 1 中网络的连通性。关于在DeviceA和DeviceB 上为提供网络连通性而进行的配置(如创建VLAN接口及为其配置IP地址等),此处不进行介绍。
经过上述配置,三类报文在 DeviceA 中的本地优先级已经被修改,即可以确定三类报文的输出队 列分别为 6、4、2。 2. 流量整形配置 # 在 Ten-GigabitEthernet1/0/1 端口上配置流量整形,为语音报文(队列 6)配置承诺速率为 10Mbps。
[DeviceA] interface Ten-GigabitEthernet 1/0/1 [DeviceA-Ten-GigabitEthernet1/0/1] qos gts queue 6 cir 10240