« August 2010 »
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

This is hot

Upgrade VIA Epia-Board to current 2.6.28.7
600 times viewed
23.02.2009 18:41
t3blog Update to version 0.8.1 (Security, Bugfixes)
156 times viewed
03.02.2010 14:33
LaTeX Font Selection
83 times viewed
29.01.2010 17:17
linux.bigga.de now with RSS Feed
81 times viewed
25.11.2009 09:36

[blog...]

Currently the posts are filtered by: traffic shaping
Reset this filter to see all posts.

10.06.2009
20:57

Enable Traffic Shaping on Fritz!Box 7170

I'm using a Fritz!Box Fon WLAN 7170 as Hotspot in my caf'e. The DSL speed is 6000kBit/s and I only want people use 1MBit/s maximum. The Fritz!Box offers traffic shaping only to prioritize VOIP over common traffic.

 

If you have linux box, you may use the tc command to do the following traffic shaping using class based queues (cbq):

 

 

#!/bin/sh

DEV=eth0
DEV=tiwlan0
TC=tc
RATE=768kbit

# erase all old
$TC qdisc del dev $DEV root

# set new
modprobe cls_u32

$TC qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
$TC class add dev $DEV parent 1: classid 1:1 cbq rate $RATE \
             allot 1500 prio 5 bounded isolated

$TC filter add dev $DEV parent 1: protocol ip prio 16 u32 \
         match ip dst 0.0.0.0/0 flowid 1:1

Ok, this is a very hard limit of 768kBits/s for the whole WLAN-interface of the Fritz!Box. Of course you may add lter rules for specific hosts, ports, netmasks or whatever. See the lartc-guide for details.

 

So far theory. But how to get this stuff working on the Fritz!Box? I found the Freetz-project which modifies the original firmware. You may add kernel modules, some applications and a new webinterface.

  1. checkout freetz-stable-1.0 from SVN (freetz-stable-1.1 didn't work with my box - it rebootet every 10 seconds)
  2. do a config and build (make menuconfig; make) and install the image in images/
  3. add the modules sch_cbq,ko and cli_u32.ko to kernel/Config.in
  4. apply my patch add-iproute2-freetz-1.0.patch
  5. make menuconfig; make and install the new image

This is a very rough howto. Don't hesitate to ask you questions as comment.

back

[ 22.07.2010 ]