ToS to DSCP mapping

January 15th, 2010 | Tags: , ,

Table of ToS to DSCP mapping (conversion).

Related articles:
Configuration of Cisco switch to rewrite ToS (DSCP)

ToS
dec
ToS hex ToS bin ToS Prec. (bin) ToS Prec. (dec) ToS Delay Flag ToS Throgh-
put Flag
ToS Relia-
bility FLag
DSCP bin DSCP hex DSCP dec DSCP Class
0 0×00 00000000 000 0 0 0 0 000000 0×00 0 none
32 0×20 00100000 001 1 0 0 0 001000 0×08 8 cs1
40 0×28 00101000 001 1 0 1 0 001010 0x0A 10 af11
48 0×30 00110000 001 1 1 0 0 001100 0x0C 12 af12
56 0×38 00111000 001 1 1 1 0 001110 0x0E 14 af13
64 0×40 01000000 010 2 0 0 0 010000 0×10 16 cs2
72 0×48 01001000 010 2 0 1 0 010010 0×12 18 af21
80 0×50 01010000 010 2 1 0 0 010100 0×14 20 af22
88 0×58 01011000 010 2 1 1 0 010110 0×16 22 af23
96 0×60 01100000 011 3 0 0 0 011000 0×18 24 cs3
104 0×68 01101000 011 3 0 1 0 011010 0x1A 26 af31
112 0×70 01110000 011 3 1 0 0 011100 0x1C 28 af32
120 0×78 01111000 011 3 1 1 0 011110 0x1E 30 af33
128 0×80 10000000 100 4 0 0 0 100000 0×20 32 cs4
136 0×88 10001000 100 4 0 1 0 100010 0×22 34 af41
144 0×90 10010000 100 4 1 0 0 100100 0×24 36 af42
152 0×98 10011000 100 4 1 1 0 100110 0×26 38 af43
160 0xA0 10100000 101 5 0 0 0 101000 0×28 40 cs5
184 0xB8 10111000 101 5 1 1 0 101110 0x2E 46 ef
192 0xC0 11000000 110 6 0 0 0 110000 0×30 48 cs6
224 0xE0 11100000 111 7 0 0 0 111000 0×38 56 cs7



  1. Dardania
    May 1st, 2010 at 23:12
    Reply | Quote | #1

    Thank you very much for this – I have a Cisco 871W downstream of a Netopia 2247, and the cisco through NBAR is marking packets perfectly for the netopia to perform diffserv on…

    here’s the relevant config if anyone is interested:

    ip nbar custom jabber_tcp tcp 5222
    ip nbar custom jabber_udp udp 5222

    class-map match-any Realtime
    match protocol sip
    match protocol rtp
    match protocol jabber_udp
    match vlan 3

    class-map match-any Interactive
    match protocol http
    match protocol secure-http
    match protocol telnet
    match protocol dns
    match protocol icmp
    match protocol jabber_tcp

    class-map match-any Batch
    match protocol snmp
    match protocol rip
    match protocol netbios
    match protocol ntp

    policy-map ke-QoS-policy
    class Realtime
     set dscp ef
    class Interactive
     set dscp af11
    class Batch
     set dscp af11
    class class-default
     fair-queue
    set dscp default

    interface FastEthernet4
    ip nbar protocol-discovery
    service-policy output ke-QoS-policy

  2. nx0
    July 19th, 2011 at 14:49
    Reply | Quote | #2

    Nice table! Very useful! Thanks for that, but I spotted some mistakes (I think):

    - how can the 8 bit tos field be 11 bit long (binary tos)?
    - check the hex value for af42, must be 0×24

    greetings

    nx0

  3. admin
    July 19th, 2011 at 22:25
    Reply | Quote | #3

    10x – you are right the value is 0×24, and I corrected in table