Cisco CCNA ICND2 (Interconnecting Cisco Networking Devices Part 2)Exam Cram

4. Infrastructure Services

4.2 QoS (Quality of Service)

There are 3 basic types of QoS

1.Best Effort (BE) Delivery: The best effort delivery method does not distinguish between a priority traffic and a non-priority traffic. The packets are forwarded in the order that they arrive. However, the routers or switches put their best effort to forward the packets that are received. It is the default QoS model used for Internet and it doesn't implement any QoS mechanism and the simplest model available. BE does not allow for resource reservation therefore does not work well with applications such as real-time (RT) traffic.

2.Integrated Services (IntServ) Model: The protocol that does scheduling and reserving adequate path bandwidth (end-to-end bandwidth) for application is known as Resource Reservation Protocol (RSVP). The source application requests QoS parameters through RSVP from the network devices along the route to destination. The minimum set of commonly agreed parameters is arrived at, and the source is informed of the same. RSVP enables traffic prioritization according to a pre-determined set of rules.

3.Differentiated Services Model (DiffServ): In the DiffServ model, the resources are dynamically arranged. The advantage over IntServ model is that the bandwidth utilization is more efficient in DiffServ. With IntServ, QoS is applied on a per-flow basis, whereas it is applied on a per-hop basis on DiffServ.


By default QoS is disabled globally on a Cisco switch. When you enable QoS, all switch ports are configured as untrusted, by deault. Further, the QoS values produced by the end users should not be trusted until a network device can verify it.

The following command is used to configure a switch to trust the inbound QoS parameters.

mls qos trust {cos|dscp|ip-precedence}

CoS is used to trust inbound QoS from a trunk.

DSCP and IP-Precedence are used to derive QoS from IP headers.

In a Catalyst switch, the QoS is disabled by default. To enable QoS on a switch, use the command :

SwitchA(config)#mls qos 

QoS policy is applied to an interface. You can apply one for inbound traffic, and another for outbound traffic on the same interface.

QoS trust on a switch can be configured in two ways:

1.Per Interface and

2.As a QoS policy.

The command used for enabling QoS trust on an interface is

Switch(config-if)#mls qos trust {cos | dscp | ip-precedence}

cos: The inbound CoS is taken from trunking tags

dscp: The DSCP is taken from the inbound IP packet headers

ip-precedence: IP Precedence is also taken from the inbound IP packet headers. IP Precedence values ( 0 to 7) are mapped into an internal DSCP value (0 to 63).

Only one of the above can be used on a given interface to make forwarding decisions.

The inbound QoS information is mapped using the following commands as appropriate:

CoS values (0 to 7) are mapped into an internal DSCP value (0 to 63)

Switch(config)# mls qos map cos-dscp <dscp1> <dscp2>...<dscp8>
Switch(config)# mls qos map cos-dscp
0 8 16 24 32 46 48 56

To map the 8 values of CoS to 64 DCSP values, we need to use the above command. Here:

CoS value 0 = DCSP 0
CoS value 1 = DCSP 8
CoS value 2 = DSCP 16, etc..


CoS is a L2 marking contained within an 802.1q tag,. The values for CoS are 0 - 7. DSCP is a L3 marking and has values 0 - 63. Switches use an internal DSCP value when moving traffic through the switch. However if the marking received is a CoS marking the switch then needs to derive a DSCP value from this CoS value which is what the QOS map cos-dscp is used for.

Similary, to map ip-prec values with DSCP, the following command is used:

Switch(config)#mls qos map ip-prec-dscp <dscp1> <dscp2> ... <dscp8>

DSCP: Inbound DSCP values can be mapped into internal DSCP values (which are different from that of inbound DSCP values). To enable DSCP mutation, you need to first create the map consisting of up to eight entries by using the global configuration command:

Switch(config)# mls qos map dscp-mutation <dscp-mutation-name> <in-dscp> to <out-dscp>

<in-dscp> and <out-dscp> are values within 0 to 63.


switch(config)# mls qos map dscp-mutation <map-name> input-dscp1 [input-dscp2 [input-dscp3 [input-dscp4 [input-dscp5 [input-dscp6 [input-dscp7 [input-dscp8]]]]]]] to output-dscp 


switch(config)# mls qos map dscp-mutation mydscpmap 18 to 21

In the above command input DSCP No.18 to mapped to output DSCP No.21.

Use the above command as many times as required. Then apply the mutation map to a specific ingress interface by using the interface configuration command:

Switch(config-if)#mls qos dscp-mutation <dscp-mutation-name>

Ex: switch(config-if)#mls qos dscp-mutation mydscpmap

The command used not to trust any QoS information is given by:

Switch(config-if)#no mls qos trust

The inbound CoS and DSCP information are set to either zero (default) or the interface default CoS value, defined using the mls qos cos command.

Commonly used commands that display the QoS information on a Catalyst switch are given below:

  • show mls qos interface <type> <mod/num> : displays QoS trust configured on an interface.
  • show mls qos interface <type> <mod/num> queueing : You can verify the status of egress queueing on an interface.
  • show queueing interface <type> <mod>/<num> : Used to verify QoS settings only on a Catalyst 6500 interface.
  • show mls qos maps : View all QoS parameter mappings.
    • policy-map <policy-name> : Defines a policy map.
    • class <class-name> : Classify with a class map.
    • set ip dscp <dscp-value>: Mark the DSCP value
    • set ip ip precedence <ip-precedence-value : Mark the ip precedence value.
    • trust {cos|dscp|ip-precedence} : Trust the inbound QoS information
    • service-policy [input|output] <policy-name : Apply the policy map to an interface.

The sequence of steps involved in defining a QoS policy is as below:

1.Define one or more QoS classes. QoS classes are used to identify specific traffic. Use the command:

Switch(config)#class-map <class-name> [match-all | match-any]

2.Define one or more QoS policies. QoS policy is used to reference or group multiple QoS classes as a single entity. Use the command:

Switch(config)#policy-map <policy-name>

In the policy map, use the command:

Switch(config-pmap)# class <class-name>

to identify each class map that will be used as part of the overall QoS policy.

3.Assign one QoS policy to an interface. An interface can have only one active policy applied in each direction. You can have different policies for inbound and outbound traffic on the same interface. Use the command:

Switch(cofig-if)#service-policy [input | output] <policy-name>

to apply the policy to inbound or outbound traffic.

The interface is working properly at physical layer. There is problem at the protocol level. Also, if the administrator has disabled the interface, a message saying "the interface is administratively down will be displayed"

There are two ways to classify traffic while defining a QoS class. One is by using access lists, and the other is by using NBAR (Network Based Application Recognition). When using access lists, you can either use standard access list or extended access list. Use the following class map configuration command to reference the access list as a matching condition:

Switch(config-cmap)#match access-group name <access-list>


CoS: Class of Service. CoS is applied at Layer 2 or at frames level. A 3-bit value (known as priority bits) in the range of 0 to 7 is carried along the frames in a VLAN trunk. 0 represents the lowest priority, and 7 represents the highest priority.


IP Precedence: IP Precedence is a 3-bit value represented in the ToS (Type of Service) byte of Layer


Layer2 QoS : For prioritization of traffic, both 802.1Q, and ISL provide a field to represent CoS of each frame. The value 0 of the CoS field indicates lowest priority, and the value 7 indicates the highest priority frame. CoS information is passed along ISL and 802.1Q trunks.

Shaping: Allows excess traffic to be queued in memory buffers.

Normally Service Provider prefers Policing cause it discard the packet once reaches specific threshold, besides its not CPU intensive

Policing: Monitor the bit rate of the interface and discard the packet immediately if it reaches the configured bandwidth.

Previous   Contents   Next

CCNA-ICND2 Cram Notes Contents ad