• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Limiting Bandwidth on DSL router PC.

novafire

Member
Jul 24, 2000
55
0
0
I am using a PC with Linux Mandrake to share the dsl connection for a LAN. Is there a way to limit the amount of bandwidth a user uses?
 

novafire

Member
Jul 24, 2000
55
0
0
The shaper only limits the traffic on the eth interface? right? I was not very specific, but I wanted something that would limit traffic per user (PC on the LAN). For example, PC #1 can download at full DSL speed whenever it needs too, but PC #2 can only pull 10Kbps or something like that -- no matter how hungry it is for bandwidth.

That is what I would like.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
Yes. Sorry. Shaper limits traffic for physical interfaces only. Nothing IP/MAC addressed based.

However, if I recall, the QoS stuff in kernel 2.4 can do that. Or maybe I'm just losing it. You'll want to look that stuff over as well as the iproute2 stuff and the ipnatctl stuff (ipchains/ipmasq for kernel 2.4).
 

novafire

Member
Jul 24, 2000
55
0
0
Ya, I remember reading about 2.4 having a lot better support for this. I did not think any kernel before 2.4 was too useful in this respect. But I wanted to ask just to be sure. I think I will attempt the 2.4 upgrade soon.

Thanks
 

BOFH

Senior member
Dec 31, 1999
456
0
0
The following is from the kernel help in 2.4. There are patches to add diff-serv to the 2.2 kernel. Its a rather interesting project and will do what you want. I'm not familiar with the other options. Most of this is available in 2.2 and it would not be a bad idea to test out with 2.2 since its been available long and the documentation should be better

----------------------------------------------------------------
x CONFIG_NET_SCHED: x
x x
x When the kernel has several packets to send out over a network x
x device, it has to decide which ones to send first, which ones to x
x delay, and which ones to drop. This is the job of the packet x
x scheduler, and several different algorithms for how to do this x
x "fairly" have been proposed. x
x x
x If you say N here, you will get the standard packet scheduler, which x
x is a FIFO (first come, first served). If you say Y here, you will be x
x able to choose from among several alternative algorithms which can x
x then be attached to different network devices. This is useful for x
x example if some of your network devices are real time devices that x
x need a certain minimum data flow rate, or if you need to limit the x
x maximum data flow rate for traffic which matches specified criteria. x
x This code is considered to be experimental. x
x x
x To administer these schedulers, you'll need the user-level utilities x
x from the package iproute2+tc at ftp://ftp.inr.ac.ru/ip-routing/ . x
x That package also contains some documentation; for more, check out x
x http://snafu.freedom.org/linux2.2/iproute-notes.html . x
x x
x This Quality of Service (QoS) support will enable you to use x
x Differentiated Services (diffserv) and Resource Reservation Protocol x
x (RSVP) on your Linux router if you also say Y to "QoS support", x
x "Packet classifier API" and to some classifiers below. Documentation x
x and software is at http://icawww1.epfl.ch/linux-diffserv/ . x
x x
x If you say Y here and to "/proc file system" below, you will be able x
x to read status information about packet schedulers from the file x
x /proc/net/psched. x
x x
x The available schedulers are listed in the following questions; you x
x can say Y to as many as you like. If unsure, say N now. x
x
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
So I wasn't losing it. <whew> :)

Heh. I think I'm gonna do some reading and play around with this stuff a bit and see what I can see. I'm gonna host a website for a friend and this just may do the trick, although I was just planning on installing another NIC in that box and using shaper to limit him that way, but this looks like more fun.

We'll see if it works well though. Typically software rate limiting stuff is pretty sucky.

Case NOT in point is rate limiting on Juniper equipment, which is done via ASIC. That stuff ROCKS! You can stomp an OC-12 down to like 9600kbps and it works flawlessly.