Linux Networking/Traffic Shaper - Changing allowed bandwidth

Traffic Shaper - Changing allowed bandwidth
The traffic shaper is a driver that creates new interface devices, those devices are traffic-limited in a user-defined way, they rely on physical network devices for actual transmission and can be used as outgoing routed for network traffic.

The shaper was introduced in Linux-2.1.15 and was backported to Linux-2.0.36 (it appeared in 2.0.36-pre-patch-2 distributed by Alan Cox, the author of the shaper device and maintainer of Linux-2.0).

The traffic shaper can only be compiled as a module and is configured by the shapecfg program with commands like the following:

shapecfg attach shaper0 eth1 shapecfg speed shaper0 64000

The shaper device can only control the bandwidth of outgoing traffic, as packets are transmitted via the shaper only according to the routing tables; therefore, a ``route by source address'' functionality could help in limiting the overall bandwidth of specific hosts using a Linux router.

Linux-2.2 already has support for such routing, if you need it for Linux-2.0 please check the patch by Mike McLagan, at ftp.invlogic.com. Refer to Documentationnetworking/shaper.txt for further information about the shaper. If you want to try out a (tentative) shaping for incoming packets, try out rshaper-1.01 (or newer), from ftp.systemy.it.