Home > Articles > Cisco > CCNP Routing and Switching

  • Print
  • + Share This
From the author of Configuration

Configuration

Now that we've covered some of the theory surrounding QoS, let's turn our attention to configuration. The DiffServ approach to QoS often uses a three-step command-line interface (CLI) configuration process called Modular QoS CLI (MQC):

  1. Classify traffic into various classes.
  2. Define a policy that dictates how the various traffic classes will be treated.
  3. Apply the policy (typically to an interface).

MQC can be used to configure QoS mechanisms such as the following:

  • Class-Based Classification
  • Class-Based Marking
  • Class-Based Weighted Fair Queuing (CB-WFQ)
  • Low Latency Queuing (LLQ)
  • Class-Based Weighted Random Early Detection (CB-WRED)
  • Class-Based Policing
  • Class-Based Shaping
  • Class-Based Header Compression

Let's consider a specific example:

  1. MQC's first step involves the creation of class maps. For example:
  2. class-map match-any INTERACTIVE
       match protocol telnet
       match protocol ssh

    The class map name of INTERACTIVE in this example is case-sensitive. Also notice the match-any option specified in the class-map match-any INTERACTIVE command. The match-any option (as opposed to the default option of match-all) says that a packet will be classified by the INTERACTIVE class map if it matches any of the criteria specified by the class map's match commands.

    Typically you'll create more than one class-map. The following class map matches voice traffic, which uses Real-time Transport Protocol (RTP) for transporting voice media. Notice that the audio option is used, because interactive video can also use RTP.

    class-map VOIP
       match protocol rtp audio

    At this point, we've created two class maps. However, a third class map exists that we didn't create. The class-default class map is created by default, and it matches any traffic that isn't matched by one of the class maps we create.

  3. After creating one or more class maps, the next step is to create a policy map that specifies which QoS mechanisms are applied to various traffic classes. For example:
  4. policy-map TSHOOT
       class INTERACTIVE
          bandwidth 256
       class VOIP
          priority 128

    Notice that after creating a policy map, you enter the class class_name command to enter policy-map-class configuration mode. From this mode, you can configure multiple QoS mechanisms. Here, the INTERACTIVE class map is guaranteed at least 256 kbps of bandwidth if it needs that much, and more bandwidth as needed if more is available. This is an example of CB-WFQ configuration. The VOIP class is guaranteed 128 kbps of priority bandwidth (meaning that it's transmitted first) if it needs that much, but no more (to avoid starving out other traffic). This is an example of LLQ configuration.

  5. The final step of MQC is to apply the policy map somewhere—usually to an interface:
  6. interface serial 1/0/0
       service-policy output TSHOOT

    When applying a policy map to an interface, you can specify whether the policy applies to traffic going out of or coming into the interface. In this example, the TSHOOT policy map is applied to traffic exiting the serial 1/0/0 interface.

  • + Share This
  • 🔖 Save To Your Account