Dear Cameron,
I did have a longer look at wondershaper indeed. However, the script
provided assumes that the Linux machine is doing NAT, and therefore uses a
very simple global restriction on bandwidth on the outgoing eth device,
which is not usable for me.
I did have a look at HTB traffic shaping, but somehow I cannot make my
filters work as expected.
This is what I thought that would work:
../tc qdisc add dev eth0 root handle 1: htb default 12
../tc class add dev eth0 parent 1: classid 1:1 htb rate 100000kbps
../tc class add dev eth0 parent 1:1 classid 1:10 htb rate 100000kbps
../tc class add dev eth0 parent 1:1 classid 1:11 htb rate 500kbps
../tc class add dev eth0 parent 1:1 classid 1:12 htb rate 200kbps
# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip sport 4669
0xfff flowid 1:11
# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip dport 4669
0xfff flowid 1:12
./tc filter add dev eth0 protocol ip prio 2 u32 match ip src
192.168.1.1/32 flowid 1:11
./tc filter add dev eth0 protocol ip prio 2 u32 match ip dst
192.168.1.1/32 flowid 1:11
./tc filter add dev eth0 protocol ip prio 2 u32 match ip dst
192.168.1.11/32 flowid 1:1
./tc filter add dev eth0 protocol ip prio 2 u32 match ip src
192.168.1.11/32 flowid 1:1
# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip src
192.168.1/24 flowid 1:10
# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip dst
192.168.1/24 flowid 1:10
Basically, I thought I can *either* just restict traffic from/to my
gateway, *or* restrict the incoming and outgoing ports, *or* restrict all
traffic EXCEPT the one doing from/to my local machines.
The above script shows my various attempts...
can you help? anybody?
On 12 Feb 2004 21:46:45 +1300, Cameron Kerr <(E-Mail Removed)>
wrote:
> Benjamin Hirsch <(E-Mail Removed)> wrote:
>
>> Is there an easy way to restrict bandwidth to a certain IP (either
>> gateway, or ALL IP's other than my internal network)?
>
> WonderShaper
>
> I should think you would have found this if you had groups.google'd for
> it.
>
--
Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/