traffic control

Discuss Networking
Post Reply
Stryker
scripter
scripter
Posts: 98
Joined: Thu Jan 23, 2003 8:50 pm
Contact:

traffic control

Post by Stryker »

I've created a script which uses tc to limit traffic through our internet gateway, but its not working how I expected it to. Instead of limiting each person to a certain speed, the whole network is limited to the speed. So if bob is downloading at 128kbps, then joe can't download anything. bob should be able to go at 128kbps and joe should be able to download at 128kbps at the same time. This is what I've got:

Code: Select all

#!/bin/bash
DEV=eth1
SPEED=128kbit

          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 $SPEED allot 1500 prio 5 bounded isolated

          tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst $IP flowid 1:1
I've never really used tc before, and can't find too much info on the options. Any ideas for how to limit an individual rather than the network?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

I mentioned I used shoreline in the other thread and I just noticed in the shoreline documentation on their web site that it also has traffic shaping capabilities using tc and has some examples:

http://www.shoreline.net/
http://www.shorewall.net/traffic_shaping.htm

I personally haven't messed with traffic shaping with shorwall yet though.

Post Reply