Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Traffic shaping using pfifo_fast
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Sat May 11, 2013 6:52 am    Post subject: Traffic shaping using pfifo_fast Reply with quote

On trying to understand the behavior, I'm stumped with man tc-prio. It contradicts itself all the time. So I'ld like to clarify.

First of all, this datagram in the man page --

Code:

              0   1   2   3   4   5   6   7
              +---+---+---+---+---+---+---+---+
              |           |               |   |
              |PRECEDENCE |      TOS      |MBZ|
              |           |               |   |
              +---+---+---+---+---+---+---+---+


Has not been seen in ANY RFC. First the author says --

"Mapping occurs based on the TOS octet of the packet, which looks like this:"

i.e. he admits that the whole datagram above (an octet)is the TOS field, then marks the middle most 4 bits as the TOS :?

Then he says --

Quote:
As there is 1 bit to the right of these four bits, the actual value of the TOS field is double the value of the TOS bits.
]

What is MBZ? Is it always 1? Why is it even checked by the qdisc? Since the author claims that only his TOS filed (4 bits) is checked as in this table --

Code:
              TOS     Bits  Means                    Linux Priority    Band
              ------------------------------------------------------------
              0x0     0     Normal Service           0 Best Effort     1
              0x2     1     Minimize Monetary Cost   1 Filler          2
              0x4     2     Maximize Reliability     0 Best Effort     1
              0x6     3     mmc+mr                   0 Best Effort     1
              0x8     4     Maximize Throughput      2 Bulk            2
              0xa     5     mmc+mt                   2 Bulk            2
              0xc     6     mr+mt                    2 Bulk            2
              0xe     7     mmc+mr+mt                2 Bulk            2
              0x10    8     Minimize Delay           6 Interactive     0
              0x12    9     mmc+md                   6 Interactive     0
              0x14    10    mr+md                    6 Interactive     0
              0x16    11    mmc+mr+md                6 Interactive     0
              0x18    12    mt+md                    4 Int. Bulk       1
              0x1a    13    mmc+mt+md                4 Int. Bulk       1
              0x1c    14    mr+mt+md                 4 Int. Bulk       1
              0x1e    15    mmc+mr+mt+md             4 Int. Bulk       1


What is this TOS and 'bits'? How is it's value computed?

And finally, when I try and change the RFC TOS field using iptables -j TOS (i.e. the 8 bit field), will it alter the whole 8 bit TOS field or this 4 bit TOS field?

Now for ktorrent. In this client, you can set the value of the DS field. Is this the same 6 bit DS field (successor of the 8 bit RFC TOS field), or something else?
_________________
My blog
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat May 11, 2013 8:32 am    Post subject: Re: Traffic shaping using pfifo_fast Reply with quote

dE_logics wrote:
What is this TOS and 'bits'?

More info here.

I'd say ignore TOS - I've never heard of it being worthwhile, while investigating traffic shaping. I expect that ISPs ignore those flags.

Quote:
DS field

Never heard of it.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Sat May 11, 2013 9:01 am    Post subject: Reply with quote

I did some investigation and found this related to RFC 1349; although outdated by DS (differentiated services), this still applies to the qdisc pfifo_fast, which I'm trying to configure in this case (i.e. I'm not expecting the ISP to do anything).

Also the TOS field appears to be internal numbers which the TOS jump target of iptables appears to accept.

That link is based on class based queues which will take too much time to configure, with maybe similar results.
_________________
My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum