How to compute propagation delay using ns-3??

2,469 views
Skip to first unread message

Rishu Chhabra

unread,
Apr 30, 2013, 5:57:16 AM4/30/13
to ns-3-...@googlegroups.com


Hi All.

I have generated a model using SUMO and have mobility.tcl, activity.tcl and config.tcl file and i can see the nodes moving in netanim.

Now i don't know how i can use the files to calculate propagation delay and other network metrics???


Jain Zachariah

unread,
Jun 19, 2013, 7:18:14 AM6/19/13
to ns-3-...@googlegroups.com

Hi rishu,

Did you get the answer for this question?? I am also in the same stage, but dont know how to proceed. Using ns2-mobility-trace.cc, but it just gives the positions of the nodes. How to make the moving nodes communicate??

Konstantinos

unread,
Jun 19, 2013, 8:18:46 AM6/19/13
to ns-3-...@googlegroups.com
In NS-3 the propagation delay (at least for wifi) is either constant or random (http://www.nsnam.org/doxygen/classns3_1_1_propagation_delay_model.html)

If you mean the end-to-end delay between two nodes, you have to create a scenario to generate the traffic and measure the metrics you need.
there are examples in /examples/wireless folder on how to set up such a scenario and you can use Ns2MobilityHelper in order to make your nodes move according to the SUMO files (but I guess that you know how to do that since you said you have visualized them in NetAnim).

Jain Zachariah

unread,
Jun 20, 2013, 3:15:53 AM6/20/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

I m completely new to ns3, so pardon me if I have coded something stupid. As per your suggestion, I have edited wifi-simple-adhoc.cc in examples/wireless and included the ns2mobilityhelper part in it. Kindly have a look at my code which I have attached to this post and tell me whether it is the right way to use the mobility.tcl file to communicate two moving nodes as per the sumo files. I am not getting the animation.xml file generated in the netanim folder, so I cant really see what is happening.

I am getting the output :
Testing 1 packets sent with receiver rss -80
Received one packet!

If I am wrong, please guide me on how to go about this issue. Can you provide me with a simple sample code, it would be very helpful.
Thanks.
wifi-simple-adhoc-ns2mobilitytrace.cc

Konstantinos

unread,
Jun 20, 2013, 5:51:35 AM6/20/13
to ns-3-...@googlegroups.com
The scenario that you are trying to test has only 2 nodes and relies on the direct communication between them.
If your SUMO file has more than 2 nodes and the positions of the first two nodes do not let them communicate directly, you should update your program to add ALL the nodes that you have in your mobility.tcl file and also add a routing protocol (AODV, OLSR, DSR)

Jain Zachariah

unread,
Jun 24, 2013, 4:29:01 AM6/24/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

I have made the changes you suggested, added OLSR routing protocol and changed the number of nodes to 4 as in my mobility.tcl file.
I am getting the same output as earlier (I have given it in the above post), but I am not able to visualize it in netanim. The xml file is not getting generated.

But when I run
./waf --run "dumbbell-animation --nLeftLeaf=5 --nRightLeaf=5 --animFile=dumbbell.xml"

the corresponding dumbbell.xml is generated in the ns-3.17 folder where waf is present.

I am trying to run my program from the scratch folder, but then the xml file is not generated. Can u please tell me how to solve this problem??
I have attached the edited code as per your suggestions and the tcl file with this post. Kindly have a look at it and tell me if I am wrong somewhere.

Thanks.
wifi-simple-adhoc.cc
mobility.tcl

Konstantinos

unread,
Jun 24, 2013, 6:30:29 AM6/24/13
to ns-3-...@googlegroups.com
Hi,

You are missing the Simulator::Stop() method. That means that your simulator will keep running to infinity.
The animation.xml file is created correctly. There is no problem with that.

Regards
Message has been deleted

Jain Zachariah

unread,
Jun 26, 2013, 4:13:15 AM6/26/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

I added the method Simulation::Stop() to the code.
I re-installed NS3 and now the anim.xml file is getting generated, but the program does not terminate after that and files anim.xml-0, anim.xml-1 etc are generated along with anim.xml until the running program is interrupted by Ctrl+c. Meanwhile, when I load the anim.xml in NetAnim, I am getting the animation. Can u please tell me where I am wrong?? I have attached the code with this post.

Thanks.
myadhoc.cc
mobility.tcl

Konstantinos

unread,
Jun 26, 2013, 4:47:25 AM6/26/13
to ns-3-...@googlegroups.com
That's because you have put Simulator::Stop(<stop>) AFTER the RUN()
It should be before.

Please read the tutorial. It explains that.

Jain Zachariah

unread,
Jul 1, 2013, 2:18:48 AM7/1/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thanks a lot for your help.

In the scenario which I have created, the nodes move as per the mobility.tcl file created through SUMO. We give the routes to be followed by the nodes as an input to SUMO. Hence the path followed by the nodes in NS3 is fixed as per the trace file, right..???

Suppose there happens one natural calamity which destroys one of the pre-defined route through which one node travels or say a road ( part of a route to be followed by any node ) is highly congested. In that case, is there any way in which I can change this pre-defined route of the node dynamically so that the node can take up an alternate route to the destination, assuming that alternate routes are available??

Thanks.

Konstantinos

unread,
Jul 1, 2013, 5:41:45 AM7/1/13
to ns-3-...@googlegroups.com
what you want to do is not feasible only with the use of NS-3. 
You have to be able to communicate with SUMO in order to change the route of a vehicle.

There are platforms that "connect" NS-3 with SUMO. You can look at VSimRTI (http://www.dcaiti.tu-berlin.de/research/simulation/), iTETRIS (http://www.ict-itetris.eu/) and OVNIS (http://ovnis.gforge.uni.lu/).

Regards,
Konstantinos

Jain Zachariah

unread,
Jul 4, 2013, 7:00:41 AM7/4/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

I looked into all the three platforms. OVNIS is outdated, it wont work anymore with the new versions of NS3 and SUMO.
iTETRIS is not open source?? I couldn't find any download link in the website.

I downloaded and started using VSimRTI. I went through the user manual. I am trying to solve the routing problem I mentioned in the previous post. But, couldn't get any help from the manual, the entire "creating a scenario" is covered in 1 page in the manual. I downloaded open street map and also created .net.xml and .db database file in VSimRTI. Now, for creating routes I am using SUMO procedure again ( creating .rou.xml file manually ). In the VSimRTI user manual, I saw that we can use osmconvert for creating traffic but no other info or examples for doing it. I tried from the command line for osmconvert options, and tried with node ids for auto generating routes, but failed. Also googled for osmconvert help, but got nothing. Can you provide me with any useful examples or material on the usage of VSimRTI if available??

Thanks.

Konstantinos

unread,
Jul 4, 2013, 7:23:27 AM7/4/13
to ns-3-...@googlegroups.com
For OVNIS: I haven't used it, however I guess that it shouldn't be hard to update it to current ns3/SUMO versions. 

iTETRIS is an open platform. There is no direct download page, you have to request it. But this was also based on a previous version of NS-3/SUMO.

For VSimRTI and specific to the application you want to create (re-route vehicles) I have developed and evaluated such an application. See here (http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6314234). I haven't used NS-3 with VSimRTI yet, I used the default JiST/SWANS because the evaluation was on the application and not on the underlying network.

The procedure you have to follow with VSimRTI and SUMO is the following:
1) Find the road network you want from OpenStreetMaps.org and download the OSM file.
2) Convert this OSM file in a .db file using the osmconvert
3) Convert the OSM file in SUMO files using osmconvert
4) Create the SUMO route file and re-import them in the db with osmconvert
For steps 1-3 you can use the files already in the example scenarios (Tiergarten or Schanebeck). Just define your route file according to SUMO principles with one or multiple possible routes and re-import them in the .db file.

Then you should be able to run the scenarios.

Since this mailing list is for NS-3, we should keep this discussion only on this. There is another mailing list for VSimRTI.

Regards,
Konstantinos 

Rishu Chhabra

unread,
Dec 7, 2013, 12:02:32 AM12/7/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

yes i need to compute end to end delay.

However, i tried to get the communication between the nodes where the position was implied by the SUMO generated mobility.tcl file...but when i try to open the .pcap files in wireshark there is no packet transmission taking place.

Actually i want to use AODV routing protocol and not sure how i can use CBR on/off application or something else for the nodes to broadcast.

I shall be really thankful if you can help me with this.

Urvik Upadhyay

unread,
Mar 18, 2014, 6:18:03 PM3/18/14
to ns-3-...@googlegroups.com
Hi Rishu,
Did you get your answer? I'm stuck at the same point.

loon yun

unread,
Mar 20, 2014, 11:03:15 PM3/20/14
to ns-3-...@googlegroups.com
Hi, do you know the steps of generating sumo with vsimrti for vehicle to vehicle communication? Pls help! Thanks


Pradyumna Kumar Das

unread,
Apr 9, 2014, 10:59:15 AM4/9/14
to ns-3-...@googlegroups.com
i generate the activity,mobility and config file from sumo trace file...after that how to run that files in ns2.
how to merge these three file....plz tell me.

Rishu Chhabra

unread,
Apr 13, 2014, 8:41:03 AM4/13/14
to ns-3-...@googlegroups.com
No ...will be really gareteful if u reply once u get the answer..


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/SiapC1kMYm4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Apr 13, 2014, 1:19:13 PM4/13/14
to ns-3-...@googlegroups.com
@Rishu: It's been almost a year and you still haven't managed to calculate the delay? There are so many discussions in this list on how to do such analysis using FlowMonitor or custom tracing. If you are interested only on broadcast, then you do not need routing and you can't use FlowMonitor.

@Urvik: What is your problem? Are you trying to load ns-2 mobility files and it does not work? Have you tried the example scenario for Ns2MobilityHelper?
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.

Konstantinos

unread,
Apr 13, 2014, 1:23:05 PM4/13/14
to ns-3-...@googlegroups.com
You only need the mobility.tcl that holds the movements of the nodes.
The other files are used only by NS-2.

Rishu Chhabra

unread,
May 1, 2014, 6:00:58 AM5/1/14
to ns-3-...@googlegroups.com
Yes, I am stuck on the same thing since long unfortunately, but can you please tell me that if flow monitor cannot be used for broadcasting then do i need to send message between each source and all the sinks using custom tracing ???


To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Konstantinos

unread,
May 1, 2014, 6:16:14 AM5/1/14
to ns-3-...@googlegroups.com
The custom tracing is needed only for the calculation of delay. See how UdpClient/Server uses SeqTsHeader to do that or you can use the statistics module.
You do not need it for sending broadcast packets. For that only thing you need to do is set the destination address to be the broadcast.
Reply all
Reply to author
Forward
0 new messages