shaper.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Traffic Shaper For Linux
  2. This is the current BETA release of the traffic shaper for Linux. It works
  3. within the following limits:
  4. o Minimum shaping speed is currently about 9600 baud (it can only
  5. shape down to 1 byte per clock tick)
  6. o Maximum is about 256K, it will go above this but get a bit blocky.
  7. o If you ifconfig the master device that a shaper is attached to down
  8. then your machine will follow.
  9. o The shaper must be a module.
  10. Setup:
  11. A shaper device is configured using the shapeconfig program.
  12. Typically you will do something like this
  13. shapecfg attach shaper0 eth1
  14. shapecfg speed shaper0 64000
  15. ifconfig shaper0 myhost netmask 255.255.255.240 broadcast 1.2.3.4.255 up
  16. route add -net some.network netmask a.b.c.d dev shaper0
  17. The shaper should have the same IP address as the device it is attached to
  18. for normal use.
  19. Gotchas:
  20. The shaper shapes transmitted traffic. It's rather impossible to
  21. shape received traffic except at the end (or a router) transmitting it.
  22. Gated/routed/rwhod/mrouted all see the shaper as an additional device
  23. and will treat it as such unless patched. Note that for mrouted you can run
  24. mrouted tunnels via a traffic shaper to control bandwidth usage.
  25. The shaper is device/route based. This makes it very easy to use
  26. with any setup BUT less flexible. You may need to use iproute2 to set up
  27. multiple route tables to get the flexibility.
  28. There is no "borrowing" or "sharing" scheme. This is a simple
  29. traffic limiter. We implement Van Jacobson and Sally Floyd's CBQ
  30. architecture into Linux 2.2. This is the preferred solution. Shaper is
  31. for simple or back compatible setups.
  32. Alan