Cisco Router Qos Policy Download or Upload Speed

    Introduction

    This document clarifies the functional differences between shaping and policing, both of which limit the output charge per unit. Though both mechanisms utilise a token bucket as a traffic meter to measure the parcel rate, they accept important functional differences. (A token bucket is described in What Is a Token Bucket?).

    Before You Begin

    Conventions

    Refer to Cisco Technical Tips Conventions for more data on document conventions.

    Prerequisites

    There are no specific prerequisites for this certificate.

    Components Used

    This document is non restricted to specific software and hardware versions.

    The data presented in this certificate was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If y'all are working in a live network, ensure that you sympathize the potential impact of whatever command before using information technology.

    Policing Versus Shaping

    The following diagram illustrates the central divergence. Traffic policing propagates bursts. When the traffic rate reaches the configured maximum rate, excess traffic is dropped (or remarked). The result is an output rate that appears as a saw-molar with crests and troughs. In contrast to policing, traffic shaping retains backlog packets in a queue and and then schedules the backlog for later on transmission over increments of fourth dimension. The upshot of traffic shaping is a smoothed parcel output rate.

    policevsshape-a.gif

    Shaping implies the beingness of a queue and of sufficient memory to buffer delayed packets, while policing does non. Queueing is an outbound concept; packets going out an interface get queued and can exist shaped. Only policing tin can be practical to inbound traffic on an interface. Ensure that you accept sufficient retentivity when enabling shaping. In improver, shaping requires a scheduling function for later manual of whatever delayed packets. This scheduling function allows you to organize the shaping queue into dissimilar queues. Examples of scheduling functions are Class Based Weighted Fair Queuing (CBWFQ) and Low Latency Queuing (LLQ).

    Selection Criteria

    The following tabular array lists the differences between shaping and policing to help y'all choose the best solution.

    Shaping Policing
    Objective Buffer and queue excess packets above the committed rates. Drop (or remark) excess packets above the committed rates. Does non buffer.*
    Token Refresh Rate Incremented at the start of a time interval. (Minimum number of intervals is required.) Continuous based on formula: 1 / committed information rate
    Token Values Configured in bits per 2nd. Configured in bytes.
    Configuration Options
    • shape control in the modular quality of service command-line interface (MQC) to implement class-based shaping.
    • frame-relay traffic-shape command to implement Frame Relay Traffic Shaping (FRTS).
    • traffic-shape command to implement Generic Traffic Shaping (GTS).
    • police command in the MQC to implement class-based policing.
    • rate-limit command to implement committed access charge per unit (Car).
    Applicative on Inbound No Yes
    Applicable on Outbound Yeah Yes
    Bursts Controls bursts by smoothing the output rate over at least eight fourth dimension intervals. Uses a leaky bucket to delay traffic, which achieves a smoothing outcome. Propagates bursts. Does no smoothing.
    Advantages Less likely to drop excess packets since excess packets are buffered. (Buffers packets upward to the length of the queue. Drops may occur if excess traffic is sustained at high rates.) Typically avoids retransmissions due to dropped packets. Controls the output rate through packet drops. Avoids delays due to queuing.
    Disadvantages Tin can introduce delay due to queuing, particularly deep queues. Drops excess packets (when configured), throttling TCP window sizes and reducing the overall output rate of affected traffic streams. Overly aggressive burst sizes may lead to excess packet drops and throttle the overall output rate, peculiarly with TCP-based flows.
    Optional Packet Remarking No Yes (with legacy Car characteristic).

    * Although policing does not apply buffering, a configured queuing mechanism applies to "conformed" packets that may need to be queued while waiting to be serialized at the concrete interface.

    Token Refresh Rate

    A key deviation between shaping and policing is the charge per unit at which tokens are replenished. This section reviews the departure.

    Just stated, both shaping and policing use the token bucket metaphor. A token saucepan itself has no discard or priority policy. Let's look at how the token bucket metaphor works:

    • Tokens are put into the saucepan at a sure rate.

    • Each token is permission for the source to send a certain number of bits into the network.

    • To send a packet, the traffic regulator must be able to remove from the saucepan a number of tokens equal in representation to the packet size.

    • If not enough tokens are in the bucket to send a packet, the parcel either waits until the bucket has enough tokens (in the case of a shaper) or the bundle is discarded or marked downwards (in the instance of a policer).

    • The saucepan itself has a specified capacity. If the bucket fills to chapters, newly arriving tokens are discarded and are not available to future packets. Thus, at any fourth dimension, the largest burst a source can send into the network is roughly proportional to the size of the bucket. A token bucket permits burstiness, but bounds information technology.

    With the token bucket metaphor in mind, let'southward look at how shaping and policing add tokens to the bucket.

    Shaping increments the token bucket at timed intervals using a $.25 per second (bps) value. A shaper uses the following formula:

    Tc = Bc/CIR (in seconds)          

    In this equation, Bc represents the committed burst, and CIR stands for committed information rate. (See Configuring Frame Relay Traffic Shaping for more information.) The value of Tc defines the time interval during which you send the Bc bits in order to maintain the average charge per unit of the CIR in seconds.

    The range for Tc is betwixt 10 ms and 125 ms. With distributed traffic shaping (DTS) on the Cisco 7500 series, the minimum Tc is four ms. The router internally calculates this value based on the CIR and Bc values. If Bc/CIR is less than 125 ms, it uses the Tc calculated from that equation. If Bc/CIR is more than or equal to 125 ms, it uses an internal Tc value if Cisco IOS® determines that traffic flow will be more stable with a smaller interval. Use the show traffic-shape command to determine whether your router is using an internal value for Tc or the value that you configured at the command-line. The following sample output of the show traffic-shape control is explained in show Commands for Frame Relay Traffic Shaping.

    policevsshape-b.gif

    When the excess burst (Exist) is configured to a value dissimilar than 0, the shaper allows tokens to exist stored in the bucket, upwardly to Bc + Be. The largest value that the token saucepan can ever achieve is Bc + Exist, and overflow tokens are dropped. The only way to accept more than than Bc tokens in the bucket is to non use all Bc tokens during one or more Tc. Since the token bucket is replenished every Tc with Bc tokens, you tin can accrue unused tokens for later use up to Bc + Be.

    In contrast, course-based policing and rate-limiting adds tokens continuously to the saucepan. Specifically, the token arrival rate is calculated every bit follows:

    (time between packets<which is equal to t-t1>* policer rate)/eight $.25 per byte

    In other words, if the previous arrival of the packet was at t1 and the current time is t, the bucket is updated with t-t1 worth of bytes based on the token arrival charge per unit. Note that a traffic policer uses burst values specified in bytes, and the above formula converts from bits to bytes.

    Expect at an instance using a CIR (or policer rate) of 8000 bps and a normal flare-up of 1000 bytes.

    Router(config)#            policy-map law-setting                        Router(config-pmap)#            class access-match                        Router(config-pmap-c)#            police force 8000 1000 adjust-action transmit exceed-action drop                      

    The token buckets starts total at 1000 bytes. If a 450 byte packet arrives, the packet conforms because enough bytes are bachelor in the token bucket. The conform activity (transmit) is taken by the packet and 450 bytes are removed from the token bucket (leaving 550 bytes). If the adjacent parcel arrives .25 seconds subsequently, 250 bytes are added to the token bucket as per the following formula:

    (0.25 * 8000)/8

    The calculation leaves 700 bytes in the token bucket. If the next packet is 800 bytes, the packet exceeds and the exceed action (drop) is taken. No bytes are taken from the token bucket.

    Traffic Shaping

    Cisco IOS supports the following methods of traffic shaping:

    • Generic Traffic Shaping

    • Frame Relay Traffic Shaping

    • Form-Based Shaping and Distributed Grade-Based Shaping

    All traffic shaping methods are similar in implementation, though their command-line interfaces(CLIs) differ somewhat, and they use unlike types of queues to comprise and shape traffic that is deferred. Cisco recommends class-based shaping and distributed shaping, which are configured using the modular QoS CLI.

    The post-obit diagram illustrates how a QoS policy sorts traffic into classes and queues packets that exceed the configured shaping rates.

    policevsshape-c.gif

    Traffic Policing

    Cisco IOS supports the following methods of traffic policing:

    • Committed Access Rate

    • Class-Based Policing

    The two mechanisms take important functional differences, as explained in Comparing Class-Based Policing and Committed Admission Rate. Cisco recommends form-based policing and other features of the modular QoS CLI when applying QoS policies.

    Use the constabulary command to specify that a form of traffic should have a maximum charge per unit imposed on information technology, and if that charge per unit is exceeded, an immediate action must exist taken. In other words, with the constabulary control, it is not an pick to buffer the bundle and later send it out, as is the instance for the shape command.

    In addition, with policing, the token bucket determines whether a packet exceeds or conforms to the applied rate. In either example, policing implements a configurable activeness, which includes setting the IP precedence or Differentiated Services Code Point (DSCP).

    The following diagram illustrates a common application of traffic policing at a congestion signal, where QoS features by and large apply.

    policevsshape-d.gif

    Minimum Versus Maximum Bandwidth Controls

    Both the shape and police force commands restrict the output rate to a maximum kbps value. Importantly, neither mechanism provides a minimum bandwidth guarantee during periods of congestion. Use the bandwidth or priority command to provide such guarantees.

    A hierarchical policy uses two service policies – a parent policy to apply a QoS mechanism to a traffic aggregate and a child policy to apply a QoS machinery to a flow or subset of the aggregate. Logical interfaces, such as subinterfaces and tunnel interfaces, require a hierarchical policy with the traffic-limiting feature at the parent level and queuing at lower levels. The traffic-limiting feature reduces the output charge per unit and (presumably) creates congestion, as seen past queuing excess packets.

    The following configuration is sub-optimal and is shown to illustrate the departure between the law versus the shape control when limiting a traffic aggregate – in this case grade-default – to a maximum charge per unit. In this configuration, the police control sends packets from the kid classes based on the size of the packet and the number of bytes remaining in the arrange and exceed token buckets. (See Traffic Policing.) The issue is that rates given to the Voice over IP (VoIP) and Internet Protocol (IP) classes may not be guaranteed since the law feature is overriding the guarantees made by the priority feature.

    However, if the shape control is used, the result is a hierarchical queuing system, and all guarantees are made. In other words, when the offered load exceeds the shape charge per unit, the VoIP and IP classes are guaranteed their rate, and the class-default traffic (at the child level) incurs whatever drops.

    caution Caution:This configuration is not recommended and is shown to illustrate the difference betwixt the police versus the shape control when limiting a traffic aggregate.

    class-map match-all IP     match ip precedence 3  class-map lucifer-all VoIP     friction match ip precedence 5     policy-map child    grade VoIP       priority 128     form IP       priority one thousand     policy-map parent     class grade-default       police 3300000 103000 103000 conform-action transmit exceed-activity drib       service-policy child

    In club for the above configuration to make sense, the policing should exist replaced by shaping. For example:

    policy-map parent     class course-default      shape average 3300000 103000 0       service-policy child

    In gild to learn more than nigh parent and kid policies, please refer to QoS Child Service Policy for Priority Class.

    Related Information

    • Quality of Services (QoS) Engineering Support
    • Technical Support & Documentation - Cisco Systems

    morristhisicland67.blogspot.com

    Source: https://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-policing/19645-policevsshape.html

    0 Response to "Cisco Router Qos Policy Download or Upload Speed"

    Postar um comentário

    Iklan Atas Artikel

    Iklan Tengah Artikel 1

    Iklan Tengah Artikel 2

    Iklan Bawah Artikel