Trivial newbie HTB problem

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm newbie to HTB and need to solve really simple problem:

I have an single IP internet connection @ 1024kbit attached to a linux 
box (2.4.21), doing NAT for clients at internal 192.168.1.x network.

I need to setup a simple traffic shaping, for a single PC 192.168.1.2
I wish to guarantee minimum rate of 768kbit, for others 32kbit.
Maximum rates must be always full speed (1024kbit) !

Can you please tell me what's wrong with that (wlan0 is the internal
iface),
because this does not work (192.168.1.2 does not get the guaranteed
bandwidth,
but only a 1/n of bandwidth for case that another n stations saturate
the line).

Thank you. My script follows.

tc qdisc del dev wlan0 root

#by default, all clients go through slow :30 class
tc qdisc add dev wlan0 root handle 1: htb default 30

tc class add dev wlan0 parent 1: classid 1:1 htb rate 1024kbit ceil
1024kbit

# i wish :10 class 768-1024, :30 class 32-1024
tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 768kbit ceil
1024kbit prio 0
tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 32kbit ceil
1024kbit prio 2

tc qdisc add dev wlan0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev wlan0 parent 1:30 handle 30: sfq perturb 10

# client 192.168.1.2 is privileged, should be in :10 class
tc filter add dev wlan0 protocol ip parent 1:0 prio 0 u32 match ip dst
192.168.1.2 flowid 1:10

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux