例如,名为Profile1 的QoS Profile 中有两个class,class1 和class2,其中class1 的匹配条件为HTTP 服务,class2 的匹配条件是QoS 标签为2。配置命令如下:

第一步:配置class1 和class2:
hostname(config)# class-map class1
hostname(config-class-map)# match application http
hostname(config-class-map)# exit
hostname(config)# class-map class2
hostname(config-class-map)# match policy-qos-tag 2
hostname(config-class-map)# exit
hostname(config)#

第二步:配置Profile1:
hostname(config)# qos-profile profile1
hostname(config-qos-profile)# class class1
hostname(config-qos-prof-cmap)# set dscp 20
hostname(config-qos-prof-cmap)# match-priority 1
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# class class2
hostname(config-qos-prof-cmap)# set dscp 35
hostname(config-qos-prof-cmap)# match-priority 15
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# exit
hostname(config)#

第三步:将Profile1 绑定到接口ethernet0/3 上:
hostname(config)# interface ethernet0/3
hostname(config-if-eth0/3)# qos-profile input profile1
hostname(config-if-eth0/3)# exit
hostname(config)#

经过以上配置后,通过ethernet0/3 流入安全网关的流量中,应用类型为HTTP且Policy QoS 标签为2 的流量的DSCP 值会被标记为20,而不是35,因为class1的优先级高于class2,所以流量匹配class1。

原创文章如转载,请注明:
转载自醉生梦死的博客
原文地址:http://www.liusuping.com/post/Hillstone-QoS-pifeiyouxian.html