科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网网络频道QoS 配置基础

QoS 配置基础

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

作者:ChinaITLab 来源:ChinaITLab 2008年6月6日

关键字: QoS 服务质量 qos服务质量

  • 评论
  • 分享微博
  • 分享邮件

  Configuration of QoS

  In last month's newsletter I discussed the mechanisms QoS provides for

  delivering traffic with different priorities and assurances. This month

  we are going to look at the specific configurations for enabling the

  QoS assurances. Configuration of QoS is somewhat confusing as there are

  many types of QoS "knobs" that can be configured on a router or a

  switch. Hopefully this newsletter will provide the necessary

  instruction for getting through some of the complexities of QoS

  configurations. This newsletter focuses on the QoS configurations

  relevant to Cisco IOSnot CatOS. Layer2 QoS is another topic entirely

  and will be reserved for future newsletters.

  To refresh our memory from last month, let's review QoS briefly. QoS is

  a set of tools, or "knobs" as they are sometimes called, that are

  configured on network elements (usually routers and switches) to

  enforce traffic delivery policies for certain types of traffic. QoS can

  be broken down into three levels or models to provide end-to-end levels

  of service to traffic delivered over the network infrastructure. These

  models are called best-effort service, integrated service and

  differentiated service. Within these models, QoS defines different

  techniques to handle traffic. These techniques are congestion

  avoidance, congestion management, policing and traffic shaping. We will

  focus on the configuration of the congestion management techniques in

  this newsletter. Congestion avoidance, policing and traffic shaping

  techniques will be discussed next month.

  Congestion Management

  Congestion management techniques control the prioritization of traffic

  as it leaves the queues, it does not minimize congestion. Cisco

  provides several different techniques for providing congestion

  management. The mechanisms include First In First Out Queuing (FIFO),

  Weighted Fair Queuing (WFQ), Priority Queuing and Custom Queuing. In

  addition, there is Class Based Weighted Fair Queuing (CBWFQ), IP RTP

  Priority (or Priority Queue WFQ) and Low Latency Queuing (LLC).

  First in First Out Queuing (FIFO)

  FIFO has no concept of priority or classes of traffic and does not

  provide any prioritization of packets

  Weighted Fair Queueing (WFQ)

  WFQ provides allocation of bandwidth to network conversations. Weights

  are assigned based on source and destination patterns. WFQ

  automatically gives precedence for low-volume traffic such as telnet

  and HTTP over high volume traffic such as FTP. WFQ is enabled by

  default on interfaces that run below E1 speeds (2.048 Mbps).

  Priority Queuing (PQ)

  PQ allows you to define four queues for traffic prioritization. Traffic

  is matched using match criteria such as IP address, port numbers and

  interfaces. The four priorities are defined as high, medium, normal and

  low. The queues are served in a preferential manner. The router will

  not service the lower-priority queues until all packets from the

  higher-priority queues have been delivered. This can be detrimental if

  not configured properly as all of the bandwidth can be consumed by the

  higher-priority queues, not allowing the router to transmit data out of

  the other queues. Let's say you want to do the following for traffic

  being forwarded out interface serial 0.

  Telnet (TCP port 23) traffic is assigned to the high-priority queue.

  AppleTalk and IPX are given the medium-priority queue.

  All other IP traffic is assigned to the normal-priority queue.

  All other traffic is assigned to the low-priority queue (as default)

  Below is the configuration:

  priority-list 2 protocol ip high tcp 23

  priority-list 2 protocol ip high list 1

  priority-list 2 protocol interface ethernet 0 medium

  priority-list 2 protocol ip normal

  priority-list 2 queue-limit 15 20 20 30

  !

  access-list 1 permit 131.108.0.0 0.0.255.255

  !

  interface serial 0

  priority-group 2

  You can change the default number of packets in each queue by using the

  following command:

  Priority-list list-number queue-limit high-limit medium-limit normal-

  limit low-limit

  This is not recommended!!!!!

  Custom Queuing (CQ)

  CQ provides the same type of classification of packets as PQ with 16

  queues instead of four. In addition, CQ allows the number of bytes to

  be specified for forwarding each time the queue is serviced. The queues

  are serviced in a round-robin fashion. By servicing each queue in a

  round-robin fashion, CQ ensures that no application receives more than

  a predetermined amount of overall bandwidth. Let's say you want to do

  the following for traffic being forwarded out interface serial 0.

  Traffic from E0 is assigned to queue 1.

  IP traffic is sent to queue 2.

  IPX traffic goes to queue 3.

  AppleTalk traffic goes to queue 4

  Queue 5 is the default queue. Traffic that is not from E0 or is not

  IP-, IPX- or AppleTalk-based is sent to this queue.

  The configuration would be as follows:

  queue-list 1 interface E0 1

  queue-list 1 protocol ip 2

  queue-list 1 protocol ipx 3

  queue-list 1 protocol appletalk 4

  queue-list 1 default 5

  !

  Interface serial 0

  custom-queue-list 1

  CQ allows for granularity on the number of packets in any queue and the

  number of bytes delivered from a queue. This is done by using the

  following commands:

  queue-list 1 queue 10 limit 40 (limit number of packets)

  queue-list 1 queue 10 byte-count 1400 (set byte count)

  In addition, access lists can be used to identify what applications are

  serviced by each queue. Instead of just configuring IP in queue 2 you

  could add a protocol number or access list to the queue list command.

  For example:

  queue-list 1 protocol ip 2 TCP 23 (TCP) OR

  queue-list 1 protocol ip 2 list 10 (where 10 is an access list defining

  certain traffic types)

  More Congestion Management Techniques

  The last three types of congestion management techniques are presented

  separately as they utilize enhancements and combinations of the

  previous queuing techniques. The following queuing techniques are used

  primarily in IP telephony environments as they have the ability to give

  more granular prioritization to voice traffic.

  Class Based Weighted Fair Queuing (CBWFQ)

  CBWFQ extends WFQ to provide user-defined classes using match criteria.

  Queues are reserved for each class, and characteristics are assigned to

  each queue. The characteristics include bandwidth, weight and queue

  limit. The way CBWFQ works is as follows: Match criteria filters and

  classify packets first and then each packet is assigned a weight. The

  weight is derived from the bandwidth you assigned to the class.

  Finally, each packet is placed in the appropriate queue and serviced

  according to the weights. In order to configure this on a Cisco router,

  you must perform the following three processes:

  * Class Map Process: Define the traffic classes (i.e., what packets

  are going to be matched and by what criteria).

  * Class Policy Process: Specify the policies for each class of

  traffic.

  * Apply Policy Process: Apply the policies to the interfaces on the

  router.

  The commands necessary for each of these processes is shown below:

  Class Map Process

  Match a packet type

  access-list 101 permit udp host 10.10.10.10 host 10.10.10.20 range

  16384 20000

  access-list 101 permit udp host 10.10.10.10 host 10.10.10.20 range

  53000 56000

  class-map class1

  match access-group 101

  class-map class2

  match access-group 102

  Instead of matching an access-list you can use other match criteria

  such as:

  match input-interface interface-name

  or

  match protocol protocol

  or

  match mpls-experimental number number

  Class Policy Process

  Assign packet class characteristics; if traffic does not meet any of

  the defined match criteria, it is assigned to a default class. The four

  characteristics that can be assigned are as follows:

  * Class

  * Bandwidth

  * Fair-queue (for class-default class only)

  * Queue-limit or random-detect

  One or more of the characteristics can be assigned to the matched

  packets for each class. You can assign up to 64 classes. Total

  allocated bandwidth for the classes should not exceed 75 percent of the

  available interface bandwidth.

  policy-map policy1

  class class1

  bandwidth 3000

  queue-limit 30

  class class2

  bandwidth 2000

  If you use WRED on the policy map, WRED cannot be configured on the

  interface to which you apply the policy. The examples above use tail

  drop for congestion avoidance; if you want to use WRED, it has to be

  explicitly configured as follows:

  class-map class1

  match access-group 101

  policy-map policy1

  class class1

  bandwidth 1000

  random-detect (enables WRED)

  interface serial0/0

  service-policy output policy1

  The default class is used to classify traffic that does not meet the

  match criteria. The default class uses WFQ by default, however if the

  bandwidth policy-map class is used, WFQ is overwritten. The commands

  used to configure the default class are the same as the other classes

  with the exception of one and the rules regarding tail drop and WRED

  still apply. The command needed for the default class is as follows:

  class class-default default-class-name

  The difference is the class-default parameter before the class name.

  Assign Policy Process

  interface e1/1

  service output policy1

  interface fa1/0/0

  service output policy1

  IP RTP Priority or Priority Queuing (WFQ) and Low Latency Queuing (LLC)

  In IP telephony voice environments, a priority queue is required for

  VoIPpackets. LLC provides priority to certain classes along with a

  minimum guarantee for other classes. This is similar to CQ, however it

  is easier to configure. With LLC there are four queues: one high-

  priority queue, two guaranteed-bandwidth queues and a default queue.

  The default class can be given reserved bandwidth or it can be given an

  equal share of the bandwidth that is available and unreserved. Below is

  an example of LLC queueing:

  access-list 200 permit udp any any range 16384 32000 (voice traffic)

  access-list 200 permit tcp any any eq 1720 (voice traffic)

  access-list 201 permit tcp any any eq 80 (web traffic)

  access-list 202 permit tcp any any eq 62 (SNMP traffic)

  !

  class-map voice

  match access-group 200

  class-map web

  match access-group 201

  class-map snmp

  match access-group 202

  !

  policy-map policy1

  class voip (voice traffic given highest priority and 64Kbps)

  priority 64

  class web (web traffic given lower priority and 64Kbps)

  bandwidth 64

  class snmp (snmp traffic given lower priority and 32Kbps)

  bandwidth 32

  class class-default

  fair-queue (all other traffic shares available bandwidth using WFQ)

  !

  interface Serial1/1

  bandwidth 256

  service-policy output policy1 (applied to outgoing serial interface)

  Conclusion

  As can be seen from the topics discussed, there are various ways to

  manage congestion in a Cisco environment. The techniques discussed can

  be used in a variety of ways depending on the QoS policies that you

  want to adhere to. It is critical that you have a complete

  understanding of the traffic patterns within your environment before

  you configure any of the queuing techniques discussed.

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章