-   Linux - Networking (
-   -   TOS in IP Header set to Minimize-Dealay - no difference (

ddaas 07-23-2005 07:16 AM

TOS in IP Header set to Minimize-Dealay - no difference
Hi I have a 1024/128 ADSL connection.
I wanted to test the TOS field in IP Header.

So I started aMule and let it use the whole upstream (16KB).

Then I did: #iptables -A OUTPUT -t mangle -p tcp --dport 22 -j TOS --set-tos Minimize-Dellay (like here:

Then I ssh to one of my server on the Internet. The delay was awful. I could use it...

So, It seams that the tos field of the iP header has no influence in prioritizing of my outgoing traffic !! Why? Did I miss something?


fr_laz 07-23-2005 08:58 AM


using tos to handle priority works fine... when your router is configured to use tos! You just marked the packets, but then you've got to set rules on the switches/routers etc to use the tos fields. The machines on which to enable the use of tos will depend on your network architecture...

ddaas 07-25-2005 10:22 AM

The standard pfifo_fast scheduler in Linux has 3 different bands. traffic in band 0 is transmitted first.

Doesn't linux put packets with ToS set to Minimum Delay in band 0?

That is how I understand from "LARTC 15.4 - Prioritizing interactive traffic". At least they only mark the packets.

Am I right?

mpeg4codec 07-25-2005 09:26 PM

Setting the ToS bit only affects the immediate router. The upstream routers, such as the ones at your ISP, probably ignore it. A better plan would be to use an HTB qdisc, or a script like cbq.init to give a service such as SSH priority.

If that script doesn't help, I can give you an HTB setup that should help. Let me know if you need it.

ddaas 07-26-2005 02:59 AM

mpeg4codec, thanks !
I've learn something about QoS, HTB etc and I would make myself a htb script.

Do I have any reason to use CBQ instead of HTB? Or does CBQ have any advantage over HTB?

mpeg4codec 07-26-2005 08:32 PM

CBQ allows for a more fine-grained access control mechanism than HTB, but most people wouldn't use that. It almost certainly won't give you much benefit. You should stick with HTB if you're going to write your own traffic shaping scripts, as it is worlds less complex.

All times are GMT -5. The time now is 09:17 PM.