How to allocate bandwidth on a router?

Xenon14

Platinum Member
Oct 9, 1999
2,065
0
0
My friend is rooming with 3 other guys, and they bought a 1.5mbit DSL line. Unfortunately, his roommates insist on downloading movies from dusk till dawn, and most his online performance is cut to 56k baud speeds. They're using a Lynksys BEFSR41 ver 2 router. How would he go about splitting up the bandwidth evenly, so that each person is guaranteed a certain amount of speed.


On a side note, what is the speed in kilobytes of a 1.5mbit connection? 1500?
 

Valent

Junior Member
Oct 16, 2002
8
0
0
1.5mbit~187kB/s

I've been trying to find a program that could do something like you're talking about. I dont think there is anything you could do with your router to split up the bandwidth evenly.

Possibly changing the rcvwindow size could limit bandwidth? i know people tweak it for broadband to get more bandwidth, maybe its possible to lower it and limit the bandwidth?
 

josphII

Banned
Nov 24, 2001
1,490
0
0
cant you just connect a hub to your router? dont hubs split incomming bandwidth evenly amungst their ports?
 

techfuzz

Diamond Member
Feb 11, 2001
3,107
0
76
The nature of any hub is to split the available bandwidth equally amongst those connected to it. He could be really mean and buy a hub and put his roommates all together on that one hub and plug himself in to the router directly! hehehe

techfuzz
 

Dug

Diamond Member
Jun 6, 2000
3,469
6
81
The nature of any hub is to split the available bandwidth equally amongst those connected to it
Hubs are multiport repeaters not multiport bandwidth regulators.
 

hirschma

Member
Mar 3, 2000
143
0
76
The simple answer is: you can't ;) at least, with the setup that you have. You need to put in some kind of packet shaper. Commercial packet shapers are available for mucho dinero, or you can try using a more ghetto solution.

IF you have a crap PC lying around, it is totally possible to do this, with some effort. I define "crap PC" as any rig that is unuseable by today's standards, but is better than a 386 CPU. The stuff you find in folks' garbage cans :)

First, you'll need to set things up like this:

Internet connection|-----|router|-----|crap pc|----|hub/switch|-----|all of your PCs

So you'll need two ethernet cards in the crap PC. I don't know what drivers the boot disk contains, but I'd bet that NE2000 compatible, Intel, 3com and Realtek are there - which is good, since generic Realtek ethernet cards can be had for under $10 each.

Then, you can go get an IP_DUMMYNET disk here and follow the instructions.

Dummynet does what you want. You can set bandwidth to get allocated in different amounts to different IP address. Use the router to set up DHCP for your idiot roommates, and keep a static address for yourself. You can do other things with the disk, like block off websites, or reroute users to alternate sites. Send them to Disney everytime they try to get to their favorite porn site. More seriously, you can use it to make a bi-directional firewall, so that spyware won't work anymore.

Note that Dummynet is available for most unix-like operating systems, so you don't have to use the disk from that page - you can try to set it up under FreeBSD, OpenBSD, or some Linuxes.

Depending on your internet connection, you can likely get rid of the router entirely and just use the crap PC to do your routing, firewall, etc.

This is non-trivial stuff, tho, so it isn't going to be a solution for most folks. However, it is the only (affordable) way to do what you want. I'm getting ready to build a rig like this myself - my old Linky isn't cutting it anymore.

jonathan
 

hopeless879

Senior member
Mar 4, 2002
900
0
0
Can't do it with your current setup like hirschma said, theres a program for linux called squid that can regulate bandwidth somewhat. You can control bandwidth for types of files also, such as *.avi, *.mpg etc. You'll need an extra box to setup as a router though.
 

hirschma

Member
Mar 3, 2000
143
0
76
Originally posted by: hopeless879
Can't do it with your current setup like hirschma said, theres a program for linux called squid that can regulate bandwidth somewhat. You can control bandwidth for types of files also, such as *.avi, *.mpg etc. You'll need an extra box to setup as a router though.


Sorry, you're incorrect. Using Squid won't work unless here unless you set it up in transparent mode, and even then it'll only work for whatever protocols you tell it to. If there's a new filesharing app out, it won't work. Squid is a caching app, primarily, not a packet shaper. Moreover, if you can't get it to work transparently, you'll have to configure all of the roomates' computers to use Squid.

Dummynet will work at the transport level, not the application level. Did you even go to the URL I posted? I think it explains what it does, and what to do, pretty clearly.

jonathan
 

Bovinicus

Diamond Member
Aug 8, 2001
3,145
0
0
There is a much simpler solution than all of this, if the software they are downloading movies with supports it. Limit the bandwidth on each separate computer via Kazaa, Direct Connect, or whatever program it is they are using to download the movies. If there are 40 guys, about 40K/sec each should suffice, depending on how good of a connection they have. If that kind of option is not available within the software they are using, he should switch to cable. The performance won't be degredated some much with massive amounts of downloads when using cable. Or, he "accidentally" spill water on all of their computers. =P
 

hirschma

Member
Mar 3, 2000
143
0
76
I think that the situation, if I read it correctly, is that his roomates are not voluntarily reducing their bandwidth use. Getting them to change their settings falls into "volunatary" :)

Since setting up a cache or packet shaper is kind of difficult task, I'm guessing he's either going to have to lock them out, or just live with it.