6.2.a CoS and DSCP mapping

0 to 7…

how are those magic decimal and binary numbers achieved in dscp… let me show you how simple…

0 = 000 = CS0   i give you, zero…

1 = 001 = CS1 =  decimal 8…  whoa… how did that happen? it’s binary, dude…

TOS uses the first 3 bits… DSCP uses the first 6… TOS classification still uses the first 3 bits to represent 0 to 7 or 000 to 111… DSCP adds the last 3 0’s… for DSCP just add 3 zero’s…

six zero’s still equals 0 in binary…  that’s easy

111 equals 7… what happens when you add 3 zeros after 111?

you get 32 + 16 + 8 + 0 + 0 + 0…   56…  the decimal value of CS7 is described by the binary representation of 7 in the first three place holders but when you add 3 0’s, you get

56

what is binary 6?

110

that describes class selector 6 exactly… perfect if we’re using TOS, but  if we add 3 0’s at the end, what do we get?

110 000 or 32 + 16 + 0 + 0 + 0 + 0 or 48 which is the decimal value of CS6

remember DSCP uses 6 place holders, left to right… TOS only uses the first 3…

one more… this is so easy my mom can do it…

CS3

we know that is 3… 011 also equals 3 for TOS because we have only 3 place holders… what happens when you add 3 zero’s at the end for DSCP…

011 000

0 + 16 + 8 + 0 + 0 + 0 = 24 or the decimal value of CS3 for DSCP…

an even easier way is to just remember to multiply the CS value by 8

CS4 is 4 times 8 is 32… what is binary 4

the class selector is the key to this whole thing…

100

add 3 0’s, 100 000…

and you have 32…

it’s a numbers game that is completely logical…