How do I optimize my network traffic when a user is sucking a ton of bandwidth with torrents?
January 11, 2011 5:40 AM   Subscribe

I'm pretty sure one of my housemates is killing our network by clogging it with her bittorrent traffic. Is there anything I can do, without access to her computer, to make the internet work properly?

I suspect that the best bet would be to forward the port that her torrent client is on to her IP. But without access to her computer, can I get this information?

Other details that may or may not be relevant:

-We have a Linksys WRT54GS router and Comcast Cable internet.
-I have a free account with OpenDNS, and use their DNS info.
-We have 4 computers and a few other devices connected to the router, all via WiFi. There are no direct wired connections to the router.
-I have messed around with the Wireless QoS settings on my router, but that doesn't seem to really make a difference. The only options are WMM Support: [enable / disable] and No Acknowledgment: [enable / disable]. I don't know what these mean, but I have tried various combinations and the speed of loading websites / netflix / etc is still sluggish.
-I have messed around with forwarding ports directly to my IP and that doesn't seem to really help either. For example, I thought that I might be able to forward the range of ports from 21 to 80 to my IP in order to give me a better web/etc experience, but it still seems sluggish. Also, I realize that this doesn't help the other 2 web users on the network who aren't clogging it up with torrent traffic.
-We all use DHCP and have dynamic IPs on the network. I'd rather not talk to anyone in the house about tweaking their settings to have static IPs.

Is there anything else that I should try? ideally, I'd like to give much lower priority to the bittorrent traffic in order to make room for everything else -- mostly web/email, some netflix/hulu, some skype video chat. I'd really like to be able to do this without having a conversation with the person who is torrenting and without having access to her computer. If I absolutely have to, I will, but I'd rather not.
posted by TurkishGolds to Computers & Internet (26 answers total) 6 users marked this as a favorite
What you want to do is set QOS at the protocol level and drop the P2P traffic into a low rate class.

The easiest (for some definition of "easy") way to do this is to reflash your wrt54gs firmware with an alternative like dd-wrt or tomato, both of which give you much greater control over what goes in and out of your network. You will need to check your specific model and version with the ddwrt database to see if it's compatible, and if it is, what the steps are to reflash it.
posted by jquinby at 5:55 AM on January 11, 2011 [1 favorite]

You could find out what torrent software she uses, look up the port and have the router block that port, then claim ignorance when she can't torrent.
posted by InsanePenguin at 5:58 AM on January 11, 2011

As you can't ask for your housemate's BitTorrent settings directly, you could use something like WireShark to figure out what port is being used, then mark this port as low priority in your router settings.

Jquinby kicks it up a notch with firmware flashing - if you have a V5 or V6 version of the WRT54GS, you should be able to do this and have considerably more control over the router's settings.
posted by NordyneDefenceDynamics at 6:00 AM on January 11, 2011

I should have added, most torrent software defaults to the port range 6881-6889, so just try blocking those first and see if it solves your problem. When your housemate comes cursing out of her room, you'll know it worked.
posted by InsanePenguin at 6:02 AM on January 11, 2011 [2 favorites]

The easiest option in this situation is probably to actually talk to her. I know you said you only want to do that if it is absolutely necessary, but it will save you a whole lot of technical hassle if you can come to an agreement.

If she is using µtorrent, which is one of the best torrenting clients around, she can set up a schedule so that the speed is limited by the application by hour and day and you could ask her to only allow the application unlimited speed at certain times (usually at night or while people are at work).

If you are determined to manage this without her involvement then it might be worth installing DD-WRT on the router (google search for it). It has the extra capability that you can limit speeds to certain IP addresses and you will at least be able to monitor how much data each person is using at certain times. It's easier than you'd expect to install, and there is some decent documentation on how to set up the router to perform as you want it.

Oh, and forwarding the BitTorrent ports to her IP will probably make the situation worse (as far as I understand it) as it will enable the client to communicate with other external computers more efficiently and transfer more data per second. In fact you would be better off blocking those ports completely (although this most likely still won't stop it).
posted by iwillcatchthebird at 6:04 AM on January 11, 2011 [7 favorites]

Whoops, looks like the screenshot I linked to was for HyperWRT firmware, rather than the stock version you are using.

If you do decide to go with a firmware upgrade (and your router supports it - check the label with the serial number and FCC notices), then this guide might well help - it is specifically talking about setting up QoS on a WRT54GS using OpenWRT.
posted by NordyneDefenceDynamics at 6:05 AM on January 11, 2011

Find out what IP address your housemate is assigned by the router. (temporarily) Block them to see if it is who you think it is. My linksys router will allow me to block an IP for a certain window of time during the day (or totally).

If you can find out what port BT is using on her computer, you could also block that, but some/most BT clients will use a random port to get around this.

Another thing to check is the channel that your router is using, in case it isn't your housemate.

Port Forwarding didn't work because it is for requests coming in to your network from the internet. You would use it if you had a web server running on your laptop and wanted to get to it from some other place.

Also, while some people don't have issues with netflix and skype over wifi, some people do. Have you tried a wired connection to the router?

It could also be a failure of your ISP's equipment. My cable modem allows me to check the incoming signal strength, and a large negative dB was a good indication that there were issues in the cable coming to the house.
posted by ArgentCorvid at 6:07 AM on January 11, 2011

The stock firmware is complete rubbish, so don't even bother looking for the correct options as they aren't there. You need to flash it with something better to get the features you need to combat this problem. With DD-WRT for example you can configure fixed DHCP mappings so that each MAC address gets the same address each time, and then you can shape by IP address. There's also a donation-only version of DD-WRT that lets you shape directly by MAC address.
posted by Rhomboid at 6:07 AM on January 11, 2011

Just as a warning, is it your name on the Comcast Cable account? If someone is brazen enough to fill the pipe up with Torrent traffic (and by brazen, I might also mean clueless), there is a real possibility of the account holder receiving a legal notice from Comcast or third parties.

I know the talks are uncomfortable, but you do not want to be on the hook for thousands of dollars in fines and/or legal fees.
posted by shinynewnick at 6:10 AM on January 11, 2011 [4 favorites]

Moving any client computer you can, from WiFi to wired connection, will not only improve connectivity for the newly wire connected machine, but also for the remaining WiFi machines, due to relief of contention for WiFi. If you're using stock Linksys/Cisco firmware, make sure you are using the latest version, for your hardware level revision. The WRT54GS came in several hardware revisions (versions); if you have an earlier version with 32MB of RAM and 8MB flash, you can use 3rd party software like DD-WRT or Tomato to give you some advanced load balancing features via software. Later hardware revisions with 16MB RAM, and 4MB or even 2MB flash are all supported by DD-WRT, but with less memory to work with, you may have to pick feature subsets important for your situation. Tomato only works on hardware revisions 1 through 4.

If you're using stock firmware, and WPA2 or better WiFi encryption, you can probably safely cut back the key negotiation interval from a few minutes, to an hour or more, which will reduce the computational overhead the router is using to renegotiate encryption keys with all clients at the end of every interval, and then rebuilding its internal NAT and port mapping tables for the automatically renewed encryption connections. In general, using stock Linksys/Cisco firmware port mapping isn't useful to you for traffic management, unless you are intending to publish an internal machine like a Web server, to the wider world, because of the way it is implemented with NAT in these SOHO routers (forwarded ports are just blocked out of NAT entirely, but only for externally initiated connections).
posted by paulsc at 6:11 AM on January 11, 2011 [1 favorite]

Is she technically inclined? If not, try talking to her but dropping some jargon in there. Something like "I ran a PCP on the UDP packet network this morning and, man, my LSD packets and way below normative. I even ran a QRS test on the subnets and even they came up null! It seems like maybe some torrent traffic is slowing down the network"

as opposed to

"Jane, stop downloading movies all day". It's a little passive agressive/packed with white lies, but if that's your thing.
posted by GilloD at 6:23 AM on January 11, 2011

If you try to block her, there's a good chance she'll try to get around your blocking.

I understand that you don't want to talk to her, but I think it's the best way to get the result you're hoping for.

Incidentally--have your other housemates noticed these network problems?
posted by box at 6:38 AM on January 11, 2011 [1 favorite]

You could simply block the ports commonly used by torrent traffic, 6881 to 6999, at the router. Surely, there's a setting for that. Even my ancient Netgear router allows port and service blocking. Of course, port blocking is an all-or-nothing approach to the problem.
posted by Thorzdad at 6:40 AM on January 11, 2011

Forgot to add above:

What is WMM? WiFi Multi-Media. Basically a Cisco firmware feature for automatically identifying and prioritizing audio, video, and voice traffic connections, while delaying all other traffic when such connections are being prioritized. Works, so-so, depending on the kinds of traffic you generate, and whether the Cisco firmware recognizes it correctly. The No Acknowledgement setting, if you use WMM at all, just allows the router to use UDP protocol over WiFi for streaming media, instead of the higher overhead, handshaked TCP protocol, so the router will do no resends of dropped packets on WiFi, and thus spend less radio time and internal CPU effort tracking and responding to all the TCP handshakes with WiFi clients.
posted by paulsc at 6:41 AM on January 11, 2011

I'm going to Nth the DD-WRT suggestions. A friend of mine has done this, and, while it sounds dificult, the process is well documented and it really does give you great control over your router.

What you're looking to do is "shape" the network traffic to keep her from shutting it down for everybody else - essentially, you want to limit her bandwidth so the rest of you can play too. DD-WRT will help.
posted by richyoung at 6:50 AM on January 11, 2011

The only correct solution is to act like an adult and talk to her. Blocking the ports won't solve anything as she'll just change them and if she's paying for internet you can't just kick her off the network.

Even with DD-WRT, QoS settings will be of minimal help with high-bandwidth torrenting and port forwarding won't help you either. Just ask her to enable the upload throttling settings on her client for times of day when others need to use the internet.
posted by turkeyphant at 6:52 AM on January 11, 2011 [2 favorites]

Even with DD-WRT, QoS settings will be of minimal help with high-bandwidth torrenting

That's simply not true. You can limit her to X KB/s total bandwidth which is perfectly adequate to control the situation. Doesn't matter what port the traffic is on or how she tries to get around it, the limit will still apply.
posted by Rhomboid at 7:02 AM on January 11, 2011

You might also want to consider getting a new router. I'm a big fan of the work that went into DD-WRT on that router, but you can get a new N capable router with DD-WRT already on it and do all the tings mentioned above without reflashing. You could also take advantage of the faster protocol. I got the Buffalo Nfiniti, and it's wonderful.
posted by advicepig at 7:18 AM on January 11, 2011

My school had a Hell of a time when a bunch of students started using Netflix and Hulu. Add that to the usual Youtubing and online gaming and you've got yourself a mess.

So how sure are you that it's torrent stuff that's causing the problem?

Because of this, the only adult way to handle it is to talk to her. If you don't want to directly confront her than make it a house meeting and ask everyone all at once what's going on with the network.
posted by theichibun at 7:25 AM on January 11, 2011

You could always turn their web world upside down if you're feeling particularly passive aggressive jokey. I do however, suggest that merely speaking with the person and letting her know that her web activity is affecting everyone else in the house negatively is probably going to be your most satisfactory and mutually beneficial tack, provided you both are reasonable people.

You might even want to first make sure that it is indeed her behavior that is causing this issue before confronting her. Possibly waiting until she is definitely not downloading/using the internet before testing speeds, or barring that (if she always has a torrent going) restarting the router to break current connections and testing then when she isn't home.
posted by Debaser626 at 7:32 AM on January 11, 2011 [1 favorite]

In my experience with that router, the issue isn't necessarily the download bandwidth, but the upload. On my liksys, if I let the upload bandwidth get beyond a certain point, the whole router would start to seize up and people wouldn't be able to load basic web pages. You could ask her to please limit the upload speed which should be easy through her client. That may solve your problem.

The bigger issue, though, with someone doing all that, is if any of it is illegal you could end up taking the hit on it. You may want to be forward about that, too. Either way, you'll have to talk to her.
posted by ghostiger at 8:45 AM on January 11, 2011

I know nothing about Linksys firmware (I've been using D-Link routers exclusively for a decade), but is it possible in the router admin to identify her network interface MAC address by looking at current connections? If so, you may be able to reserve a DHCP IP address for that MAC, which will essentially give her a fixed network IP. This should make applying QoS policies, port forwarding, and other filtering easier (again, assuming Linksys firmware operates anything like D-Link's). But yeah, if you can, it may be much easier just to talk to her about voluntarily reducing her bandwidth during peak access times.
posted by dilettanti at 8:50 AM on January 11, 2011

One of the biggest issues is probably (as mentioned above) the wireless leg of the network. Doing QoS on the router isn't going to make a whole lot of difference in that case, because the QoS happens after the traffic passes through the wireless network.

So, if you can't get her to shut up with the torrents, maybe a re-engineering of the network might be in order. Cheap and easy would be to get another wireless router, plug it in as a client to the existing one, and tell her to connect to that one. Just putting her on her own wireless "network" might clear things up.

If it still is bad, my experience with dd-wrt QoS is that it is easiest to prioritize traffic by physical port or by MAC address. Just make your MAC addresses higher than hers, and things will work better.

Another QoS strategy is to prioritize the good traffic, instead of trying to ferret out which ports the bad traffic is using. An example:

1- Highest priority - voip.
2- Next highest - HTTP, SSH, any other thing you use.
3- Everything else.

I have this kind of setup on my own home brew router, using a simple (HTB?) QoS. Instead of playing games with percentages of bandwidth and all of that, it simply separates traffic into those three categories, and passes any packets that are in the first queues first, and the rest of the traffic after that. As long as you make the categories in a sane manner, everyone gets everything they need. TCP will handle shaping the flows after that.
posted by gjc at 9:02 AM on January 11, 2011

Two things about bit torrent don't okay well with home Internet connections. Most home Internet connections are asymmetrical, they can download faster than they can upload. At the same time, BitTorrent trackers are often set to kick out people who fall below a certain ratio of upoads to downloads, and the bit torrent protocol rewards faster uploads with the opportunity for faster downloads. The result is that your upstream ends up filled to capacity by bitstream uploads, which slows down the acknowledgment of incoming data for regular browsing, which slows down incoming browsing, a lot.

The other problem is that bittorrent tends to keep lots of connections open. The router has to keep track of these connections and doing so can eat in to the available memory and CPU of the router, which can cause problems as well. I've had problems with this with the router you are using.

The first step is to talk to your roommate and do some experiments to see if she is indeed causing the problem. If she is, then ask her to limit her upload bandwidth to something under the upload speed of your connection, and to keep total connections down to 100 or something.

Whether or not you can talk to her, I'd look into flashing your router with tomato firmware which you can use to shape her bandwidth use to be more friendly to other users. Do it by IP or MAC address. Don't screw with the protocol based stuff unless you have to, since lots of bit torrent clients try to foil port and protocol based flow identification.
posted by Good Brain at 9:09 AM on January 11, 2011

this is a social, not technical, problem. your roommate probably needs to fix their torrent client settings (upload speed, number of connections, etc). doing that will be more successful than trying to cut them off at the router. so - talk to them.

re: the concern about legal issues - this would also be a great time to make sure they're using peerblock and aren't going to big public trackers like you find on isohunt.
posted by nadawi at 11:36 AM on January 11, 2011

If you try to block her, there's a good chance she'll try to get around your blocking.

I'd go so far as to say: If you try to block her, there's a good chance her bittorrent software will automatically try to get around your blocking without any input from her. "Connectability" tests are basic bittorrent features, so you're up against the creativity of the bittorrent client author, not your roommate.

Ask her to use her bittorrent client's bandwidth settings.
posted by mendel at 12:25 PM on January 11, 2011

« Older Clothes for Mongolia in February   |   Bed bugs or mosquitos or fleas or...? Newer »
This thread is closed to new comments.