Category Archives: 6.2.a Implement and troubleshoot end-to-end QoS

6.2.a Implement and troubleshoot end-to-end QoS

6.2.a [i] CoS and DSCP mapping

Differentiated Services (DiffServ) is a model in which traffic is treated by intermediate systems with relative priorities based on the type of services (ToS) field. DiffServ increases the number of definable priority levels by reallocating bits of an IP packet for priority marking.

The DiffServ architecture defines the DiffServ (DS) field, which supersedes the ToS field in IPv4 to make per-hop behavior (PHB) decisions about packet classification and traffic conditioning functions, such as metering, marking, shaping, and policing.

The RFCs do not dictate the way to implement PHBs; this is the responsibility of the vendor. Cisco implements queuing techniques that can base their PHB on the IP precedence or DSCP value in the IP header of a packet. Based on DSCP or IP precedence, traffic can be put into a particular service class.

Packets within a service class are treated the same way. AF43 (100110) and AF11 (001010) are the highest and lowest priority classes respectively that can be configured using DSCP encoding.

The six most significant bits of the DiffServ field is called as the DSCP. The last two Currently Unused (CU ) bits in the DiffServ field were not defined within the DiffServ field architecture; these are now used as Explicit Congestion Notification (ECN) bits. Routers at the edge of the network classify packets and mark them with either the IP Precedence or DSCP value in a DiffServ network. Other network devices in the core that support DiffServ use the DSCP value in the IP header to select a PHB behavior for the packet and provide the appropriate QoS treatment. COS 3 and 4 are mapped to DSCP 24 and 32 respectively.

The DSCP can be set to a desired value at the edge of the network in order to make it easy for core devices to classify the packet as shown in the Packet Classification section and provide a suitable level of service. Class-Based Packet Marking can be used to set the DSCP value.

Adam, Paul (2014-07-12). All-in-One CCIE V5 Written Exam Guide (Kindle Locations 5610-5619).  . Kindle Edition.

http://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-packet-marking/10103-dscpvalues.html

6.2.a Implement and troubleshoot end-to-end QoS

6.2.a [i] CoS and DSCP mapping

class selector is identified by the  3 msb’s (most significant bits) of the dscp byte in the ip header

000 through 111 =  0 (default) on up to 7    000 = 0      111 = 4 2 1 = 7

the class selector’s PHB (per hop behavior) is simply that a higher value CS will be given queueing preference

assured forwarding PHB defines four classes for queueing, and three drop priorities in each AF. unlike the CS value (higher preferred), the higher numbered drop priority is more likely dropped, ie:

whereas CS4 is preferred over CS3, within CS4, AF43 is more likely dropped than AF41

the first number in the AF PHB identifies the queue, the second number is the drop likelihood

the formula AFxy can be used to identify the decimal value of the AF PHB, to wit:

8x + 2y converts AF31 to 8(3) + 2(1) = 24 + 2 = 26

8x + 2y converts AF42 to 8(4) + 2(2) = 32 + 4 = 36

see chart below:

ip_precedence_dscp

note rfc 2598 defines EF (expedited forwarding, decimal value 46) as performing two PHB actions:

Queue EF packets for quick scheduling and low latency

Police EF packets so they do not consume all available bandwidth or starve other queues

 

 

6.2.a Implement and troubleshoot end-to-end QoS

modular qos cli… utilizing NBAR (can you say MPF, modular policy framework?)

define the class, the actions to be taken on the class (policy-map) and slap it on the interface (service-policy)…

example:

r2(config-cmap)#do sh run class-map
Building configuration…

Current configuration : 81 bytes
!
class-map match-all facebook
match protocol http url “*facebook.com*”
!
end

r2(config-cmap)#policy-map facebook
r2(config-pmap)#?
QoS policy-map configuration commands:
class        policy criteria
description  Policy-Map description
exit         Exit from QoS policy-map configuration mode
no           Negate or set default values of a command
rename       Rename this policy-map

r2(config-pmap)#class facebook
r2(config-pmap-c)#?
QoS policy-map class configuration commands:
bandwidth        Bandwidth
compression      Activate Compression
drop             Drop all packets
exit             Exit from QoS class action configuration mode
netflow-sampler  NetFlow action
no               Negate or set default values of a command
police           Police
priority         Strict Scheduling Priority for this Class
queue-limit      Queue Max Threshold for Tail Drop
random-detect    Enable Random Early Detection as drop policy
service-policy   Configure Flow Next
set              Set QoS values
shape            Traffic Shaping

r2(config-pmap-c)#set dscp 0

r2(config-pmap-c)#int f0/0
r2(config-if)#service-policy output ?
WORD  policy-map name

r2(config-if)#service-policy output facebook

r2(config)#do sh policy-map int
FastEthernet0/0

Service-policy output: facebook

Class-map: facebook (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http url “*facebook.com*”
QoS Set
dscp default
Packets marked 0

Class-map: class-default (match-any)
51 packets, 4967 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any

r2(config)#do sh class-map
Class Map match-all facebook (id 1)
Match protocol http url “*facebook.com*”

Class Map match-any class-default (id 0)
Match any

r2(config)#do sh policy-map
Policy Map facebook
Class facebook
set dscp default

6.2.a CoS and DSCP mapping

by wendell…

DSCP Settings and Terminology
Several DiffServ RFCs suggest a set of values to use in the DSCP field and an implied meaning
for those settings. For instance, RFC 3246 defines a DSCP of decimal 46, with a name Expedited Forwarding (EF). According to that RFC, packets marked as EF should be given queuing preference so that they experience minimal latency, but the packets should be policed to prevent them from taking over a link and preventing any other types of traffic from exiting an interface during periods when this high-priority traffic reaches or exceeds the interface bandwidth. These suggested settings, and the associated QoS behavior recommended when using each setting, are called Per-Hop Behaviors (PHBs) by DiffServ.