# QoS, Ip precedence and DSCP

Aug 18th, 2010

Dears

I have a questions , I'm making tests in some routers using  QoS, I configure to mark the packets with   ip precedence=5, then I have to put in a equipment that send traffic the type of service (ToS) on the header IP , in order that the router can mark the packets, but i dont know what numer I should put in the ToS , I guess is A0, but the router doesn't mark the packets, also can you expain me how to make the conversion in ip prec and dscp.

For example I have to configure  4 cases ip prec=5, dscp=8, dscp 10 and  ip prec = 7.Please tell me what number in binary I have to put in the ToS.

`IP Prec 5 (101) maps to IP DSCP 101 000`

ToS Byte

 1 0 1 T2 T1 T0 CU2 CU0

DiffServ Field

1

0

1

0

0

0

ECN

ECN

#### able 6-3     Mapping DSCP Bits to IP Precedence Bits

 IP Precedence (Decimal) IP Precedence (Bits) DSCP (Decimal) DSCP (Bits) 0 000 0 000000 1 001 8 001000 2 010 16 010000 3 011 24 011000 4 100 32 100000 5 101 40 101000 6 110 48 110000 7 111 56 111000
Overall Rating: 5 (1 ratings)

## Replies

kyukim Wed, 08/18/2010 - 19:05

HI,

Here is IP PREC -> DSCP conversion table.

DSCP NameDS Field ValueIP Precedence
BinaryDecimal
CS0000 00000
CS1001 00081
AF11001 010101
AF12001 100121
AF13001 110141
CS2010 000162
AF21010 010182
AF22010 100202
AF23010 110222
CS3011 000243
AF31011 010263
AF32011 100283
AF33011 110303
CS4100 000324
AF41100 010344
AF42100 100364
AF43100 110384
CS5101 000405
EF101 110465
CS6110 000486
CS7111 000567

So, Binary value for your questions are

ip prec=5  --> 101000 or 101110 in binary --> 28 or 2E in HEX

dscp=8  --> 001000 in binary --> 8 in HEX

dscp 10  --> 001010 in binary --> A in HEX

ip prec = 7 --> 111000 --> 38 in Hex

Also, below document is good to read for basic ToS/IP Prec/DSCP.

http://www.cisco.com/en/US/tech/tk543/tk757/technologies_tech_note09186a00800949f2.shtml

Hope this helps.

KK

CSCO11717902 Fri, 08/20/2010 - 12:53

Ok, thanks for the requets, but my question is what number put in the

TOS. I will sshow the scenario.:

the configuration is:

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

flow-queue PRUEBA

queue ef pq shaping 10000

interface GigabitEthernet 11/0/0

user-queue cir 500000 pir 500000 flow-queue PRUEBA inbound

interface GigabitEthernet 11/0/0

after that I make two kind of traffic , 1 traffic with 20M which should have the ip precedence=5 source 24.2 to 25.2 and other with 50M with ip precedence =0  source 24.3 to 25.2 when I analize in the equpiment 25.2  the traffic , I only see that It receives 15M of traffic 1  and 35M of traffic 2.

gatlin007 Fri, 08/20/2010 - 14:27

I believe you want TOS Byte value 184 to manufacture traffic that will match DSCP value EF.