<div dir="ltr"><p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">
Hello,</p><p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">
<span style="font-size:14px">I have two apps communicating over UDP on the same host and I would like to send packets with varying delays (jitter) but no out of order packets. </span></p><p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">
<span style="font-size:14px">app1 ---&gt; loopback ----&gt; app2</span></p><p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">
<span style="font-size:14px">I have this rule for loopback interface:</span></p><p style="font-family:arial,sans-serif;font-size:12.727272033691406px;margin:0px 0px 1em;padding:0px;border:0px;vertical-align:baseline;clear:both">
<font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.804800033569336px">sudo tc qdisc add dev lo root handle 1: netem delay 10ms 100ms</span></font><br></p><p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">
<span style="font-size:14px">This seems to create the jitter successfully; however, there are out of order packets.. Basically I would like to receive the packets on the receiver (app2) side in the order that they are sent from the sender (app1), with just varying delay, i.e. with jitter.</span></p>
<p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">I tried some basic reorder commands.. when I use reorder 100%, it does the reorder but there is no jitter in this case. If I use reorder command with anything less than 100%, then there is out of order packets.</p>
<p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">It says <a href="http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#How_to_reorder_packets_based_on_jitter.3F" rel="nofollow" target="_blank" style="color:rgb(74,107,130);margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;text-decoration:none">here</a> that if execute the following command, the packets will stay in order:</p>
<p style="font-family:arial,sans-serif;font-size:12.727272033691406px;margin:0px 0px 1em;padding:0px;border:0px;vertical-align:baseline;clear:both"><font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.804800033569336px">sudo tc qdisc add dev lo parent 1:1 pfifo limit 1000</span></font><br>
</p><p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">But I still get out of order packets with the above command executed after the first command. Any help is much appreciated.</p>
<p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px">Thanks!</p>
<p style="clear:both;vertical-align:baseline;line-height:17.804800033569336px;font-size:14px;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;margin:0px 0px 1em;border:0px;padding:0px"><br></p>
</div>