Starting a Csma channel at 0.0s

27 views
Skip to first unread message

CL

unread,
Mar 27, 2017, 12:16:11 PM3/27/17
to ns-3-users
Hello,

While working on my project, I encountered a delay which I am a bit curious about and cannot find a good explanation. I modified second.cc to have the architecture shown below., a pure csma channel with 4 nodes and client and server on either end.

//
//      
//      n0  n1   n2   n3  
//      |    |    |    |
//      ================
//        LAN 10.1.2.0

I set the client and server to both start at 0.0s

  serverApps.Start (Seconds (0.0));
  serverApps
.Stop (Seconds (10.0));
  clientApps
.Start (Seconds (0.0));
  clientApps
.Stop (Seconds (10.0));

However when I have a look at the trace files, I see that the first ARP packet is sent at 0.006s and the reply at 0.006024s Shouldn't it be sent at 0.0s? And then the reply should be delayed appropriately and be received at 0.000024s? The closest related explanation I could find was here https://groups.google.com/forum/#!msg/ns-3-users/DjHN3BwO8hI/UeNIiOACFfQJ by Tom,


Not really... 8ms is the time needed to perform the ARP resolution :)
The port are created right away, but the first packet will trigger an ARP resolution (two indeed, one for the client, one for the server).

If the interval is too short, the packets will be queued until the ARP is finished. And they could be discarded too (the ARP queue is limited).
Never underestimate the ARP...

Cheers,

T.


Is he referring to the initial delay 0.006s or the difference between the ARP request and reply 0.000024s?

Thanks
second.cc

Tommaso Pecorella

unread,
Mar 27, 2017, 4:30:05 PM3/27/17
to ns-3-users
Hi,

in order to avoid infinite ARP collisions from application with the same start time, we implemented an ARP jitter on the requests and on the replies.
That's the delays you're seeing.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages