Re: Fair queuing with htb

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

 



On Thu, 23 Dec 2010 02:26:21 +0100, GrÃgoire Leroy <gregoire.leroy@xxxxxxxxxxxxxx> wrote:
> Hello,
> 
> I try to make fair queuing with htb for the http protocol but my filters seem
> doesn't work.
> 
> The packets are marked by Squid (tcp_outgoing_mark, a feature of the latest 
> version of squid enables this).
> 
> I have verified in the iptables logs that the packet are really marked. Here 
> an example :
> 
> Dec 22 22:05:05 batman kernel: [1494086.818746] IN= OUT=eth0 SRC=172.17.0.8 
> DST=172.17.0.10 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=65025 DF PROTO=TCP 
> SPT=40407 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 MARK=0x1
> 
> It seems work inasmuch as we can see "MARK=0x1".
> 
> Below I paste my script. The relevant point is the filters : indeed, whatever
> the way I configure the class 1:20 and 1:10, it changes nothing.
> 
> Have I done a misconfiguration ?
> 
> I precise my server uses Debian Squeeze i386, and libnetfilter-conntrack3 is 
> installed.
> 
> #!/bin/bash
> INT="eth0"
> BAND="12000kbit"
> RATE="63kbit"
> 
> tc qdisc del dev $INT root
> tc qdisc add dev $INT root handle 1: htb default 30
> 
> tc class add dev $INT parent 1: classid 1:1 htb rate 100mbit burst 15k 
> tc class add dev $INT parent 1:1 classid 1:10 htb rate 63kbit ceil 1200kbit 
> burst 15k 
> tc class add dev $INT parent 1:1 classid 1:30 htb rate 88mbit burst 15k 
> tc class add dev $INT parent 1:1 classid 1:20 htb rate $RATE ceil $RATE burst
> 15k 
> 
> tc filter add dev $INT parent 1:0 protocol ip handle 0x1 fw flowid 1:10
> tc filter add dev $INT protocol ip handle 0x55 fw flowid 1:20
> 

Not sure about the handle 0x1. I usually only use the decimal value.

Try the following filters:

tc filter add dev $INT parent 1:0 protocol ip prio 1 handle 1 fw flowid 1:10
tc filter add dev $INT parent 1:0 protocol ip prio 2 handle 55 fw flowid 1:20


and check your filters and classes with the following commands:

# tc -s filter show dev eth0
# tc -s class show dev eth0

Julien
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux