One of the most feared technologies by CCIE candidates is QOS (Quality of Service). This is understandably because most first world countries seldom have problems with bandwidth or getting more if needed. So the necessity for juggling traffic around, by means of QOS strategies is almost non existent. On the other hand, engineers in developing countries tend to be familiar with various QOS technologies, because of frequent bandwidth shortages as a result of the high bandwidth costs.
In my previous article I covered the difference in structures between the original TOS-Byte Field and the Diff-Serv Field which supersedes it.
Here is a concise table listing the all the values for both BYTE fields:
TOS-BYTE = (3bits IP PREC + 5bits legacy)
|IP Precedence Description||
IP PREC Binary
|IP PREC Decimal Value|
DiffServ Field = (6bits DSCP + 2bits ECN)
|DSCP PHB Groups (8x + 2y)||DSCP-Field Binary (6 bits)||DSCP-Field Decimal (6 bits)||DS-Field Binary (1 byte)||DS-Field Decimal Format||DS-Field Hex Value|
|Default||000 000||0||000 000 00||0||0x0|
|CS1||001 000||8||001 000 00||32||0x20|
|AF11||001 010||10||001 010 00||40||0x28|
|AF12||001 100||12||001 100 00||48||0x30|
|AF13||001 110||14||001 110 00||56||0x38|
|CS2||010 000||16||010 000 00||64||0x40|
|AF21||010 010||18||010 010 00||72||0x48|
|AF22||010 100||20||010 100 00||80||0x50|
|AF23||010 110||22||010 110 00||88||0x58|
|CS3||011 000||24||011 000 00||96||0x60|
|AF31||011 010||26||011 010 00||104||0x68|
|AF32||011 100||28||011 100 00||112||0x70|
|AF33||011 110||30||011 110 00||120||0x78|
|CS4||100 000||32||100 000 00||128||0x80|
|AF41||100 010||34||100 010 00||136||0x88|
|AF42||100 100||36||100 100 00||144||0x90|
|AF43||100 110||38||100 110 00||152||0x98|
|CS5||101 000||40||101 000 00||160||0xA0|
|EF||101 110||46||101 110 00||184||0xB8|
|CS6||110 000||48||110 000 00||192||0xC0|
|CS7||111 000||56||111 000 00||224||0xE0|
The CS (Class-Selector) codepoints above are in the form ‘xxx000’. The first three bits ‘xxx’ are the IP precedence bits for backwards compatibility, while the last 3 bits are set to zero. Each IP precedence value is mapped to a DiffServ value known as Class-Selector codepoints. If a packet is received from a non-DiffServ aware router that used IP precedence markings, the DiffServ router can still understand the encoding as a Class-Selector codepoint.
The DiffServ model also introduced two types of forwarding classes : AF & EF.
The EF (Expedited Forwarding) traffic is often given strict priority queuing above all other traffic classes. The design aim of EF is to provides a low loss, low latency, low jitter, end-to-end expedited service through the network. These characteristics are suitable for voice, video and other real-time services.
The AF (Assured forwarding) behavior allows the operator to provide assurance of delivery as long as the traffic does not exceed some subscribed rate. Traffic that exceeds the subscription rate faces a higher probability of being dropped if congestion occurs. The AF per-hop behavior group defines 4 separate AF Classes. Within each Class(1 to 4), packets are given a drop precedence (high =3 , medium =2 or low =1). The 1st three bits of the six-bit DSCP field define the Class, the next two bits define the Drop-Probability, and the last bit is reserved (= zero). AF is present in the format AFxy, where ‘x’ represents the AF-Class (HIGHER class value is more PREFERRED) and ‘y’ represents the Drop-Probability (HIGHER value is more likely to be DROPPED).
AF23, for example, denotes class 2 and a high drop preference of 3. If AF23 was competing with AF21, AF23 will be dropped before AF21, since they in the same class. But if you had AF33 & AF21, AF33 is a more important class, therefor AF21 will be dropped first.
A nice formula to work out the decimal value of the AF bits, will be 8x+2y. Example AF31 = (8*3) + (2*1) , thus AF31 = 26.
Optionally you dont have to match any of the predefined DiffServ values. You can match any of the 64 DSCP values (0-63), by configuring just that decimal value.
Refer to my previous post to understand the DS-Field layout of the bit numbering used as heading in the table above.
- The second last heading “DS-Field Decimal Value “ is synonymous with the TOS-Byte decimal field. This is the value used in extended pings to generate ICMP traffic with a specific QOS value.
- That last heading “DS-Field HEX Value “ is the value you will see/use in a Verbose Netflow output.