《qos(pq+cq+wfq+cbwfq+llq)配置实例》由会员分享,可在线阅读,更多相关《qos(pq+cq+wfq+cbwfq+llq)配置实例(6页珍藏版)》请在金锄头文库上搜索。
1、QOS 关于队列的相关配置( PQ+CQ+WFQ+CBWFQ+LLQ)所有试验共用的试验拓扑:PQ:优先级队列(priority queue)在优先级队列 PQ 中,有高,中,普通,低优先级 4 个队列。数据包根据事先定义放在不同的队列中,路由器按照高,中,普通,低顺序服务,只有高优先级的队列为空后,才为其他队列服务,依次类推。直接手敲的 制作匆忙。priority-list 1 protocol ip high tcp telnet /将 telnet 流量放在高优先级队列里priority-list 1 protocol ip high list 101 /将 acc-list 101 定
2、义的流量放在高优先级里priority-list 1 protocal ip medium gt 1000 /将数据包大小大于 1000 字节的流量放在中等优先级队列里priority-list 1 interface Ethernet 1/0 normal /将从 Ethernet 口收到的流量放在普通的优先级队列里priority-list 1 default low /。 。 。 。 。priority-list 1 queue-limit 20 30 40 50 /分别定义高、中、普通、低优先级队列长度,如果超出这些长度的数据包将被丢弃!Int s 0/0Prority-group 1
3、Show int s 0/0、 show queueing priority 就能检测了。CQ:自定义队列(custom queue)与 PQ 不同,在 CQ 中有 16 个队列数据包根据事先定义的放在不同的队列中,路由器将为第一队列服务一定数量的数据包、字节后就为第二个队列服务,我们定义的是深度即为每个队列服务的那“一定数量的数据包、字节”然后转而为下一队列服务。注意:CQ 中队列 0 比较特殊,只有 0 为空了才为其他队列服务。一下是 show run 的内容access-list 101 permit ip host 10.1.1.0 anyqueue-list 1 protocol i
4、p 1 tcp telnetqueue-list 1 protocol ip 2 list 101queue-list 1 protocol ip 3 gt 1000queue-list 1 interface Ethernet1/0 4queue-list 1 default 5queue-list 1 queue 1 limit 40 /定义深度队列一的深度为 40queue-list 1 queue 2 limit 35queue-list 1 queue 3 limit 30queue-list 1 queue 4 limit 25!interface Serial0/0ip addr
5、ess 192.168.12.1 255.255.255.0ip ospf 1 area 0serial restart-delay 0custom-queue-list 1 /接口上应用show int s 0/0Show queueing customWFQ:(weigth fair queue)加权公平队列WFQ 是低速链路(低于 2.048Mbps)上的默认设置,它将数据包区分为不同的流。配置相当简单一条命令解决问题啊int s 0/0fair-queue 512 1024 10 /512 为丢弃阈值,1024 为动态会话数 10 为RSVP 预留队列CBWFQ(class-based
6、 weight fair queue)基于类的加权公平队列简单来说就是根据数据包的协议类型、ACL、IP 优先级或者输入接口等条件实现定义好流量的类型,为不同的类型配置最大带宽和占用接口带宽的百分比。能与 NBAR,WRED 一起使用!!class-map match-any MYMAP1 /定义类match protocol httpmatch protocol ftpclass-map match-all MYMAP2match protocol telnet!policy-map MYPOLICY /定义策略class MYMAP1bandwidth 60class MYMAP2 ban
7、dwidth 10! interface Serial0/0ip address 192.168.12.1 255.255.255.0ip ospf 1 area 0serial restart-delay 0service-policy output MYPOLICY /接口应用LLQ(low latency queue)低延时队列该实验需要在的基础上完成即允许用户自定义数据类别,并优先让这些类别的数据传输。R1(config)#class-map match-any MYMAP3R1(config-cmap)#match ip precedence critical R1(config-c
8、map)#exitR1(config)#policy-map MYPOLICYR1(config-pmap)#class MYMAP3R1(config-pmap-c)#priority 15R1#show policy-map Policy Map MYPOLICYClass MYMAP1Bandwidth 60 (kbps) Max Threshold 64 (packets)Class MYMAP2Bandwidth 10 (kbps) Max Threshold 64 (packets)Class MYMAP3Strict PriorityBandwidth 15 (kbps) Bur
9、st 375 (Bytes)R1#show policy-map int s 0/0Serial0/0 Service-policy output: MYPOLICYClass-map: MYMAP1 (match-any)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: protocol http0 packets, 0 bytes5 minute rate 0 bpsMatch: protocol ftp0 packets, 0 bytes5 minute rate 0 bpsQueueingOutpu
10、t Queue: Conversation 265 Bandwidth 60 (kbps)Max Threshold 64 (packets)(pkts matched/bytes matched) 0/0(depth/total drops/no-buffer drops) 0/0/0Class-map: MYMAP2 (match-all)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bps Match: protocol telnetQueueingOutput Queue: Conversation 266 Ban
11、dwidth 10 (kbps)Max Threshold 64 (packets)(pkts matched/bytes matched) 0/0(depth/total drops/no-buffer drops) 0/0/0Class-map: MYMAP3 (match-any)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: ip precedence 5 0 packets, 0 bytes5 minute rate 0 bps QueueingStrict Priority /严格优先级Output Queue: Conversation 264Bandwidth 15 (kbps) Burst 375 (Bytes)(pkts matched/bytes matched) 0/0(total drops/bytes drops) 0/0Class-map: class-default (match-any)128 packets, 9462 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: any