P2P Traffic Shaping For Home Use? 288
An anonymous reader writes "My housemate uses an aggressive P2P client, that when in use makes the Internet unusable for everyone else connected to the network. After hearing about various ISPs shaping traffic to reduce P2P traffic, I was wondering if there was a solution for managing P2P traffic on a home network. I have a Linksys WRT54G available for hacking. Can Slashdot recommend a way to reduce the impact of P2P on my network and make it usable again?"
Need more input! (Score:3, Insightful)
Which version? Check the model tag, it should say there...
Re:Need more input! (Score:5, Funny)
Re: (Score:3, Funny)
Heeeeeere data data data.....
Re: (Score:3, Funny)
Re: (Score:2, Informative)
Build a Better firewall... (Score:3, Informative)
I modified my WRT54G's setting to be just a wireless access point and switch by disabling the DHCP server - then built a cheap Smoothwall firewall using an old P3 800Mhz with a pair of pci nics.
DSL -> Smoothwall -> LAN Port 1 on WRT54
Leaving the WAN port unused, I still have three ports for wired PCs (nearly unlimited with the addition of more switches) and wireless works with
Re: (Score:3, Interesting)
Re:Need more input! (Score:4, Informative)
DD-WRT would do that easily. It can do it to wireless as well. Look for a compatible router, preferably one that can take a full install and strangle their link.
http://www.dd-wrt.com/ [dd-wrt.com]
Re:Need more input! (Score:5, Informative)
Good point. How 'bout a wikipedia link for the WRT54G, [wikipedia.org] with entries on available firmware?
Re:Need more input! (Score:5, Informative)
On the other hand, there is awesome shaping available in tomato firmware, it can classify traffic and show you what percentage of your traffic was in each class.
http://www.polarcloud.com/img/ssqosc108.png [polarcloud.com]
http://www.polarcloud.com/img/ssqosg108.png [polarcloud.com]
http://www.polarcloud.com/tomato [polarcloud.com]
Re: (Score:2, Informative)
Re: (Score:3, Informative)
For the tiny bit of extra money however, the GL is definitely worth it in terms of hacking.
OpenWRT requirements (Score:4, Informative)
Re: (Score:3, Informative)
Comment removed (Score:5, Informative)
IPCop (Score:3, Informative)
It can do the traffic shaping you're wanting, plus, I found, especially when I am doing p2p downloading or some online gaming, my old netgear (very old) couldn't keep up and would drop packets. I saw my download speeds go up significantly and I have the opportunity to do traffic shaping if needed.
Re: (Score:3, Insightful)
Of course if you REALLY want to simply deal w
It's simple with OpenWrt (Score:3, Informative)
ipkg install qos-scripts
vi
[ enter your linespeed in the right place ]
qos-start
Re:It's simple with OpenWrt (Score:5, Informative)
Re: (Score:2)
How about ask? (Score:5, Insightful)
If that doesn't work, well, his port on the switch might mysteriously fail during waking hours.
Re:How about ask? (Score:4, Informative)
in advanced mode, you can set upload and download maximums, if you plan on allowing this, and using latency specific online gaming, you should set the limits to HALF of what azureus is capable of without anyone using the internet.
All major clients, but it still requires talking.. (Score:5, Insightful)
The real problem here isn't traffic shaping, but about traffic courtesy. Your housemate may not know how much trouble their causing. Talk to them. Get them to set their max speeds to 1/2 or 1/4 of the available bandwidth.
They may be surprised when their OWN web browsing gets better.
Yet this does all hinge on you talking to said housemate. Go talk. I've had the "talk" and been the person talking to the housemate. It usually works out well.
Re:All major clients, but it still requires talkin (Score:5, Funny)
If not, just use some DPS and hide behind the couch....
the simplest fix (Score:3, Interesting)
This is true up to a point. It should be easy to get the offending roommate to cap their bandwidth, but it should also be easy to install a traffic-shaping router (though sadly it's not), and then the problem would be solved without having to get the cooperation of everyone (and every program on every computer) on the network, and for everyone to be constantly self-policing their own network usage.
To solve the problem in one place
Re: (Score:3, Insightful)
Re: (Score:2)
Re: (Score:2)
Liar.
Re: (Score:3, Informative)
my original suggestion was to use smoothwall's QoS. but some people felt tomato would be better than a smoothwall setup, the only reason i like smoothwall is you don't need to flash a hardware router, and if you use an older PC it will use less power running smoothwall than it ever did running windows, for whatever reason any PC from the 486 on, always uses less power running free open source software than running windows, i think it's the
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Informative)
Besides, whatever client he is using, must have its own throttle, tell him/her to set it to like 75% of what the line can handle.
Some have timers too, so it can be 50/50 during multiple use, and 100% when he's the only one. Which is far easier than tweaking/hacking something you don't really use that often, and you may want to allow other software to use 100% (or as much as possible) on his machine (file sharing over the network, etc).
Re: (Score:2)
Right. In fact, many P2P applications (at least bittorrent stuff) allows you to set max up/down rates. These can even be set on-the-fly, meaning you could let them download full-speed most of the time, but ask them nicely to throttle back when you're using the Internet. You know, like "Hey man, I'm trying to do something online, could you drop down to 20kbps for the next few hours?" Or whatever. Find a bitrate that won't hurt your usage
Unless your roommate is completely unreasonable, he'll go along w
Re: (Score:3, Insightful)
This is not about discourtesy, it's about P2P's tendency to grab all the available bandwidth. I would, for one, like to have my browser's requests prioritized over my torrent traffic, so I could browse the net at a reasonable rate while downloading. Yes, I can set rate caps in uTorrent, but that is not the ideal solution because it leaves the network underutilized. My browser does not require much bandwidth, it requires latency, which is what the poste
Talk to your housemate (Score:5, Insightful)
Re:Talk to your housemate (Score:5, Insightful)
To fix the annoyance, I would have to limit my bandwidth usage at some times of the day - and I wouldn't just have to limit my usage according to when the other tenants are awake, and according to when they use how much bandwidth, but also according to how much bandwidth my ISP feels like giving me today (my ISP is seriously bandwidth starved).
If my router had good QoS, I wouldn't have to worry about annoying others, while still being able to use all spare bandwidth. I would definitely prefer this solution.
Re: (Score:2, Informative)
Re: (Score:2)
An Eviction Notice will do (Score:2)
QoS (Score:5, Informative)
Re: (Score:2)
Re: (Score:3, Funny)
Even better hide the router inline where the cable comes into the house, they'll never know
FYI DD-WRT or Tomato are two good router firmware replacements.
Re: (Score:2)
In the days of Napster (Score:5, Funny)
His use of Napster would make the cable modem connection unusable. In response, I'd go to the home firewall device (had one of the early Linksys models) and block the traffic.
He thought the cable company was doing it.
Re:In the days of Napster (Score:5, Funny)
Obvious (Score:5, Funny)
From the Slashdot crowd? (Score:5, Funny)
Man up! (Score:3, Insightful)
The social problems: eating it cause it's there (Score:5, Insightful)
get a PC with smoothwall linux (Score:3, Informative)
a forum about traffic shaping with smoothwall
http://www.linux-noob.com/forums/index.php?s=dffc19493975498724b50564217f05e4&showtopic=3250&pid=11502&st=0&#entry11502 [linux-noob.com]
smoothwall linux
http://www.smoothwall.org/ [smoothwall.org]
Re: (Score:2)
Tomato firmware update, plus config: 2 hours.
Oldie but goodie PC: $60 + energy hogging
linux, smoothwall: 5 hours
router: $40 + config time.
Difference in function: negligible for almost any home user... except the frankenlinksys will run for hours on a UPS, let you tweak your wireless output, cost less TCO, be silent, last longer, take less space, less brainpower, and less time, and be generally a more elegant and efficient solution for the OP.
Oh yeah, and it's still linux.
Anonymous Coward (Score:5, Funny)
Re: (Score:2, Funny)
1st off (Score:5, Informative)
Re: (Score:3, Insightful)
mmm, Tomato (Score:3, Informative)
It also has QoS features, and a nice AJAX interface.
And after you install DD-WRT... (Score:3, Informative)
Running Azureus used to kill all the other network activity on my LAN. These changes made all the difference in the world.
Re: (Score:2)
I use DD-WRT on my WRT54G, and just using the QoS didn't make much different. My theory is that it isn't (just) the bandwidth that is the issue but the number of connections. I adjusted my client to reduce the number of con
Re:And after you install DD-WRT... (Score:4, Informative)
You want to reduce the time your router waits from 1 hour, as it's currently set, to two minutes.
Re: (Score:2)
It sounds like the OP didn't even begin looking into any solutions before crying to slashdot with his roommate problems.
Buy another Linksys and link them. (Score:2, Interesting)
Re: (Score:3, Informative)
Re:Buy another Linksys and link them. (Score:4, Informative)
My understanding is the motivation was primarily cost. VxWorks runs on less hardware, and presumable the amount saved my reduced flash is greater than the per seat license cost for VxWorks?
>It's unfortunate that they felt like crippling a perfectly useful router just because free firmware made it competitive with their high end products.
Due to popular demand its back as the WRT54GL
Its called discipline (Score:2)
QoS is definitely recommended (Score:2, Informative)
Easiest way: Raise QoS of OTHER traffic. (Score:5, Informative)
- Web (Http and https, maybe also 8080)
- DNS (UDP:53)
- Mail (SMTP, IMAP, POP3 (including SSL versions))
- IRC (if you use)
- FTP
- SSH, Telnet
- All TCP acknowledgement packets.
- Maybe some gaming protocols (Directplay, WoW, etc - these unfortunately require checking docs for each game)
that way, you have whitelisted most of the "interactive" protocols that suffer from loaded link. No need to keep chasing after the latest encrypted, onion routed P2P application that happens to be flavor of the month. The biggest problem is the online gaming stuff.
Re: (Score:2)
An easier way, if you've got the set up, is to do what I do; my vonage box gets the highest priority, my PC gets next highest and my home server, which does all the downloading as well as email is third along with everything else.
I can game, talk on the phone and download at 3-4mbps at the same time with no hiccups.
the human approach (Score:4, Insightful)
If so, yeah, you could try looking into the alternate firmwares for the router; they let you throttle stuff based on ports. You'll have to look at the serial number to know for sure if you can stick that in, or spend like $80 or whatever for the WRTGL, which has enough firmware space to do fun things.
Is this a technical problem or a sociological one? (Score:3, Insightful)
Just speak to him! (Score:5, Interesting)
So I spoke to him, you know - in a rational way. It's now scheduled for the nights & days when we're either asleep or at work with a few hours in between & most of the weekends where it's either throttled down to 10k/s (by uTorrent) or stopped completely.
On top of that we've got a Smoothwall box with packet prioritization for ssh/web/email/im etc. but no bandwidth throttling.
At the end of the day, if you cant come to an agreement then it's probably just gonna get worse for you two and there's nothing you can do to stop him being an asshole.
Re:Just speak to him! (Score:5, Interesting)
I had a housemate who ran P2P software all the time without even realizing it. Talking to him did nothing. Limiting the number of outbound packets from his computer to a certain number per second with a fairly high burst solved the problem. He liked playing WoW and when his WoW connection started getting all weird and I told him it was his P2P sofware he started to make sure it wasn't running. The average cap I set was plenty enough for WoW and enough for a decent download speed for P2P as well.
I'm all for bandwidth throttling and traffic shaping as long as it's to ensure usage fairness. If I were running an ISP I would have a per-customer 5 minute bandwidth meter and customers who had exceeded their share for 5 minutes would have all their traffic dropped to the lowest priority until there was a 5 minute interval in which they hadn't exceeded their share.
And it would be share of total pipe available to the ISP's upstreams, not some arbitrary fixed cap per customer. If the P2P application were written to favor connecting to other customers of the ISP that would be a way to avoid the re-prioritization completely.
I use a DLink DLG-4300 (Score:5, Informative)
Works well, but is rather expensive. Has an oversized NAT table to help with UDP server pings, so this will remedy and torrent problems you might have with your current setup.
QoS system is fairly flexible with an intuitive GUI and many preconfigured service options.
Has an option to pack the output frames completely (harms XBox Live possibly) as well as delay non-prio packets in favour of VOIP/gaming/as you configure.
Matt
Re:I use a DLink DLG-4300 (Score:4, Informative)
I've got to echo the DLink recommendation -- but I've had the 4100 for about a year. They call their QOS stuff "Game Fuel" (there were a few slashdot stories about it when they started hyping it up).
I've been very happy with mine, including being able to torrent like a freak and still use the Vonage box to make VOIP calls. I know the torrents are being throttled by my little box, but I can't see a big impact on transfer speeds. As a bonus, the DLink is much faster than the NAT firewall it replaced-- my maximum throughputs are higher.
Setup is as easy as configuring a normal NAT device. Of course, if you want to play with port forwarding, that's there too, and if you want your QOS to be a little more sophisticated than the default (which you should really try and see if you're happy with it), there are a plethora of configuration options.
OpenBSD Packet Filter (Score:5, Informative)
DD-WRT (Score:4, Insightful)
First step would be to find out what type of P2P he's using and (if it's not recognized by DD-WRT) what ports. Drop those down to bulk priority. Raise special activities like https web browsing to express (on the assumption that connecting to an https server means you're doing something important like accessing your bank). Stuff that's time-critical like VoIP and gaming should get premium priority. This took care of 90% of the problems I had.
The remaining 10% proved extremely tricky. Newer bittorrent clients default to encryption on, and it was getting by the QoS. I tried tweaking all sorts of settings to mitigate this without success. What eventually worked was a setting anything on ports higher than 1024 to bulk priority, then specifying certain ports as having higher priority. This is the QoS equivalent of switching from allow all and blocking things you don't want, to deny all and allowing things you do want. That seems to have solved the bittorrent problem.
The only problems that remain have to do with http and ftp transfers of large files. If someone sticks a 40 MB file on a web site, the router can't tell it apart from regular http traffic, so you can't drop its priority without also affecting regular web browsing. In one case a user was running a program to download an entire web site - that was killing the network since to the router it looked just like a lot of web browsing. Same with ftp - if you drop ftp's priority so the 100 MB transfers are bulk, the small ftp files like certain software updates are also bulk.
Plenty (Score:2)
You can do limits based on individual devices, which will keep any computer from ever saturating the network, or you can do time-based throttling, or whatever. I found the most useful setup was to make everything default to low priority and then raise the priority of HTTP, SSH, and other things I wanted to run interactively.
As long as nobody
There can be only ONE!!! (Score:3, Funny)
tcpkill ! (Score:2)
outsource it (Score:2)
Traffic Shaping is a preferable solution (Score:2)
Most people don't care if their P2P download is slowed down a little from HTTP traffic (which is practically in the noise by comparison most of the time, really). In fact, some of those same people would prefer *their* web browsing sessions remain fast while torrenting. The only reason to go for client-side bandwidth throttling or scheduling is because the traffic s
Google for the acronym QOS (Score:2)
It's a good idea to work things out, but... (Score:2)
Netpriva perhaps. (Score:2)
DD-WRT vs X-Wrt (Score:2, Interesting)
pfsense ftw (Score:2)
I tried smoothwall, m0n0wall, IPCop, and pfsense before settling on pfsense. YMMV.
From memory, I did a google search of slashdot and "traffi
Tomato (Score:2, Informative)
Linux, iptables and Traffic Control (tc) (Score:5, Informative)
Personally, I use iptables & tc to setup a simple HTB (Hierarchical Token Bucket filter) system with 3 priority levels:
- Interactive: SSH (with Minimize-Delay TOS-Flag), Telnet, Jabber,
- Medium: HTTP, IMAP, SMTP, POP3,
- Low: All the rest
Shaping the upload speed is my only concern. All 3 classes may use the complete upload bandwidth. The interactive HTB class gets a guaranteed 90% of the bandwidth and a high burst value. The lowest HTB class has a burst of 0 and about 5% guaranteed upload speed.
While this is only primitive setup, it allows lag-free ssh with an unlimited upload in the background.
An in-depth how-to about the Linux Traffic Control system: http://www.tldp.org/HOWTO/Traffic-Control-HOWTO/index.html [tldp.org]
A short pragmatic example using HTB & SFQ can be found here: http://gentoo-wiki.com/HOWTO_Packet_Shaping [gentoo-wiki.com]
Get Your Own Connection (Score:5, Funny)
Barring that just connect the 220v dryer line to the wall socket in his room and hope that he got his power bar for $5.99 at WalMart.
Or even better please all of your room-mates and just move.
Do this.... (Score:2, Funny)
You'll either make him stop or make him press charges. Either way it probably won't be an issue for you anymore.
Avoid DD-WRT (Score:2)
Am I the only one here who uses stock firmware? (Score:2)
Known problem with Linksys (Score:2, Informative)
From the uTorrent FAQ [utorrent.com]: "The default firmware for Linksys (and all replacement firmwares except for the latest DD-WRT and HyperWRT Thibor) have a severe problem where they track old connections for FIVE days, which causes the router to hang when using P2P apps, or any software that generates a lot of connections. DHT only aggravates the situation because of the number of connections it generates."
Does NOT apply to WRT54G/GS v5 and up.
HTH
Get him to switch to Azureus (a.k.a. Vuze?) (Score:2)
Alternatively, insert a cheap PC with 2 LAN interfaces (NICs), running SmoothWall (firewall) between your ADSL modem & your switch.
Among other things, SmoothWall can regulate bandwidth to guarantee each of you fair amounts.
Actually, there OUGHT TO BE a ONE MORE FEATURE - yet to be developed? - in any such device:
When one isn't using their portion of the bandwidth (& -certainly- when not connected to the
More of a house rules issue than a technical one (Score:3, Insightful)
If you can't have a frank conversation about communal resource usage with your own roommate than your have much bigger problems than mere router configuration will ever solve.
I'm sure you guys have laid down basic guidelines governing how you'll split up paying for and using shared stuff. Like, "Hey dude, if you insist on running that 20 node Beowulf cluster in your room to crunch SETI work units all day, you should pay more for electricity." Or if nothing that specific, at least rules along the lines of "neither of us should monopolize the common area on a consistent basis preventing the other from ever having guests over."
I don't think shared Internet usage should be any different. If you're the administrator of the network at home, it seems that what you're suggesting would be tantamount to setting up bear traps in the common area to discourage over foraging by your inconsiderate roommate. Of course, if he/she is that much of a boor, maybe you have no choice.
Bottom line though: it would probably be better to talk it over with your roommate rather than putting the smack down with filters and such... in the end, there'll be a lot less resentment from both ends.
Don't use software to solve social problems... (Score:5, Insightful)
"Don't use software to solve social problems"
This seems pretty apt here - instead of spending money and time trying to do this the hard way....
Just fucking smack him, and tell him to behave responsibly or lose his internet privileges.
Don't Answer Him... It's a TRAP (Score:3, Funny)
Re:DDWRT gives you a GUI then you can.... (Score:4, Informative)
My pings dropped 10ms and the QOS actually works.
Re: (Score:2)
Re: (Score:2)
Also, chances are, QoSing BitTorrent down in that house will probably still let it run close to full speed, as there probably aren't another few hundred people trying to look at YouTube at the same time. Web browsing really dosen't take that much bandwidth.
Re: (Score:3, Insightful)
The lengths people will go to avoid social interaction these days.