I am new to NS3 programming and am having some difficulties ascertaining why the propagation delay is changing.
I ran the fifth.cc file from the tutorial with a 2ms propagation delay between the two nodes linked by a point to point channel. I see that the actually delay between packet dequeue and packet reception at the other node is 2.07 ms which is expected.
Now, I replaced the application in the fifth.cc with this piece of code.
uint16_t port = 8080;
UdpServerHelper server (port);
ApplicationContainer apps = server.Install (nodes.Get (0));
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
uint32_t MaxPacketSize = 372;
Time interPacketInterval = Seconds (0.1);
uint32_t maxPacketCount = 10000;
UdpClientHelper client (interfaces.GetAddress (0), port);
client.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
client.SetAttribute ("Interval", TimeValue (interPacketInterval));
client.SetAttribute ("PacketSize", UintegerValue (MaxPacketSize));
apps = client.Install (NodeContainer (nodes.Get (1)));
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
Now, when I see the trace file, I see that the delay is actually 2.64 ms between packet reception and sending. Can someone explain where this 0.64ms delay comes from ? Your help is appreciated. Thank you.