cancel
Showing results for 
Search instead for 
Did you mean: 
JRahm
Community Manager
Community Manager

The IP::tos command has been around since the v4 days, and there has been some confusion on IP tos versus DSCP. The command takes the supplied value (or returns  a value) and applies to the tos field overall, which is eight bits. So if you take express forwarding, which is DSCP 46 and use IP::tos 46, you'll notice on the wire that something is amiss:

0151T000003d5abQAA.png

What gives? Well, the DSCP markings are in the first 6 bits of the tos field, so you need to bit-shift to the left a couple places. That results in 46 * 22 = 184. So 184 is the value you would use with the IP::tos command.

00101110 = 46

10111000 = 184

By setting IP::tos 184, you can see on the wire that all is now well in the world:

0151T000003d5acQAA.png

The below table maps the DSCP values in decimal to the value you'll need to use with the IP::tos command to get expected results.

DSCP Mappings for IP::tos Command
PrecedenceType of ServiceDSCP ClassDSCP ValueIP::tos Value
00none00
10cs1832
11af111040
110af121248
111af131456
100cs21664
101af211872
1010af222080
1011af232288
110cs32496
111af3126104
1110af3228112
1111af3330120
1000cs432128
1001af4134136
10010af4236144
10011af4338152
1010cs540160
10111ef46184
1100cs648192
1110cs756224

 

I updated the TCP Profile QoS article I wrote a few years back with this updated table, as well as the IP::tos command page in the iRules wiki. Thanks to F5er Alex for tracking this down!

Version history
Last update:
‎29-Jan-2013 12:30
Updated by:
Contributors