Propagation Varies when using Udp sockets and UdpClient/Server app.

44 views
Skip to first unread message

Ceeman Brightson.V

unread,
Jun 7, 2013, 1:44:40 PM6/7/13
to ns-3-...@googlegroups.com
Hello,
  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.

Konstantinos

unread,
Jun 7, 2013, 2:51:21 PM6/7/13
to ns-3-...@googlegroups.com
It may be the size of the transmission delay = Packet_Size/Data_Rate

Ceeman Brightson.V

unread,
Jun 7, 2013, 4:04:45 PM6/7/13
to ns-3-...@googlegroups.com
Yeah, that's right. Thank you for your time Konstantinos. Really appreciated.
Reply all
Reply to author
Forward
0 new messages