您订阅的产品有更新,,,,,,请实时查阅
查看详情QoS(Quality of Service,,,,,,服务质量)可能满足用户对分歧利用分歧服务质量的要求。。。。。。。凭据用户的要求分配和调度资源,,,,,,对分歧的报文提供分歧的服务质量。。。。。。。
在传统的IP网络中,,,,,,设备对所有的报文都选取等同对待方式,,,,,,依照报文达到的功夫先后,,,,,,先入先出的列队战术(FIFO)处置,,,,,,尽最大的致力(Best-Effort)将报文传送到主张地。。。。。。。当网络带宽丰裕的时辰,,,,,,所有的报文都得到了较好的处置;;;;;;;而当网络产生拥塞的时辰,,,,,,所有的报文都有可能被抛弃。。。。。。。
QoS针对某种类此外报文,,,,,,可以为它赋予某个级此外传输优先级,,,,,,标识它的相对沉要性,,,,,,并使用设备所提供的各类优先级转发战术、拥塞预防等机造为这些报文提供特殊的传输服务。。。。。。。对实时性强且沉要的报文优先处置;;;;;;;对于实时性不强的通常报文,,,,,,提供较低的处置优先级,,,,,,网络拥塞时甚至抛弃。。。。。。。
QoS增长了网络机能的可预知性,,,,,,并可能有效地分配网络带宽,,,,,,越发合理地利用网络资源。。。。。。。
某学堂为了满足正常的讲授业务必要,,,,,,要求满足以下四点需要:
l 限度学堂接见Internet的流量为100Mbps,,,,,,抛弃超出限度的报文。。。。。。。
l 限度宿舍楼的出口流量为50Mbps,,,,,,抛弃超出限度的报文。。。。。。。
l 限度尝试楼发出DSCP优先级为7的报文的速度为20Mbps,,,,,,将速度超过20M的此类报文抛弃。。。。。。。
l 限度讲授楼的出口流量为30Mbps,,,,,,抛弃超出限度的报文。。。。。。。
注明
某学堂通过Device A的G0/24上联Internet,,,,,,Device A的G0/1、G0/2和G0/3别离下联的讲授楼(192.168.194.2~253/24)、尝试楼(192.168.195.2~253/24)和宿舍楼(192.168.196.2~253/24)。。。。。。。
图1-6 接口限速和优先级沉象征利用场景

(1) 对于出口接见Internet,,,,,,在Device A接口G0/24上配置接口的出口流量限度,,,,,,带宽限度为每秒102400KBits,,,,,,突发流量限度为每秒256Kbytes。。。。。。。
(2) 对于宿舍楼,,,,,,在Device A接口G0/3上配置接口的入口流量限度,,,,,,带宽限度为每秒51200KBits,,,,,,突发流量限度为每秒256Kbytes。。。。。。。
(3) 对于讲授楼,,,,,,在Device A接口G0/1上配置接口的入口流量限度,,,,,,带宽限度为每秒30720KBits,,,,,,突发流量限度为每秒256Kbytes。。。。。。。
(4) 对于尝试楼,,,,,,创建类cmap_dscp7匹配DSCP优先级7,,,,,,创建战术pmap_shiyan,,,,,,关联cmap_dscp7,,,,,,绑定盛行为,,,,,,将速度超过20M的报文的DSCP值改为16;;;;;;;将pmap_shiyan利用在接口G0/2上,,,,,,并配置接口信赖DSCP。。。。。。。
(1) 配置接口IP地址(略)。。。。。。。
(2) 配置接口限速。。。。。。。
# 对于出口接见Internet,,,,,,在接口G0/24上配置接口的出口流量限度。。。。。。。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# interface gigabitethernet 0/24
DeviceA(config-if-GigabitEthernet 0/24# rate-limit output 102400 256
DeviceA(config-if-GigabitEthernet 0/24)# exit
# 对于宿舍楼,,,,,,在接口G0/3上配置接口的入口流量限度。。。。。。。
DeviceA(config)# interface gigabitethernet 0/3
DeviceA(config-if-GigabitEthernet 0/3# rate-limit input 51200 256
DeviceA(config-if-GigabitEthernet 0/3)# exit
# 对于讲授楼,,,,,,在接口G0/1上配置接口的入口流量限度。。。。。。。
DeviceA(config)# interface gigabitethernet 0/1
DeviceA(config-if-GigabitEthernet 0/1# rate-limit input 30720 256
DeviceA(config-if-GigabitEthernet 0/1)# exit
(3) 配置流分类。。。。。。。
# 对于尝试楼,,,,,,配置类,,,,,,盛行为和战术。。。。。。。
DeviceA(config)# class-map cmap_dscp7
DeviceA(config-cmap)# match ip dscp 7
DeviceA(config-cmap)# exit
DeviceA(config)# policy-map pmap_shiyan
DeviceA(config-pmap)# class cmap_dscp7
DeviceA(config-pmap-c)# police 20480 128 exceed-action drop
DeviceA(config-pmap-c)# exit
DeviceA(config-pmap)# exit
# 将战术利用到接口,,,,,,并配置接口信赖DSCP。。。。。。。
DeviceA(config)# interface gigabitethernet 0/2
DeviceA(config-if-GigabitEthernet 0/2# service-policy input pmap_shiyan
DeviceA(config-if-GigabitEthernet 0/2)# mls qos trust dscp
DeviceA(config-if-GigabitEthernet 0/2)# exit
# 查抄接口限速配置是否成功。。。。。。。
DeviceA# show mls qos rate-limit
Interface: GigabitEthernet 0/1
rate limit input Kbps = 30720 burst = 256
Interface: GigabitEthernet 0/3
rate limit input Kbps = 51200 burst = 256
Interface: GigabitEthernet 0/24
rate limit output Kbps = 102400 burst = 256
# 查抄类是否创建成功。。。。。。。
DeviceA# show class-map cmap_dscp7
Class Map cmap_dscp7
Match ip dscp 7
# 查抄战术是否创建成功。。。。。。。
DeviceA# show policy-map pmap_shiyan
Policy Map pmap_shiyan
Class cmap_dscp7
police 20480 128 exceed-action dscp 16
# 查抄战术是否成功利用在接口上。。。。。。。
DeviceA# show mls qos interface gigabitethernet 0/2
Interface: GigabitEthernet 0/2
Ratelimit input:
Ratelimit output:
Attached input policy-map: pmap_shiyan
Attached output policy-map:
Default trust: dscp
Default cos: 0
Device A的配置文件
hostname DeviceA
!
class-map cmap_dscp7
match ip dscp 7
!
policy-map pmap_shiyan
class cmap_dscp7
police 20480 128 exceed-action drop
!
interface GigabitEthernet 0/1
ip add 192.168.194.1 255.255.255.0
rate-limit input 30720 256
!
interface GigabitEthernet 0/2
ip add 192.168.195.1 255.255.255.0
service-policy input pmap_shiyan
mls qos trust dscp
!
interface GigabitEthernet 0/3
ip add 192.168.196.1 255.255.255.0
rate-limit input 51200 256
!
interface GigabitEthernet 0/24
rate-limit output 102400 256
!
配置优先级沉象征和队列调度,,,,,,实现下述需要:
l 当研发部和市场部接见服务器时,,,,,,服务器报文的优先级为:邮件服务器>文件服务器>工资查问服务器。。。。。。。
l 无论人事治理部接见Internet或接见服务器,,,,,,Device A都优先处置。。。。。。。
l Device A在运行过程中,,,,,,时常发现网络拥塞。。。。。。。为了保障业务顺利运行,,,,,,要求使用WRR队列调度,,,,,,对研发部和市场部接见邮件数据库、接见文件数据库、接见工资查问数据库的IP数据报依照6:2:1的比例来调度。。。。。。。
注明
研发部(192.168.45.2~253/24)、市场部(192.168.46.2~253/24)和人事治理部(192.168.47.2~253/24)别离接入Device A的接口G0/1、G0/2和G0/3;;;;;;;工资查问服务器(192.168.10.2/24)、邮件服务器(192.168.10.3/24)和文件服务器(192.168.10.4/24)衔接在Device A的接口G0/23。。。。。。。
图1-7 队列调度和拥塞预防利用场景

(1) 在Device A上创建接见各类服务器的ACL,,,,,,并创建类匹配这些ACL。。。。。。。
(2) 创建战术,,,,,,关联各个类,,,,,,为接见各类服务器的报文沉新指定802.1p。。。。。。。接见邮件服务器的报文沉新指定802.1p为4,,,,,,接见文件服务器的报文沉新指定802.1p为3,,,,,,接见工资查问服务器的报文沉新造订802.1p为2。。。。。。。并将其关联到研发部和市场部的入口上,,,,,,配置接口信赖802.1p。。。。。。。
(3) 配置人事治理部接口的802.1p为最高优先级7,,,,,,优先保险人事部发出的报文。。。。。。。
(4) 配置队列的输出调度战术为WRR,,,,,,轮转权沉为1:1:1:2:6:1:1:0,,,,,,即对人事治理部报文尝试SP调度,,,,,,对研发部与市场部接见邮件数据库、文件数据库、工资查问数据库的报文依照6:2:1的比例来调度。。。。。。。
(5) 开启WRED职能。。。。。。。
(6) 配置接口G0/2队列2的低门限为10 20。。。。。。。
(7) 配置接口G0/2队列2的高门限为60 90。。。。。。。
(8) 配置接口G0/2队列2的最大抛弃概率60 80。。。。。。。
(1) 在Device A上配置接见各类服务器的ACL和对应规定。。。。。。。
# 配置接见工资查问服务器的ACL和对应规定。。。。。。。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# ip access-list extended salary
DeviceA(config-ext-nacl)# permit ip any host 192.168.10.2
DeviceA(config-ext-nacl)# exit
# 配置接见邮件服务器的ACL和对应规定。。。。。。。
DeviceA(config)# ip access-list extended mail
DeviceA(config-ext-nacl)# permit ip any host 192.168.10.3
DeviceA(config-ext-nacl)# exit
# 配置接见文件服务器的ACL和对应规定。。。。。。。
DeviceA(config)# ip access-list extended file
DeviceA(config-ext-nacl)# permit ip any host 192.168.10.4
DeviceA(config-ext-nacl)# exit
(2) 在Device A上配置类。。。。。。。
# 将类salary和允许接见工资查问服务器的ACL规定关联起来。。。。。。。
DeviceA(config)# class-map salary
DeviceA(config-cmap)# match access-group salary
DeviceA(config-cmap)# exit
# 将类mail和允许接见邮件服务器的ACL规定关联起来。。。。。。。
DeviceA(config)# class-map mail
DeviceA(config-cmap)# match access-group mail
DeviceA(config-cmap)# exit
# 将类file和允许接见文件服务器的ACL规定关联起来。。。。。。。
DeviceA(config)# class-map file
DeviceA(config-cmap)# match access-group file
DeviceA(config-cmap)# exit
(3) 在Device A上配置战术。。。。。。。
# 配置接见服务器的战术toserver。。。。。。。
DeviceA(config)# policy-map toserver
DeviceA(config-pmap)#
# 将类salary和对应的盛行为关联起来。。。。。。。
DeviceA(config-pmap)# class salary
DeviceA(config-pmap-c)# set cos 2
DeviceA(config-pmap-c)# exit
# 将类mail和对应的盛行为关联起来。。。。。。。
DeviceA(config-pmap)# class mail
DeviceA(config-pmap-c)# set cos 4
DeviceA(config-pmap-c)# exit
# 将类file和对应的盛行为关联起来。。。。。。。
DeviceA(config-pmap)# class file
DeviceA(config-pmap-c)# set cos 3
DeviceA(config-pmap-c)# exit
DeviceA(config-cmap)# exit
(4) 在Device A上利用战术。。。。。。。
# 在接入研发部的接口上利用战术。。。。。。。
DeviceA(config)# interface gigabitethernet 0/1
DeviceA(config-if-GigabitEthernet 0/1)# service-policy input toserver
DeviceA(config-if-GigabitEthernet 0/1)# mls qos trust cos
DeviceA(config-if-GigabitEthernet 0/1)# exit
# 在接入市场部的接口上利用战术。。。。。。。
DeviceA(config)# interface gigabitethernet 0/2
DeviceA(config-if-GigabitEthernet 0/2)# service-policy input toserver
DeviceA(config-if-GigabitEthernet 0/2)# mls qos trust cos
DeviceA(config-if-GigabitEthernet 0/2)# exit
(5) 在Device A上配置接口的802.1p。。。。。。。
# 配置人事治理部接口的802.1p为最高优先级。。。。。。。
DeviceA(config)# interface gigabitethernet 0/3
DeviceA(config-if-GigabitEthernet 0/3)# mls qos cos 7
DeviceA(config-if-GigabitEthernet 0/3)# exit
(6) 在Device A上配置队列的输出调度战术。。。。。。。
# 配置队列的输出调度战术为WRR。。。。。。。
DeviceA(config)# wrr-queue bandwidth 1 1 1 2 6 1 1 0
DeviceA(config)# mls qos scheduler wrr
(7) 在Device A上配置拥塞预防。。。。。。。
# 开启WRED职能。。。。。。。
DeviceA(config)# queueing wred
# 配置凹凸门限和最大抛弃概率。。。。。。。
DeviceA(config)# interface gigabitethernet 0/2
DeviceA(config-if-GigabitEthernet 0/2)# wrr-queue random-detect min-threshold 2 10 20
DeviceA(config-if-GigabitEthernet 0/2)# wrr-queue random-detect max-threshold 2 60 90
DeviceA(config-if-GigabitEthernet 0/2)# wrr-queue random-detect probability 2 60 80
# 配置内部服务类别与门限的映射。。。。。。。
DeviceA(config-if-GigabitEthernet 0/2)# wrr-queue cos-map 2 0 1 2 3
DeviceA(config-if-GigabitEthernet 0/2)# exit
# 查抄ACL是否创建成功。。。。。。。
DeviceA# show access-lists
ip access-list extended file
10 permit ip any host 192.168.10.4
ip access-list extended mail
10 permit ip any host 192.168.10.3
ip access-list extended salary
10 permit ip any host 192.168.10.2
# 查抄类是否成功关联ACL。。。。。。。
DeviceA# show class-map
Class Map salary
Match access-group salary
Class Map mail
Match access-group mail
Class Map file
Match access-group file
# 查抄战术是否创建成功,,,,,,类与盛行为是否绑定成功。。。。。。。
DeviceA# show policy-map
Policy Map toserver
Class mail
set cos 4
Class file
set cos 3
Class salary
set cos 2
# 查抄战术是否成功利用在接口GigabitEthernet 0/1上。。。。。。。
DeviceA# show mls qos interface gigabitethernet 0/1
Interface: GigabitEthernet 0/1
Ratelimit input:
Ratelimit output:
Attached input policy-map: toserver
Attached output policy-map:
Default trust: cos
Default cos: 0
# 查抄战术是否成功利用在接口GigabitEthernet 0/2上。。。。。。。
DeviceA# show mls qos interface gigabitethernet 0/2
Interface: GigabitEthernet 0/2
Ratelimit input:
Ratelimit output:
Attached input policy-map: toserver
Attached output policy-map:
Default trust: cos
Default cos: 0
# 查抄战术是否成功利用在接口GigabitEthernet 0/3上。。。。。。。
DeviceA# show mls qos interface gigabitethernet 0/3
Interface: GigabitEthernet 0/3
Ratelimit input:
Ratelimit output:
Attached input policy-map:
Attached output policy-map:
Default trust: none
Default cos: 7
# 查抄接口的802.1p是否配置成功,,,,,,调度战术与轮转权沉是否配置成功。。。。。。。
DeviceA# show mls qos queueing
Cos-queue map:
cos qid
--- ---
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
wrr bandwidth weights:
qid weights
--- -------
1 1
2 1
3 1
4 2
5 6
6 1
7 1
8 0
drr bandwidth weights:
qid weights
--- -------
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
wfq bandwidth weights:
qid weights
--- -------
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
Device A的配置文件
hostname DeviceA
!
wrr-queue bandwidth 1 1 1 2 6 1 1 0
queueing wred
wrr-queue cos-map 2 0 1 2 3
!
class-map salary
match access-group salary
class-map mail
match access-group mail
class-map file
match access-group file
!
policy-map toserver
class salary
set cos 2
class mail
set cos 4
class file
set cos 3
!
interface GigabitEthernet 0/1
ip add 192.168.45.1 255.255.255.0
service-policy input toserver
mls qos trust cos
!
interface GigabitEthernet 0/2
ip add 192.168.46.1 255.255.255.0
wrr-queue random-detect min-threshold 2 10 20
service-policy input toserver
mls qos trust cos
!
interface GigabitEthernet 0/3
ip add 192.168.47.1 255.255.255.0
mls qos cos 7
!