Macro 32 Ramblings

Mind Archive

AF Calcs

AF Calcs
————-
DSCP
Router(config)#access-list 101 permit ip any any dscp ?
<0-63>   Differentiated services codepoint value
af11     Match packets with AF11 dscp (001010)
af12     Match packets with AF12 dscp (001100)
af13     Match packets with AF13 dscp (001110)
af21     Match packets with AF21 dscp (010010)
af22     Match packets with AF22 dscp (010100)
af23     Match packets with AF23 dscp (010110)
af31     Match packets with AF31 dscp (011010)
af32     Match packets with AF32 dscp (011100)
af33     Match packets with AF33 dscp (011110)
af41     Match packets with AF41 dscp (100010)
af42     Match packets with AF42 dscp (100100)
af43     Match packets with AF43 dscp (100110)

Converting IP precidence to QOS is done using the first 3 bits of an 8 bit field correct?

IP prec of 1:
0 0 1
4 2 1

Tos
0    0  1  0  0 0 0 0
128 64 32 16  8 4 2 1

= ip tos 32

For simpler math could we use 32*ip prec

0 = 0
1 = 32
2 = 64
3 = 96
4 = 128
5 = 160
6 = 192
7 = 224

AF11 is not a hex value…  So the calculator won’t help you much.  🙂
It means Class 1 Threshold 1.

Now, the class value = IP Prec value where is where we start with the backwards compatibility.

IP Prec 0 = DSCP 0 (000 vs 000000)
IP Prec 1 = DSCP 8 (001 vs 001000)
IP Prec 2 = DSCP 16 (010 vs 010000)
IP Prec 3 = DSCP 24 (011 vs 011000)
IP Prec 4 = DSCP 32 (100 vs 100000)
IP Prec 5 = DSCP 40 (101 vs 101000)
IP Prec 6 = DSCP 48 (110 vs 110000)
IP Prec 7 = DSCP 56 (111 vs 111000)

Now, the thresholds use the “2-bit” and “4-bit” positions for values (00 being the default class)

01 = Threshold 1 (therefore 001010 is AF 11 or DSCP 10)
10 = Threshold 2 (therefore 001100 is AF 12 or DSCP 12 (the ONLY overlap in numbers))
11 = Threshold 3 (therefore 001110 is AF 13 or DSCP 14)

Just change the first three bits for the remainder of the classes 1 through 4.

There is a conversion formula that can be found in CCIE R & S Exam Guide, 3rd Edition by Odom, Healy….

To convert from the AF name to the decimal equivalent, use the following formula:

8x + 2y = decimal value

Where AFxy

Example: AF41 Gives you (8*4)+(2*1) = 34