Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to throttle traffic in my network using tc. What I found if 'wlan0' is from where my internet comes in to my Linux machine and 'eth0' to my internal network.

I've so far found solution for limiting traffic for controlling my connection with internal network. Like, applying rule in 'eth0' for controlling internal network.(using this article http://atmail.com/kb/2009/throttling-bandwidth/)

But what I need to do is to control over 'internal network going to wlan0(internet)' so that Server (my computer) can communicate with client in lan speed and clients can get the bandwidth they need. How to accomplish this using tc ??

I'v tried this.


IF=eth0             # Interface

DNLD=1mbit          # DOWNLOAD Limit

UPLD=1mbit          # UPLOAD Limit

IP=     # Host IP
U32="$TC filter add dev $IF protocol ip parent 1:0 prio 1 u32"

$TC qdisc add dev $IF root handle 1: htb default 30
$TC class add dev $IF parent 1: classid 1:1 htb rate $DNLD
$TC class add dev $IF parent 1: classid 1:2 htb rate $UPLD
$U32 match ip dst $IP/32 flowid 1:1
$U32 match ip src $IP/32 flowid 1:2

I am trying to implement tc in cyber cafe application from server to throttle bandwidth of client.

share|improve this question
I think easiest way for you is to put a tc box inbetween the wlan0 and internet segments, then apply you rules to those interfaces (both interfaces). Then route/switch the traffic you want to limit through that box. –  Petter H Aug 26 '13 at 14:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.