Solved

HTB Advanced Config

Posted on 2003-11-07
5
473 Views
Last Modified: 2008-01-09
I have a gentoo distribution kernel 2.4.22 , with latest patch to htb and newest tc executable.
I have a 256kbps bandwidth and i wish to limit with htb clients like 32kbps or 64kbps.
I did that but the problem is that the web pages load very solw. The loading has a big delay.
I i download a file it downloads exactly at the limited speed but the web pages load with a high delay. How do i prioritze web pages before all else in each class of clients ?

Thanks
0
Comment
Question by:-Mihai-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Author Comment

by:-Mihai-
ID: 9701326
Also can i priorize certain traffic on certain ports ?
0
 
LVL 1

Accepted Solution

by:
Smudo earned 500 total points
ID: 9701937
Sure, you can priorize traffic on certain ports. You first must mark the packets with iptables:

iptables -t mangle -A TRAFFIC-SHAPING -p tcp --dport 80 -j MARK --set-mark 10

That will queue all packets with dport 80 in class 10. (which you can give the highest priority if necessary)

Here the whole example:

iptables -t mangle -A TRAFFIC-SHAPING -p tcp --dport 80 -j MARK --set-mark 10
iptables -t mangle -A TRAFFIC-SHAPING -s CLIENT1 -j MARK --set-mark 11
iptables -t mangle -A TRAFFIC-SHAPING -s CLIENT2 -j MARK --set-mark 12

tc qdisc add dev eth0 root handle 1: htb default 13
tc class add dev eth0 parent 1: classid 1:1 htb rate 256bit ceil 256kbit

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 10kbit ceil 20kbit prio 0 (don't think that HTTP requests need more :)
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 32kbit ceil 64kbit prio 1 (clients with 32/64kbit permission)
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 64kbit ceil 128kbit prio 2 (clients with 64/128bit permission)
tc class add dev eth0 parent 1:1 classid 1:13 htb rate 50kbit ceil 256kbit prio 3 (DEFAULT class)

tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 10 fw flowid 1:10
tc filter add dev eth0 parent 1:0 prio 2 protocol ip handle 11 fw flowid 1:11
tc filter add dev eth0 parent 1:0 prio 3 protocol ip handle 12 fw flowid 1:12
tc filter add dev eth0 parent 1:0 prio 4 protocol ip handle 13 fw flowid 1:13

0
 
LVL 3

Expert Comment

by:snedelchev
ID: 13745083
http is burst traffic
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 10kbit ceil 20kbit  burst 10kbit prio 0
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question