LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-01-2005, 08:21 PM   #1
diaskimo
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Rep: Reputation: 0
Smile 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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multi session cd. bruse Linux - Newbie 7 09-07-2005 09:06 AM
QoS with HTB diaskimo Linux - Networking 3 08-08-2005 12:57 AM
QoS wiht HTB for ADSL/Home ddaas Linux - Networking 1 07-31-2005 07:20 AM
HTB.. qos or what? bcc1981 Mandriva 0 04-16-2004 02:19 PM
HTB QOS. udp rtp rtcp. GT-GEO Linux - General 0 03-02-2002 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration