среда, 29 июня 2016 г.

Comparing the bandwidth and priority Commands

Summary of Differences


Configuring the bandwidth Command

The Cisco IOS® Configuration Guides describe the bandwidth command as the "amount of bandwidth, in kbps, to be assigned to the class. . . .To specify or modify the bandwidth allocated for a class belonging to a policy map."
Look at what these definitions mean.
The bandwidth command provides a minimum bandwidth guarantee during congestion. There are three forms of the command syntax, as illustrated in this table:

Note: The bandwidth command defines a behavior, which is a minimum bandwidth guarantee. Not all Cisco router platforms use weighted-fair queueing (WFQ) as the underlying algorithm to implement this behavior.

Configuring the priority Command

The Cisco IOS Configuration Guides describe the priority command as reserving "a priority queue with a specified amount of available bandwidth for CBWFQ traffic…To give priority to a traffic class based on the amount of available bandwidth within a traffic policy." Below explains what these definitions mean.
You create a priority queue with these set of commands:
Router(config)# policy-map policy-name
 
Router(config-pmap)# class class-name
 
Router(config-pmap-c)# priority kpbs [bytes]

During congestion conditions, the traffic class is guaranteed bandwidth equal to the specified rate. (Recall that bandwidth guarantees are only an issue when an interface is congested.) In other words, the priority command provides a minimum bandwidth guarantee.
In addition, the priority command implements a maximum bandwidth guarantee. Internally, the priority queue uses a token bucket that measures the offered load and ensures that the traffic stream conforms to the configured rate. Only traffic that conforms to the token bucket is guaranteed low latency. Any excess traffic is sent if the link is not congested or is dropped if the link is congested. For more information, refer to What Is a Token Bucket?.
The purpose of the built-in policer is to ensure that the other queues are serviced by the queueing scheduler. In the original Cisco priority queueing feature, which uses the priority-group and priority-list commands, the scheduler always serviced the highest priority queue first. In extreme cases, the lower priority queues rarely were serviced and effectively were starved of bandwidth.
The real benefit of the priority command—and its major difference from the bandwidth command—is how it provides a strict de-queueing priority to provide a bound on latency. Here is how the Cisco IOS Configuration Guide describes this benefit: "A strict priority queue (PQ) allows delay-sensitive data such as voice to be de-queued and sent before packets in other queues are de-queued." Let's look at what this means.
Every router interface maintains these two sets of queues:

Which Traffic Classes Can Use Excess Bandwidth?

Важно!!!
Although the bandwidth guarantees provided by the bandwidth and priority commands have been described with words like "reserved" and "bandwidth to be set aside", neither command implements a true reservation. In other words, if a traffic class is not using its configured bandwidth, any unused bandwidth is shared among the other classes.
The queueing system imposes an important exception to this rule with a priority class. As noted above, the offered load of a priority class is metered by a traffic policer. During congestion conditions, a priority class cannot use any excess bandwidth.
This table describes when a bandwidth class and a priority class can use excess bandwidth:
From the above discussion, it is important to understand that since the priority classes are policed during congestion conditions, they are not allocated any remaining bandwidth from the bandwidth classes. Thus, remaining bandwidth is shared by all bandwidth classes and class-default.

How Is Unused Bandwidth Allocated?

This section explains how the queueing system distributes any remaining bandwidth. Here is how the Class-Based Weighted Fair Queueing Feature Overview describes the allocation mechanism: "If excess bandwidth is available, the excess bandwidth is divided amongst the traffic classes in proportion to their configured bandwidths. If not all of the bandwidth is allocated, the remaining bandwidth is proportionally allocated among the classes, based on their configured bandwidth." Let's look at two examples.
In the first example, policy-map foo guarantees 30 percent of the bandwidth to class bar and 60 percent of the bandwidth to class baz.
policy-map foo 
  class bar 
    bandwidth percent 30 
 class baz 
  bandwidth percent 60
If you apply this policy to a 1 Mbps link, it means that 300 kbps is guaranteed to class bar, and 600 kbps is guaranteed to class baz. Importantly, 100 kbps is leftover for class-default. If class-default does not need it, the unused 100 kbps is available for use by class bar and class baz. If both classes need the bandwidth, they share it in proportion to the configured rates. In this configuration, the sharing ratio is 30:60 or 1:2.
The next sample configuration contains three policy maps—bar, baz, and poli. In the policy map called bar and the policy map called baz, the bandwidth is specified by percentage. However, in the policy map called poli, bandwidth is specified in kbps.
Remember that the class maps should already be created before you create the policy maps.
 
 policy-map bar
  class voice
   priority percent 10
  class data
   bandwidth percent 30
  class video
   bandwidth percent 20
 policy-map baz
  class voice
   priority percent 10
  class data
   bandwidth remaining percent 30
  class video
   bandwidth remaining percent 20
 policy-map poli
  class voice
  class data
   bandwidth 30
  class video
   bandwidth 20
Note: The bandwidth remaining percent command was introduced in Cisco IOS version 12.2(T). Refer to Low Latency Queueing with Priority Percentage Support for a detailed description of the bandwidth command.

Using police Command to Set a Maximum

If a bandwidth or priority class should not exceed its allocated bandwidth during periods of no congestion, you can combine the priority command with the police command. This configuration imposes a maximum rate that is always active on the class. Choosing to configure a police statement in this configuration depends on the policy's objective.

Комментариев нет:

Отправить комментарий