QoS with HTB: Multi-session problem
Dear All,
The following shows our environment and settings.
Right now I can restrict the download speed of PC1's http service around 200-512kbps and upload speed to 80-512kbps.
However, when PC2 or PC3 use a multi-session program like FlashGet for downloads, this will affect PC1's download
and upload rate.
It seems the download and upload speeds of PC1 become very unstable, and PC1's average bandwidth often falls below the bandwidth that was reserved for it.
Please review the settings and let me know if there is anything I can do to fix this problem.
Perhaps I am writing the settings wrong? Thanks for your help in advance.
Environment:
[PC1, PC2, PC3] <-->eth0[QoS with Bridage Mode]eth1<--> [NAT]<--> [Internet]
PC1 IP: 192.168.200.11/32
PC2 IP: 192.168.200.22/32
PC3 IP: 192.168.200.33/32
[QoS: iptables script]
iptables -A FORWARD -t mangle -j CONNMARK --restore-mark
### Download ###
iptables -A FORWARD -t mangle -m mark --mark 100 -i eth1 -o eth0 -j MARK --set-mark 10000 -m time --days Sun,Mon,Tue,Wed,Thu,Fri,Sat --timest
art 00:00 --timestop 23:59
### Upload ###
iptables -A FORWARD -t mangle -m mark --mark 100 -i eth0 -o eth1 -j MARK --set-mark 10001 -m time --days Sun,Mon,Tue,Wed,Thu,Fri,Sat --timest
art 00:00 --timestop 23:59
iptables -A FORWARD -t mangle -m mark ! --mark 0 -j ACCEPT
### set mark to PC1 ###
iptables -A FORWARD -p tcp --dport 80 -j MARK --set-mark 100 -m state --state ESTABLISHED,RELATED -s 192.168.200.11/32 -d 0.0.0.0/0 -t mang
le
iptables -A FORWARD -t mangle -j CONNMARK --save-mark
[QoS: tc script]
###### Download settings ######
#Del DL/UL device
tc qdisc del dev eth0 root
tc qdisc del dev eth1 root
#Create DL Device information
tc qdisc add dev eth0 root handle 1: htb default 7
tc class add dev eth0 parent 1: classid 1:1 htb rate 512kbit ceil 512kbit
#Default DL flow
tc class add dev eth0 parent 1:1 classid 1:7 htb rate 10kbit ceil 512kbit prio 7
tc qdisc add dev eth0 parent 1:7 handle 77: sfq perturb 10
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 200kbit ceil 512kbit prio 0
tc qdisc add dev eth0 parent 1:10 handle 10: pfifo
##### Upload settings ######
#Create UL Device information
tc qdisc add dev eth1 root handle 1000: htb default 8
tc class add dev eth1 parent 1000: classid 1000:1 htb rate 512kbit ceil 512kbit
#Default UL flow
tc class add dev eth1 parent 1000:1 classid 1000:8 htb rate 10kbit ceil 512kbit prio 7
tc qdisc add dev eth1 parent 1000:8 handle 88: sfq perturb 10
tc class add dev eth1 parent 1000:1 classid 1000:10 htb rate 80kbit ceil 512kbit prio 0
tc qdisc add dev eth1 parent 1000:10 handle 10000: pfifo
##### Filter settings ######
tc filter add dev eth0 parent 1:0 protocol ip prio 0 handle 10000 fw flowid 1:10
tc filter add dev eth1 parent 1000:0 protocol ip prio 0 handle 10001 fw flowid 1000:10
Best regards,
Dias
|