l 当前有两个用户A和B,他们分别有4种业务级别的流量,分别对应了NC、EF、AF、BE级QoS业务。
l 他们从不同的路由口或者路由子接口进入当前SR88设备,将从同一个物理口出。
l
A用户的总体流量不超过50M,B用户的总体流量不超过80M。
l
A用户和B用户的总体流量之和不得超过100M。
l
A用户的总流量和B用户的总流量一旦形成拥塞,要求,A用户的高优先级流量和B用户的高优先级流量之比为3:1。
l 在出方向的物理口上配置HQoS策略,满足调度需求。
配置思路
配置HQoS,首要的是根据需求设计出对应的分层拓扑构架,所以,第一步是最关键的,分析用户的需求,可以看到,对于单用户和用户组都有限速的需求,则可以考虑将用户放置到FG-2层,并将2个用户的汇聚放到FG-1层。
具体设计分层拓扑如下:
图 3 设计的分层拓扑架构
按照上述的分层拓扑架构的设计,进行细化,对应到具体的分层节点:
图 4
细化后的分层拓扑架构
细化后的分层拓扑架构,都标明了各节点对应的转发组和转发策略,就可以进行具体的配置了。
分层QoS的配置没有先后顺序的固定要求,可以自由配置转发组和转发策略,但推荐由下至上的配置顺序,从FLOW层开始配置,从转发策略开始配置:
一:先配置各级的profile (即QoS调度策略)。
二:再配置CLASS层和SUBPORT层的嵌套关系。
三:最后在整个策略中进行实例化。
需要注意的两点:
一:分层QoS的真正作用需要同MQC动作中的入分层队列动作结合起来。
在上述细化的分层拓扑架构中,可以看到对应的2个class节点所匹配的qos-local-id为18和19,这表明,在MQC动作中就需要匹配该些流,并给这些流标上qos-local-id为18和19的标记,这样,在出方向的端口,就可以按照这些标记进入到正确的分层节点。
二:每个CLASS节点或者FG2节点下挂4个FLOW,这4个FLOW是有高低优先级之分的,就好像普通端口的8个队列,此时,各条流量进入到对应的FLOW可以有2种方法,第一种是采用 UP-FC
的映射,可以通过全局配置 UP-FC
的映射表来实现,比如,进来的流量是IPV4转发的流量,其DSCP为63,即IP优先级为7,入端口配置了自动信任模式,则会按照 UP-UP
的映射去查新的UP值,然后在出方向按照该新的UP值去映射FC,FC共有0、1、2、3这4种优先级别,分别对应了4个FLOW(相关优先级映射的配置可以参考优先级典型配置举例)。第二种方法就是采用MQC动作中的 remark
forwarding-class
来进行流量直接到FLOW的映射,如果当前通过ACL匹配了该流量,并进行了 remark forwarding-class
id 3,且出方向配置了HQoS,则该流量会进入对应的class节点的NC业务队列,即最高优先级业务队列。
配置步骤
#
配置FLOW层的转发策略。
[SR8800]!---set
fc profile---
[SR8800]qos
forwarding-profile a-fc0
[SR8800]wrr
weight 3
[SR8800]quit
[SR8800]qos
forwarding-profile a-fc1
[SR8800]wrr
weight 1
[SR8800]quit
[SR8800]qos
forwarding-profile a-fc2
[SR8800]wrr
weight 1
[SR8800]quit
[SR8800]qos
forwarding-profile a-fc3
[SR8800]wrr
weight 1
[SR8800]quit
[SR8800]qos
forwarding-profile b-fc0
[SR8800]wrr
weight 1
[SR8800]quit
[SR8800]qos
forwarding-profile b-fc1
[SR8800]wrr
weight 1
[SR8800]quit
[SR8800]qos
forwarding-profile b-fc2
[SR8800]wrr
weight 1
[SR8800]quit
[SR8800]qos
forwarding-profile b-fc3
[SR8800]wrr
weight 1
[SR8800]quit
#
配置CLASS层的转发策略。
[SR8800]!---set
fg2 profile---
[SR8800]qos
forwarding-profile fg2-pf1
[SR8800]qos
gts cir 50000
[SR8800]quit
[SR8800]qos
forwarding-profile fg2-pf2
[SR8800]qos
gts cir 80000
[SR8800]quit
#
配置SUBPORT层的转发策略。
[SR8800]!---set
fg1 profile---
[SR8800]qos
forwarding-profile fg1-pf
[SR8800]qos
gts cir 100000
[SR8800]quit
#
配置CLASS层的嵌套关系。
[SR8800]!---set
fg2 group---
[SR8800]qos
forwarding-group fg2-1
[SR8800]forwarding-class
NC profile a-fc0
[SR8800]forwarding-class
EF profile a-fc1
[SR8800]forwarding-class
AF profile a-fc2
[SR8800]forwarding-class
BE profile a-fc3
[SR8800]quit
[SR8800]qos
forwarding-group fg2-2
[SR8800]forwarding-class
NC profile b-fc0
[SR8800]forwarding-class
EF profile b-fc1
[SR8800]forwarding-class
AF profile b-fc2
[SR8800]forwarding-class
BE profile b-fc3
[SR8800]quit
#
配置SUBPORT层的嵌套关系。
[SR8800]!---set
fg1 group---
[SR8800]qos
forwarding-group fg1
[SR8800]forwarding-group
fg2-1 profile fg2-pf1
[SR8800]forwarding-group
fg2-2 profile fg2-pf2
[SR8800]quit
#
在最后的策略中进行各层的实例化操作。
[SR8800]!---set
scheduler-policy---
[SR8800]qos
scheduler-policy t
[SR8800]forwarding-group
fg1 profile fg1-pf
[SR8800]layer
1
[SR8800]forwarding-group
fg1 group
[SR8800]layer
2
[SR8800]forwarding-group
fg2-1 match qos-local-id 18
[SR8800]forwarding-group
fg2-2 match qos-local-id 19
[SR8800]quit
#
在出方向的端口上配置分层QoS策略。
[SR8800-GigabitEthernet6/1/1]qos
apply scheduler-policy t outbound
#
配置MQC的流动作remark qos-local-id 来实现入分层队列。
#
假如A用户的流为10.10.1.0/24网段的源IP。
#
假如B用户的流为10.10.2.0/24网段的源IP。
[SR8800]acl
number 3333
[SR8800-acl-adv-3333]rule
0 permit ip source 10.10.1.0 0.0.0.255
[SR8800]acl
number 3334
[SR8800-acl-adv-3334]rule
5 perimit ip source 10.10.2.0 0.0.0.255
[SR8800]traffic
classifier t1
[SR8800-classifier-t1]if-match
acl 3333
[SR8800]traffic
behavior t1
[SR8800-
behavior-t1]remark qos-local-id 18
[SR8800]traffic
classifier t2
[SR8800-classifier-t2]if-match
acl 3334
[SR8800]traffic
behavior t2
[SR8800-
behavior-t2]remark qos-local-id 19
[SR8800]qos
policy t
[SR8800-qospolicy-t]classifier
t1 behavior t1
[SR8800-qospolicy-t]classifier t2 behavior
t2
#
在出方向端口下发该MQC策略。
[SR8800-GigabitEthernet6/1/1]qos
apply policy t outbound