terça-feira, 27 de outubro de 2009

DSCP short summary (unfinished)

Standard DSCP values are kinda confusing... I'll try to resume them in a logical way.

The ToS field in an IP header is 8 bit long, mapped like this:

aaabbbcc, where:

aaa is major number, bigger is better, as in the old IP Precedence 3 bit interpretation.
bbb is minor number, LOWER is better. (yeah, misleading, I know)
cc is used for flow control (ECN)

The DSCP sub-field uses only the high-order 6 bits. They've got standard values as follows:

000000 - Default (best effort)

The next 12 standard values are used for assured forwarding, that means the equipment must deliver with better than default probability, in an "guaranteed bandwidth"-like scenario. Obviously, suppose you have bandwidth issues you still can fine-grain what should be dropped anyway.

001xx0 - Assured Forwarding (AF) 1
010xx0 - Assured Forwarding (AF) 2
011xx0 - Assured Forwarding (AF) 3
100xx0 - Assured Forwarding (AF) 4

The xx mark above can range from 1 to 3 and builds the afMm code (Major minor), Cisco names the drop preference, whereas higher number means higher drop preference.

01 - 1 - lower chance of dropping among AF packets
10 - 2 - normal chance of dropping among AF packets
11 - 3 - high chance of dropping among AF packets

Next, we have Expedited Forwarding, which has only one value, which is 101110. You can also see it shown as decimal 46, hexa 0x2E, or cs46. Packets in this class have lowest delay and should never be dropped. (I'm still studying this stuff, am I correct?)

Last but not least, the cs values are called Class Selectors, they exist purely for IP Precedence compatibility.

Those use the major bits as in IP Precedence and the minor zeroed.

So, they range as follows:

001000 - IP Precedence 1
010000 - IP Precedence 2
011000 - IP Precedence 3
100000 - IP Precedence 4
101000 - IP Precedence 5 - (That's the same as EF)
110000 - IP Precedence 6 - (Should be used for routing and network stuff)
111000 - IP Precedence 7

All DSCP values can be represented in decimal form:
NameBinaryDecimal
Default0000000
CS10010008
AF1100101010
AF1200110012
AF1300111014
CS201000016
AF2101001018
AF2201010020
AF2301011022
CS301100024
AF3101101026
AF3201110028
AF3301111030
CS410000032
AF4110001034
AF4210010036
AF4310011038
CS510100040
EF10111046


I will probably fix some stuff in this short summary, as I'm not 100% sure this info is right... stay tuned.

Nenhum comentário:

Postar um comentário