Help regarding Implementation of V2I In NS-3.

498 views
Skip to first unread message

Nikhil Reddy

unread,
Jun 14, 2016, 6:34:47 AM6/14/16
to ns-3-users
With the help of SUMO, I've created roads and vehicles. After integrating SUMO to NS-3, I've also implemented the V2V scenario using 802.11 WiFi Helper. Now I would like to implement the V2I scenario and and I am facing some problems regarding implementation. Please take some time answer my questions below.

1. Is it possible to create V2I scenario using NS-3 in correspondence with SUMO?

2. Can we build some static nodes within NS-3 and the co-join them with our previous code having V2V scenario? And How?

3. Is it possible to log all transmitted and received nodes data?

Please help me to sort out these questions.

Konstantinos

unread,
Jun 14, 2016, 7:32:01 AM6/14/16
to ns-3-users
Hi,

How did you integrate SUMO with NS3? Is is online (both simulators running in parallel) or offline (through trace file)?

1. Is it possible to create V2I scenario using NS-3 in correspondence with SUMO?

Yes.

2. Can we build some static nodes within NS-3 and the co-join them with our previous code having V2V scenario? And How?

Yes. I guess you know how to create nodes in ns3. Setting them with a static nobility model is in the tutorial. Since they are in the same scenario, talking on the same channel they will communicate.

3. Is it possible to log all transmitted and received nodes data?

Yes. The same NetDevice are installed on either nodes (static or mobile) so tracing is the same. ASCII, PCAP or any other type as described in the documentation.

There is a presentation from last year training on vehicular communication with ns3 here
https://www.nsnam.org/wiki/AnnualTraining2015

Regards
K.

Nikhil Reddy

unread,
Jun 14, 2016, 12:18:27 PM6/14/16
to ns-3-users
Thank you for your reply.

I am generating trace files from SUMO and then giving it to the NS-3 using ns2-mobility-trace.cc. Then using 802.11p Wifi Architecture, I implemented V2V scenario and create a communication pattern between the nodes(vehicles).

Now I am analysing the packet structure and sorting out the best routing models.

    1. There are large Number of packets being transmitted between nodes and same packets are received multiple times and how can I restrict them?

Alongside this, I want to implement V2I scenario in the same code. So establishing a static nodes(which acts as infrastructure) doesn't went well. Because the static node not adjusting with the trace file and creates a mess.

    2. Is there any other approach to create V2I scenario in NS-3 and then co-join them with our previous code having V2V scenario?

    3. Can we create an hand-off between infrastructure nodes?

Konstantinos

unread,
Jun 14, 2016, 1:44:27 PM6/14/16
to ns-3-users
Hi,

See replies inline


On Tuesday, June 14, 2016 at 5:18:27 PM UTC+1, Nikhil Reddy wrote:
Thank you for your reply.

I am generating trace files from SUMO and then giving it to the NS-3 using ns2-mobility-trace.cc. Then using 802.11p Wifi Architecture, I implemented V2V scenario and create a communication pattern between the nodes(vehicles).

Now I am analysing the packet structure and sorting out the best routing models.

    1. There are large Number of packets being transmitted between nodes and same packets are received multiple times and how can I restrict them?


Same packet received multiple times from the same node or multiple nodes? If it is from multiple nodes, you can not restrict it if it is a broadcast packet.
Generally, all packets (broadcast and unicast) will be received by all the 'neighboring' nodes of the transmitter at least at the PHY layer and will be dropped at L2 if required. It's how shared medium works.
 
Alongside this, I want to implement V2I scenario in the same code. So establishing a static nodes(which acts as infrastructure) doesn't went well. Because the static node not adjusting with the trace file and creates a mess. 

    2. Is there any other approach to create V2I scenario in NS-3 and then co-join them with our previous code having V2V scenario?


Two solutions equally valid:
a) modify your trace file by hand and add the nodes with their positions following the language/format that is used. You will only need the 'set' command, not 'setdest' as they are not moving. 
b) use native ns-3 mobility model (constantmobility) and take care in the node IDs. The ns2mobilityhelper uses the node ID in the file (commonly starting from 0) to assign the mobility on the ns-3 nodes. So, create first the moving nodes and then the static. 
 
    3. Can we create an hand-off between infrastructure nodes?

There is some sort of handoff if you miss 10 beacons but not formal association/deassociation process
You coud implement one though and contribute it. It would be welcomed.

Just a comment here: generally 11p (or OCB as it is currently in the 802.11 standard), is more 'adhoc'-based rather than 'infrastructure'-based. So, even though you have V2I, the RSU/AP should also operate in adhoc mode, so there is no need for actual handoff. It's more of a routing to the best/closest gateway.

Nikhil Reddy

unread,
Jun 15, 2016, 8:36:50 AM6/15/16
to ns-3-users
A very huge thanks for your reply.

I implemented V2I by changing some of the values in the trace file and it works fine. And Frankly I am not satisfied with the results as it look much like a broadcasting message packets.

  1. How can I send packets to some particular nodes only?

  2. Is there is way to change my broadcasting packet to unicast/multicast, so that it can eliminate lot of problems because I can't figure out how to implement using WiFi (802.11p) in Adhoc mode?

I am thinking like, A stable communication between infrastructure nodes and then establish a communication between vehicles to infrastructure.

  2. So I have a thought like achieving V2V using WiFi (802.11p) and and V2I using Wimax. I have an idea like creating every node from start using constant-mobility model and it takes lot of time and effort. Can you please suggest any other way if it is possible?

  2.

Konstantinos

unread,
Jun 15, 2016, 8:55:28 AM6/15/16
to ns-3-users


On Wednesday, June 15, 2016 at 1:36:50 PM UTC+1, Nikhil Reddy wrote:
A very huge thanks for your reply.

I implemented V2I by changing some of the values in the trace file and it works fine. And Frankly I am not satisfied with the results as it look much like a broadcasting message packets.

  1. How can I send packets to some particular nodes only?

It's explained in the tutorial. You need to properly configure your application/traffic generator.
 

  2. Is there is way to change my broadcasting packet to unicast/multicast, so that it can eliminate lot of problems because I can't figure out how to implement using WiFi (802.11p) in Adhoc mode?


See (1). I do not understand the second part of your question. 11p is by default AdHoc.
 
I am thinking like, A stable communication between infrastructure nodes and then establish a communication between vehicles to infrastructure.

  2. So I have a thought like achieving V2V using WiFi (802.11p) and and V2I using Wimax. I have an idea like creating every node from start using constant-mobility model and it takes lot of time and effort. Can you please suggest any other way if it is possible?


Using the helper classes you can install the model to large number of nodes. However, I do not understand what is the problem of using the trace files for mobility? 

Nikhil Reddy

unread,
Jul 21, 2016, 9:44:32 AM7/21/16
to ns-3-users


On Wednesday, June 15, 2016 at 2:55:28 PM UTC+2, Konstantinos wrote:


On Wednesday, June 15, 2016 at 1:36:50 PM UTC+1, Nikhil Reddy wrote:
A very huge thanks for your reply.



I implemented both v2v and v2i. Right now I am trying to figure out the throughput and delay between node and I used flow monitor, but I cant able to get the outputs. I also used pcap tracing and it leads me nowhere. Is there any other way to generate metrics?

 

raissi khadija

unread,
Mar 21, 2017, 6:21:21 AM3/21/17
to ns-3-users
please can you help me to integrate SUMO to NS-3

Konstantinos

unread,
Mar 21, 2017, 6:54:38 AM3/21/17
to ns-3-users
Hi,

Please read the complete thread. Your question is ambiquious. What do you mean with integration?

Regards
K
Reply all
Reply to author
Forward
0 new messages