• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

08-ACL和QoS配置举例

目录

04-S12500_流量整形典型配置举例

本章节下载 04-S12500_流量整形典型配置举例  (139.16 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500/Configure/Typical_Configuration_Example/H3C_S12500-R7129-6W100/08/201309/796623_30005_0.htm

04-S12500_流量整形典型配置举例


1  简介

本文档介绍了GTS(Generic Traffic Shaping,通用流量整形)的配置举例。

GTS是一种主动调整流量输出速率的措施。S12500支持基于端口和基于队列的流量整形配置。基于端口的的流量整形是对端口所有的报文流进行整形,基于队列的流量整形只是对某一队列的报文流进行整形。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解流量整形特性。

3  端口流量整形配置举例

3.1  组网需求

图1所示,PC1和PC2通过Device与Server实现互连。由于Server的处理能力有限,需要配置流量整形调整发送给Server的流量速率,要求流量的平均速率为1000kbps,突发尺寸为20000bytes。

图1 端口流量整形配置组网图

 

3.2  使用版本

本举例是在S12500-CMW710-R7129版本上进行配置和验证的软件版本。

3.3  配置步骤

# 根据图1配置Device 各端口的VLAN、IP地址等,具体配置过程略。

# 在Device连接Server的端口配置流量整形。

[Device] interface GigabitEthernet 3/0/3

[Device-GigabitEthernet3/0/3] undo shutdown

[Device-GigabitEthernet3/0/3] qos gts any cir 1000 cbs 20000[Device-GigabitEthernet3/0/3] quit

3.4  验证配置

# 显示端口GE3/0/3的流量整形配置信息。

[Device] display qos gts interface GigabitEthernet 3/0/3

Interface : GigabitEthernet 3/0/3

Rule(s): If-match any

CIR 1000 (kbps), CBS 20000 (Bytes)

3.5  配置文件

#

vlan 10

#

vlan 20

#

vlan 30

#

interface Vlan-interface10

ip address 10.0.0.2 255.255.255.0

#

interface Vlan-interface20

ip address 20.0.0.2 255.255.255.0

#

interface Vlan-interface30

ip address 30.0.0.2 255.255.255.0

#

interface GigabitEthernet3/0/1

 port link-mode bridge

 port access vlan 10

#

interface GigabitEthernet3/0/2

 port link-mode bridge

 port access vlan 20

#

interface GigabitEthernet3/0/3

 port link-mode bridge

 port access vlan 30

 qos gts any cir 1000 cbs 20000

#

4  队列流量整形配置举例

4.1  组网需求

图2所示,PC1和PC2通过Device与Server实现互连。PC1和PC2发出的IP报文所携带的DSCP优先级值分别为0和7,两者发给Device的报文速率各自为100Mbps,且都从端口GE3/0/3转发给Server。

要求在Device上配置基于队列的流量整形,使PC1和PC2发给Server的流量分别走不同的优先级队列;并在队列上进行限速,对于DSCP优先级值为0的流量,平均速率为10Mbps,突发尺寸为625000byte;对于DSCP优先级值为7的流量,平均速率为20Mbps,突发尺寸为1250000byte。

图2 队列流量整形典型配置组网图

 

4.2  配置思路

本例中,已经明确不同流量报文的DSCP优先级,为了能够根据报文的DSCP优先级调整报文的输出队列,可配置端口的优先级信任模式为信任报文的DSCP优先级。

本例中,根据dscp-lp缺省映射表(如表1所示),DSCP值为0的报文和DSCP值为7的报文都将映射到本地优先级0(即进入同一个队列),为了使DSCP值为0的报文和DSCP值为7的报文入不同的队列,所以需要调整dscp-lp映射表中的对应关系,将DSCP优先级7的报文映射到其它的本地优先级(本例中选择映射到本地优先级1)。

表1 dscp-lp缺省映射关系

DSCP优先级

本地优先级

0~7

0

8~15

1

16~23

2

24~31

3

32~39

4

40~47

5

48~55

6

56~63

7

 

4.3  使用版本

本举例是在S12500-CMW710-R7129版本上进行配置和验证的软件版本。

4.4  配置步骤

# 根据图2配置Device各端口的VLAN、IP地址等,具体配置过程略。

# 配置接收报文方向的优先级映射表dscp-lp

[Device] qos map-table inbound dscp-lp

# 配置DSCP优先级7映射到本地优先级1。

[Device-maptbl-in-dscp-lp] import 7 export 1

[Device-maptbl-in-dscp-lp] quit

# 在入端口配置优先级信任模式为信任报文的DSCP优先级。

[Device] interface GigabitEthernet 3/0/1

[Device-GigabitEthernet3/0/1] undo shutdown

[Device-GigabitEthernet3/0/1] qos trust dscp

[Device-GigabitEthernet3/0/1] quit

[Device] interface GigabitEthernet 3/0/2

[Device-GigabitEthernet3/0/2] undo shutdown

[Device-GigabitEthernet3/0/2] qos trust dscp

[Device-GigabitEthernet3/0/2] quit

# 设备提取报文的DSCP优先级字段进行优先级映射,按照修改后的dscp-lp映射关系,DSCP优先级值为0的转发报文入0队列,DSCP优先级值为7的转发报文入1队列,在两个队列上分别配置基于队列的流量整形。

[Device] interface GigabitEthernet 3/0/3

[Device-GigabitEthernet3/0/3] undo shutdown

[Device-GigabitEthernet3/0/3] qos gts queue 0 cir 10000 cbs 625000

[Device-GigabitEthernet3/0/3] qos gts queue 1 cir 20000 cbs 1250000

[Device-GigabitEthernet3/0/3] quit

4.5  验证配置

# 查看接收报文方向的优先级映射表dscp-lp的配置信息,显示dscp-lp映射表目前的对应关系为:DSCP优先级1映射到本地优先级0,DSCP优先级7映射到本地优先级1。

[Device]display qos map-table inbound dscp-lp

MAP-TABLE NAME: dscp-lp   TYPE: pre-define   DIRECTION: inbound

IMPORT  :  EXPORT

   0    :    0

   1    :    0

   2    :    0

   3    :    0

   4    :    0

   5    :    0

   6    :    0

   7    :    1

   8    :    1

   9    :    1

  10    :    1

  11    :    1

  12    :    1

  13    :    1

  14    :    1

  15    :    1

  16    :    2

  17    :    2

  18    :    2

  19    :    2

  20    :    2

  21    :    2

  22    :    2

  23    :    2

  24    :    3

  25    :    3

  26    :    3

  27    :    3

  28    :    3

  29    :    3

  30    :    3

  31    :    3

  32    :    4

  33    :    4

  34    :    4

  35    :    4

  36    :    4

  37    :    4

  38    :    4

  39    :    4

  40    :    5

  41    :    5

  42    :    5

  43    :    5

  44    :    5

  45    :    5

  46    :    5

  47    :    5

  48    :    6

  49    :    6

  50    :    6

  51    :    6

  52    :    6

  53    :    6

  54    :    6

  55    :    6

  56    :    7

  57    :    7

  58    :    7

  59    :    7

  60    :    7

  61    :    7

  62    :    7

  63    :    7

# 显示端口GE3/0/3队列的流量整形配置信息。

[Device] display qos gts interface GigabitEthernet 3/0/3

Interface : GigabitEthernet3/0/3

 Rule(s): If-match queue 0

  CIR 10000 (kbps), CBS 625000 (Bytes)

 Rule(s): If-match queue 1

  CIR 20000 (kbps), CBS 1250000 (Bytes)

4.6  配置文件

#

vlan 10

#

vlan 20

#

vlan 30

#

interface Vlan-interface10

ip address 10.0.0.2 255.255.255.0

#

interface Vlan-interface20

ip address 20.0.0.2 255.255.255.0

#

interface Vlan-interface30

ip address 30.0.0.2 255.255.255.0

#

interface GigabitEthernet3/0/1

 port link-mode bridge

 port access vlan 10

 qos trust dscp

#

interface GigabitEthernet3/0/2

 port link-mode bridge

 port access vlan 20

 qos trust dscp

#

interface GigabitEthernet3/0/3

 port link-mode bridge

 port access vlan 30

 qos gts queue 0 cir 10000 cbs 625000

 qos gts queue 1 cir 20000 cbs 1250000

5  相关资料

·     《H3C S12500系列路由交换机 ACL和QoS配置指导》中的“QoS”

·     《H3C S12500系列路由交换机 ACL和QoS命令参考》中的“QoS”

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们