I have three machines setup to test an IPsec software package and want
to add bandwidth limitations and delay between two machines. I am using
Fedora Core 14.<br>machine 1 -------> router ----------> machine2 <br><br>
First off machine 1 communicates with machine 2, and vice versa. I want
the traffic to be shaped to a certain bandwidth on the two end machines
and delay to be added by the router machine.<br>The problem I am running
into is the bandwidth script running on machine 1 and machine 3 are not
working together with the delay script running on the router machine.
So for example when I set the bandwidth on the two end machines to 9
kBps / 24 kBps (upload/download) the RTT is increased by 170 ms and this work <b>correctly</b>, but if I
add a delay of 500ms between the two machines, the RTT stays the same or sometimes goes lower.<br>
I figured the RTT = 500 ms (delay) + 170 ms (bandwidth), but I can't get
that result out of my set up. Any ideas? Here are my command scripts.<br><br><b>machine 1 and machine 2 commands/bash script</b><br>IF=eth0 # Interface <br>DNLD=9kbps # DOWNLOAD Limit<br>UPLD=24kbps # UPLOAD Limit <br>
IP=192.168.3.10 # Host IP<br><br>U32="tc filter add dev $IF protocol ip parent 1:0 prio 1 u32"<br>
<br> tc qdisc add dev $IF root handle 1: htb default 20<br> tc class add dev $IF parent 1: classid 1:1 htb rate 9kbps ceil 24kbps<br> tc class add dev $IF parent 1:1 classid 1:10 htb rate $DNLD<br> tc class add dev $IF parent 1:1 classid 1:20 htb rate $UPLD<br>
tc qdisc add dev $IF parent 1:10 handle 10: tbf rate $DNLD latency 500ms burst 10000<br> tc qdisc add dev $IF parent 1:20 handle 20: tbf rate $UPLD latency 500ms burst 10000<br> $U32 match ip dst $IP/32 flowid 1:10<br>
$U32 match ip src $IP/32 flowid 1:20<br><br><b>router machine commands ( if I want to add 500ms RTT delay)</b><br>tc qdisc add dev eth0 root netem delay 250ms<br>tc qdisc add dev eth1 root netem delay 250ms<br><br>Instead of using " tc qdisc add dev $IF parent 1:20 handle 20: tbf rate $UPLD latency 500ms burst 10000 " ... I have also used<br>
" tc qdisc add dev $IF parent 1:20 handle 20: sfq quantum 1500 perturb 10 limit 64 "<br>for the both backbone/child nodes of the tree, with some success.<br><br>Any help, tips, or suggestions would be greatly appreciated.<br>
Thanks<br><br>-- <br>Jacob Edwards<br>
Graduate Research Assistant <br>MSU Electrical and Computer Engineering Department<br>Simrall 330<br>
<a href="mailto:jme147@msstate.edu" target="_blank">jme147@msstate.edu</a><br><a href="mailto:jacob.matthew.edwards@gmail.com" target="_blank">jacob.matthew.edwards@gmail.com</a><br>