Rick Goh Siow Mong wrote: > > Is the above possible? If so, how? Has anyone implementated this before? Yes, it've dont it as a test and it wordks great. I'v attached my results as a HTML-file. > > Example; > To set > > HTTP - 30%, prio 3 (1 being highest priority) > FTP - 20%, prio 7 > POP/SMTP - 30%, prio 4 > Default - 20%, prio 8 > > Also, a question being asked earlier by Geert of which i'm interested to > find out. > What is the effect of setting priority? What is the difference if i set prio > 3 and prio 4? Does it mean: > 1. All prio 3 traffic sent out first, then followed by prio 4 traffic. yes > 2. Amount of traffic sent out being weighted according to priorities. > I.e. more prio 3 packets sent out than prio 4 in the same timeline. no, use the parameter weitht for that ;-) StafTitle: Staf's HTML files
- Setup I'm going to try to monitor the outgoing traffic. For this, I use firewall chains. Each chain contains the traffic I wanna control and i wanna monitor. By reading the byte counters of these chains and dividing them by the elapsed times, I have the bandwidth of the data thar flows through that chain.
- Results
- Tools Here you can find my test-directory. It contains all the programs and scripts that I'm using to test QOS. To help you, I will explain some of the tools and scripts.
I've also some tools to generate the traffic that fits in a chain and to monitor the bandwidth. I use the destination port to divide the traffic.
testA1
10:0 100% TOT 10mbit, 200kbps \-- 20:10 50% 1 100 kbps \-- 20:20 25% 2 50 kbps \-- 20:30 25% 3 50 kbpsResults
traffic in all classes : 50% 25% 25% = OK
no traffic in 20:30 : 66% = OK
testA2
10:0 100% TOT 10mbit, 200kbps \-- 20:10 50% 1 100 kbps \-- 20:20 50% 1 100 kbps \-- 30:10 25% 2 50 kbps \-- 30:20 25% 3 50 kbpsResults
traffic in all classes : 50% 25% 25% = OK
no traffic in 20:10 : 50% 50% = OK
no traffic in 30:20 : 50% 50% = OK
testA3
10:0 100% TOT 10mbit, 200kbps \-- 20:10 50% 1 100 kbps \-- 20:20 50% 1 100 kbps BOUNDED \-- 30:10 25% 2 50 kbps \-- 30:20 25% 3 50 kbpsResults
traffic in all classes : 50% 25% 25% = OK
no traffic in 20:10 : 50% 50% = OK WITH TOT SPEED = 100 kbps
no traffic in 30:20 : 50% 50% = OK WITH TOT SPEED = 100 kbps
testB1
I'v done some tests with the rate and the weigth parameter. It seems that when you provide no weigth paramter, you get the same results as when you should provide a weigth paramtere proporitonal to the rate.testB2
RATE1 RATE2 RATE1/RATE_TOT 20 20 50.0 50.0 OK (first number : theoretical, second : restults from tests) 20 30 40.0 40.0 OK 20 40 33.3 33.3 OK 20 50 28.6 28.6 OK 20 60 25.0 25.0 OK 20 70 22.2 24.4 NOK 20 80 20.0 23.2 NOK 20 90 18.2 22.9 NOK 20 100 16.7 22.6 NOK 20 110 15.4 21.7 NOK 20 120 14.3 20.1 NOK 20 130 13.3 15.2 NOK 20 140 12.5 13.6 NOK 20 150 11.8 13.4 NOKOK if theoratical = results.
testB2
RATE1 = RATE2 = 100 WEIGTH1 WEIGTH2 10 10 50.0 15 10 60.0 20 10 61.8 25 10 62.8 30 10 64.3Changing the weigth doesn't change a lot.
tcpblast : I found this little program in the contrib area of MRTG (Multi Router Traffic Grapher).
# ./tcpblast --help usage: ./tcpblast [options] destination nblocks tcpblast/udpblast is a simple tool for probing network and estimating its throughoutput. It sends nblocks of 1024 B blocks of data to specified destination hostI'm using this program to generate the traffic and not to measure the bandwidth.
time_ms.exe : This is a little program that gives the time in seconds and microseconds. I've lost the source, but when i find it back, I will put it also here. I'm using it in the following perl-script.
monitor.pl : This is a self-written perl script to monitor the bandwidth. The idea behind it is simple. Ipchains has a byte counter for each chains. When you divide the byte counter by the elapsed time, you have the bandwidth for that particulary chain.
For a better explanation, read the source. It's a script. It's my first one, so don't shoot me if I made a mistake.
Output of monitor.pl :
############################ 62 KB/s 31 KB/s 26 KB/s T 120 KB/s 51.98% 26.03% 51.21% 21.85% ############################ 50 KB/s 38 KB/s 26 KB/s T 115 KB/s 43.32% 33.42% 50.24% 23.27% ############################ 50 KB/s 39 KB/s 29 KB/s T 120 KB/s 42.05% 33.03% 49.31% 24.38% ############################ SP1 SP2 SP3 T SP3 PR1 PR2 PR3 PR4Explanation :
SP1 : Bandwidth of first chain
SP2 : Bandwidth of second chain
SP3 : Bandwidth of thirth chain
SP4 : Total Bandwidth = SP1 + SP2 + SP3
PR1 : SP1 / SP4
PR2 : SP2 / SP4
PR3 : total SP1 / total SP4
PR4 : total SP2 / total SP4
bbchains* : these are the scripts that set up the firewall chains and the QOS commands.