Linux 2.6 HTB does only work with existing connections

From: Hua Zhong <hidden>
Date: 2007-02-22 01:44:42

Hi all,

I tried to use HTB on a 2.6.12 based kernel. It seems that if I issue the tc
commands, existing connections adjust bandwidth immediately, but any new
connections won't be filtered correctly.

The tc version is 3.17.

The commands are very simple (only eth1 is active):

    tc qdisc del dev eth1 root
    tc qdisc add dev eth1 root handle 1: htb default 20
    tc class add dev eth1 parent 1: classid 1:20 htb rate 4000kbit

No filters, just limit everything to under 4Mbit.

Then run ttcp to a remote machine, ifconfig shows eth1 is not limited.

However, while ttcp is running, issue the above three commands again, the
bandwidth is then limited correctly.

Any ideas?

The following are the show commands:

# tc qdisc show dev eth1
qdisc htb 1: r2q 10 default 20 direct_packets_stat 11
# tc class show dev eth1
class htb 1:20 root prio 0 rate 4000Kbit ceil 4000Kbit burst 2099b cburst
2099b

Please cc me.

Hua
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help