Question on peer-socket-tos

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
etlunatic
Posts: 13
Joined: Tue Mar 17, 2009 10:28 am

Question on peer-socket-tos

Post by etlunatic »

Hi there,

I am new to transmission and I have a question about the use of the peer-socket-tos option.

In my settings.json, I have:

Code: Select all

"peer-socket-tos": 32
I am using FreeBSD with PF and ALTQ. In my pf.conf, I have something like:

Code: Select all

pass out quick on $ext_if inet proto { tcp udp } from $ext_if to any tos 32 flags S/SA modulate state queue bittorrent 
but I don't see any traffic passing thru.

Any idea where I am wrong?

Thx
etlunatic
Posts: 13
Joined: Tue Mar 17, 2009 10:28 am

Re: Question on peer-socket-tos

Post by etlunatic »

I changed my pf.conf to this:

Code: Select all

pass out quick on $ext_if inet proto { tcp udp } from $ext_if to any tos 32 no state queue q_bittorrent 
pass out quick on $ext_if inet proto tcp from $ext_if to any tos lowdelay queue q_tcp_ack 
Still no traffic.
Last edited by etlunatic on Wed Mar 18, 2009 11:23 pm, edited 1 time in total.
etlunatic
Posts: 13
Joined: Tue Mar 17, 2009 10:28 am

Re: Question on peer-socket-tos

Post by etlunatic »

Here is what I get with tcpdump for a packet sent by the transmission daemon:

Code: Select all

Some_Time_Stamp IP (tos 0x0, ttl 64, id 29049, offset 0, flags [DF], proto TCP (6), length 60) My_IP.51480 > Some_IP.12071: [|tcp]
It doesn't look the packet tos is anything close to 0x20 :cry:
etlunatic
Posts: 13
Joined: Tue Mar 17, 2009 10:28 am

Re: Question on peer-socket-tos

Post by etlunatic »

For the record, as I never got the TOS option to work (I suspect the NAT rule in pf reset the TOS although it is undocumented), I am moving to plan B which is to run the daemon under a dedicated user (e.g. transmission) and set out the parameter "user" in the packet filter rule as shown below:

Code: Select all

pass out quick on $ext_if inet proto { tcp udp } from $ext_if to any user transmission flags S/SA modulate state queue bittorrent 
This is of course for the daemon running on the gateway box.

Now, if you are planning to run the daemon on a different box, my best advice would be to set up a proxy server bound to an alias of the internal NIC on the gateway server and connect the daemon to this proxy server. You can then use pf and altq to filter and queue traffic from this alias.

Adding my two cents...
Master One
Posts: 6
Joined: Thu Feb 12, 2009 11:44 am

Re: Question on peer-socket-tos

Post by Master One »

I also just wondered, how this setting can be handled. If anybody knows what to to with peer-socket-tos, please share your knowledge.
Post Reply