<html><head> <title> Staf's HTML files </title> </head> <body>
<ol>
<h1><li><a name=setup>Setup</li></h1>
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.
<p>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.
<h1><li><a name=results>Results</li></h1>
<h3>testA1</h3>
<pre>10:0 100% TOT 10mbit, 200kbps
\-- 20:10 50% 1 100 kbps
\-- 20:20 25% 2 50 kbps
\-- 20:30 25% 3 50 kbps
</pre>
<u>Results</u>
<br>traffic in all classes : 50% 25% 25% = OK
<br>no traffic in 20:30 : 66% = OK
<h3>testA2</h3>
<pre>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 kbps
</pre>
<u>Results</u>
<br>traffic in all classes : 50% 25% 25% = OK
<br>no traffic in 20:10 : 50% 50% = OK
<br>no traffic in 30:20 : 50% 50% = OK
<h3>testA3</h3>
<pre>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 kbps
</pre>
<u>Results</u>
<br>traffic in all classes : 50% 25% 25% = OK
<br>no traffic in 20:10 : 50% 50% = OK WITH TOT SPEED = 100 kbps
<br>no traffic in 30:20 : 50% 50% = OK WITH TOT SPEED = 100 kbps
<h3>testB1</h3>
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.
<h3>testB2</h3>
<pre><u>RATE1 RATE2 RATE1/RATE_TOT </u>
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 NOK
</pre>
OK if theoratical = results.
<h3>testB2</h3>
<pre>RATE1 = RATE2 = 100
<u>WEIGTH1 WEIGTH2</u>
10 10 50.0
15 10 60.0
20 10 61.8
25 10 62.8
30 10 64.3
</pre>
Changing the weigth doesn't change a lot.
<h1><li><a name=tools>Tools</li></h1>
<a href="tests/"><b>Here</b></a> 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.
<p>
<b>tcpblast</b> : I found this little program in the contrib area of <a href="http://www.ee.ethz.ch/stats/mrtg/">MRTG</a> (Multi Router Traffic Grapher).
<pre># ./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 host
</pre>
I'm using this program to generate the traffic and not to measure the bandwidth.
<p><b>time_ms.exe</b> :
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.
<p><b>monitor.pl</b> :
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.
<p>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.
<p>Output of monitor.pl :
<pre>
<font color=red>###############</font><font color=green>#######</font><font color=blue>######</font> 62 KB/s 31 KB/s 26 KB/s T 120 KB/s 51.98% 26.03% 51.21% 21.85%
<font color=red>############</font><font color=green>##########</font><font color=blue>######</font> 50 KB/s 38 KB/s 26 KB/s T 115 KB/s 43.32% 33.42% 50.24% 23.27%
<font color=red>############</font><font color=green>#########</font><font color=blue>#######</font> 50 KB/s 39 KB/s 29 KB/s T 120 KB/s 42.05% 33.03% 49.31% 24.38%
<font color=red>############</font><font color=green>#########</font><font color=blue>#######</font> SP1 SP2 SP3 T SP3 PR1 PR2 PR3 PR4
</pre>
<u>Explanation</u> :
<br>SP1 : Bandwidth of first chain
<br>SP2 : Bandwidth of second chain
<br>SP3 : Bandwidth of thirth chain
<br>SP4 : Total Bandwidth = SP1 + SP2 + SP3
<br>PR1 : SP1 / SP4
<br>PR2 : SP2 / SP4
<br>PR3 : total SP1 / total SP4
<br>PR4 : total SP2 / total SP4
<p><b>bbchains*</b> : these are the scripts that set up the firewall chains and the QOS commands.
</ol>
</body> </html>