Jump to content

IP type-of-service (ToS) support; flexible ul speed limits


shipwreck

Recommended Posts

Isnt BT traffic already easy enough to identify by the packet contents? (the 'BitTorrent Protocol' string thats crammed in there)

You can identify bittorrent packets by checking the TCP payload for the string you mentioned, as some ISPs do (see this white paper (.pdf file) for details), but I'm not aware of any affordable router / firewall solution for home users that is able to do so. This approach should be more resource demanding as well - ToS detection is faster and more simple.

Link to comment
Share on other sites

  • Replies 73
  • Created
  • Last Reply

Well, if you're looking for a home solution said, do QoS based on the port.. I suppose that would work, though I'm not sure about outbound connections. Otherwise, use cFosSpeed. (If your main reason for using QoS is for VoIP, then you just set that to high priority on the physical port it's using.)

The bulk data thingy is for ISPs and admins, really. The idea is that they don't have to use packet inspection for all the different protocols that generate bulk data (ie. I'd imagine that an HTTP download qualifies as bulk data, but not just regular web browsing, so the browser should identify the data as such).

In any case, it's a new niche thing right now, so it should be confined to Advanced Options if implemented, IMO. But yes, "future-proofing" is good ;)

Well, setting your BT-traffic do bulk can make up- and downloading go slower if your ISP actually uses ToS-shaping and there are bottlenecks in the network.

That is something that I thought about, but I'd imagine since so few people are using it that no ISPs are actively doing this sort of filtering right now. (I'm sure they will in the future, though.)

Link to comment
Share on other sites

How Can I mark the type of service bits in windows 98?

I try to edit DefaultTOS field of [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP]

and I tested with a packet capture program.(with computers, one is 98 the other is XP)

the computer,installed Windows 98, was sending a packet. the other computer, installed Windows XP, captured the packet. I didn't find that TOS bits,I was marked with the above way. rebooted and try.. a lot of times..^^;

Anyone know how to mark TOS bits in windows 98?

Link to comment
Share on other sites

  • 2 months later...

I would just like to say I also would also like to see added the ability to allow the TOS field to be set to any desired value, just as Azureus does.

Something like a 'net.ip_tos' field in the advanced options is all that is needed. The whole point being to provide a method for p2p traffic to be easily and quickly classified by a router when doing QoS in a dynamic IP environment without needing to do packet level inspection.

This feature in Azureus is extremely useful when used in this manner.

Link to comment
Share on other sites

I am a new convert from Azureus. One look at the memory/cpu improvements and it was nearly a no brainer (thanks!). The only sticking point for me is the ability to set the ToS flag. I have been using it with great success in Azureus, and I am already missing it in utorrent. I know there has been mention of cFosSpeed and just setting the QoS for the ethernet port on the router, but in my situation neither works.

I have several machines, in use by several people. Web browsing needs to just work, and with my DSL connection+Bittorrent w/o QoS thats a bear. Using a single machine "qos" package like cFosSpeed would not help any of the other users/computers that share the same DSL line.

Ethernet port based QoS doesn't work because:

a) I don't have a "managed" switch that would enable me to mark a port for QoS.

and B) even if I did, I don't always use bittorrent on the same machine, so I would have to set it on all the ports, and what good would that due.

Content parsing QoS is just too complicated to set up, and adds a lot of work to the tiny linux box that is supporting all the traffic. To add it to the utorrent program itself should be fairly easy, since it's just a socket option, and could be added to the advanced page.

In Short: PLEASE PLEASE PLEASE add this :)

Link to comment
Share on other sites

The next major release will have additional bandwidth

negotiation for multiple PCs connected to a single router.

And if you have a linux box working as a router, just use ipp2p. My dinky little WRT54G has l7filter and ipp2p built into it, and can handle it fine. :P

Link to comment
Share on other sites

You can identify bittorrent packets by checking the TCP payload for the string you mentioned

I have a rather robust linux server managing my internet connection, and I am not a novice, so I feel justified in saying: it doesn't always work. It is rather difficult to classify bittorrent traffic -- in fact, it's technically impossible to do without overmatching (classifying other traffic as bittorrent traffic), so they all undermatch. I see this all the time in my bandwidth graphs (yes, I am that geeky). ipp2p and l7-filter were mentioned, but you should go read their docs which state this fact.

For instance, right now I am download (uhm..) something and all of the traffic is falling through into my "other" category. If I were able to mark ToS, then I wouldn't even need an application-layer classifier because the TCP packet itself would say, "hey, I am a bulk data transfer." I fail to understand why this doesn't get added because it would be such a trivial edit to the code to allow advanced users to do this. I am dissapointed by this.

For now, I have accepted the misclassifications (and misallocation of my bandwidth) en lieu Azureus eating up other resources (cpu/mem).

Link to comment
Share on other sites

And if you have a linux box working as a router, just use ipp2p. My dinky little WRT54G has l7filter and ipp2p built into it, and can handle it fine. :P

That only works if neither end it using MSE encryption, which a lot of people do these days (and you cannot completely disable it in uTorrent). I have the same router setup, and using ipp2p is noticably less reliable than using the TOS bit. Using a TOS bit is 100% reliable regardless of whether MSE is used or not.

Link to comment
Share on other sites

  • 6 months later...

First of all I'm sorry for bumping up this topic after so long. But right now I'm in the middle of moving from Azureus to uTorrent and there's only one thing I really miss: TOS tagging. I noticed that l7filter is already missing 30-60% of BitTorrent traffic with uTorrent (maybe because of the increasing use of encryption) and that really messes up my QoS.

So, will this feature be implemented any time soon?

cya

Link to comment
Share on other sites

I have been subscribed to this thread and the bump brought me back. I want to share with others my solution to this problem. As of version 1.6 (build 473) (2006-07-01), you can solve this problem by going to the advanced tab and setting the "net.outgoing_port" to some port which you can now use to do your usual iptables magic. I have been doing this for the past few months and it works like a charm.

Link to comment
Share on other sites

  • 1 month later...
As of version 1.6 (build 473) (2006-07-01), you can solve this problem by going to the advanced tab and setting the "net.outgoing_port" to some port which you can now use to do your usual iptables magic. I have been doing this for the past few months and it works like a charm.

... except when uTorrent attempts to talk to the same remote tracker, at the same time, as I found out today :(

The feature "mostly" works ok because of, I'm assuming, a one-to-one (and hence unique) address tuple on the sockets to peers. In English: one local outbound connection per remote IP.

When uTorrent attempts to make a (second) connection to the same remote tracker, from the same source IP and port, Winsock says "Typically, only one usage of each socket address (protocol/IP address/port) is permitted."

What needs to be done is for the authors to add a socket option - SO_REUSEADDR. This loosely says, "allow another bind to the same socket tuple, in any socket state excepting actually connected." Windows makes its first connection, the socket closes but stays in TIME_WAIT for a little while, so future socket binds fail.

Take a look here for more information -- look up error code 10048:

For server applications that need to bind multiple sockets to the same port number, consider using setsockopt (SO_REUSEADDR).

So, net.outgoing_port almost works 100% -- can you guys please patch this issue up with the SO_REUSEADDR fix?

On the other hand, merely adding the (much) requested setting of outbound ToS field would be an even better solution. I'm in the same boat as most -- I'm not interested in the ToS field beyond my router (and PacketShaper), and nor do most ISPs. I just want to correctly identify and classify outbound BitTorrent traffic with my PacketShaper.

(Encryption kills all chance of even something like a Packeteer from layer 7 detecting said traffic, so forget that idea ;))

Setting both the outbound src port and ToS options in Azureus, before today, worked perfectly. I moved over to uTorrent today :(

Link to comment
Share on other sites

can you guys please patch this issue up with the SO_REUSEADDR fix?

I'll let Firon speak for himself, but he hasn't been interesting in doing anything about this in the past, probably because it falls under "good enough" for him. The TOS field was a similiar one-liner setsockopt call and he didn't seem interested in that despite CapnBry providing all the info.

Just to bring it together, the desired patch would be both:

int tos = 8; // Grab this value from the advanced settings
BOOL on = TRUE;
setsockopt(hsocket, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(tos));
setsockopt(hsocket, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
...
bind(...);

And then it would be nice to put something in the FAQ for people wanting to play with TOS to go read KB 248611, which contains the instructions on how to enable TOS on their computer.

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...