RETIRED! Exam
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.
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..
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.
Syntax:
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
Example:
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
Commonly used commands that display the QoS information on a Catalyst switch are given below:
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>
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.