Author Topic: TOS values???????????????  (Read 12122 times)

Offline woutertal

  • A New Nut
  • *
  • Posts: 17
  • Gender: Male
  • still learning.............
TOS values???????????????
« on: July 25, 2003, 05:34:28 am »
 ???  Hi there!  I am tweaking a GPRS connection :P.  My question today is:

what is the difference between TOS values 90 and 92, and also, can you provide info on TOS values? 8)

Thanks for a great website!

Offline cablenut

  • 100% Geek
  • Administrator Nut
  • Certifiable Nut
  • *****
  • Posts: 606
  • Gender: Male
Re:TOS values???????????????
« Reply #1 on: July 25, 2003, 11:24:48 am »
To interpet TOS values, you can create a binary representation. The TOS value is 8-bits wide so we take this into account when building our table. I take this information from http://www.faqs.org/rfcs/rfc795.html

Code: [Select]
The IP Type of Service has the following fields:

   Bits 0-2:  Precedence.
   Bit    3:  0 = Normal Delay,      1 = Low Delay.
   Bits   4:  0 = Normal Throughput, 1 = High Throughput.
   Bits   5:  0 = Normal Relibility, 1 = High Relibility.
   Bit  6-7:  Reserved for Future Use.

   Bits 0,1,2 = Priority Control:
   
   111 - Network Control
   110 - Internetwork Control
   101 - CRITIC/ECP
   100 - Flash Override
   011 - Flash
   010 - Immediate
   001 - Priority
   000 - Routine

First an example, because we must convert this into decimal form:

Code: [Select]
Bit #0-2: [128 64 32]      
Bit #3: [16]    
Bit #4: [8]
Bit #5: [4]
Bit #6-7: [Reserved]

As stated above if we wanted the highest priority (Bits 0-2 set to "1") we would have a TOS value of 224 (128+64+32). If we wanted highest priority with low delay we would have 240 (128+64+32+16).  

So there you go you can now set any TOS you like. A TOS value of 90, or 92 is invalid. You need to set your TOS according to the outlined above to set any bits you want.
« Last Edit: July 25, 2003, 11:36:21 am by cablenut »
Life is lived by however you perceive it...

Offline woutertal

  • A New Nut
  • *
  • Posts: 17
  • Gender: Male
  • still learning.............
Re:TOS values???????????????
« Reply #2 on: July 25, 2003, 02:18:49 pm »
Hi!  :D thanks for your fast answer.  I am not sure if I understand correctly.  You wrote:  "A TOS value of 90, or 92 is invalid".  But all over this forum I see suggested defaultTOSvalue=90 or defaultTOSvalue=92.  ???

Can you please clarify? ???

Thanks again for your help  8)

Offline cablenut

  • 100% Geek
  • Administrator Nut
  • Certifiable Nut
  • *****
  • Posts: 606
  • Gender: Male
Re:TOS values???????????????
« Reply #3 on: July 25, 2003, 04:50:55 pm »
92 would give you this:

Bits 0,1,2:
010 = Immediate Priority

Bit 3:
1 = Low Delay

Bit 4:
1 = High Throughput

Bit 5:
1 = High Relibility

Decimal: 64+16+8+4 = 92

So yes, 92 is valid....

Life is lived by however you perceive it...

Offline woutertal

  • A New Nut
  • *
  • Posts: 17
  • Gender: Male
  • still learning.............
Re:TOS values???????????????
« Reply #4 on: July 26, 2003, 01:43:56 am »
 ;D ;D ;D 8)  Thank you so much, I now fully understand

Offline woutertal

  • A New Nut
  • *
  • Posts: 17
  • Gender: Male
  • still learning.............
Re:TOS values???????????????
« Reply #5 on: August 04, 2003, 05:54:14 am »
Hi again!  ;D

Apparently bits 6 and / or 7 are now used to specify the 'cost'.  Can you please explain what this is?  All the other parameters within the TOS value make a lot of sense to me, this one doesn't  ??? 8)

Offline cablenut

  • 100% Geek
  • Administrator Nut
  • Certifiable Nut
  • *****
  • Posts: 606
  • Gender: Male
Re:TOS values???????????????
« Reply #6 on: August 04, 2003, 08:56:39 pm »
Linux Network Administrators Guide
Prev   Chapter 9. TCP/IP Firewall


Quote
Minimum cost

    Used when it is important to minimize the cost of data transmission. Leasing bandwidth on a satellite for a transpacific crossing is generally less costly than leasing space on a fiber-optical cable over the same distance, so network providers may choose to provide both and charge differently depending on which you use. In this scenario, your “minimum cost” type of service bit may cause your datagrams to be routed via the lower-cost satellite route.

http://www.iana.org/assignments/ip-parameters

Quote
The TOS value is used to indicate "better".  Only one TOS value or
property can be requested in any one IP datagram.

Generally, protocols which are involved in direct interaction with a
human should select low delay, while data transfers which may involve
large blocks of data are need high throughput.  Finally, high reliability
is most important for datagram-based Internet management functions.

Application protocols not included in these tables should be able to
make appropriate choice of low delay (8 decimal, 1000 binary) or high
throughput (4 decimal, 0100 binary).

Might I remind everyone that IANA states that you can only use one TOS option every IP header, so that means you have your choice of only one option such as "High Bandwidth", or "Low Delay".
« Last Edit: August 04, 2003, 08:57:33 pm by cablenut »
Life is lived by however you perceive it...