Vanet Routing Compare Example.

489 views
Skip to first unread message

Jakub

unread,
May 4, 2015, 3:40:53 AM5/4/15
to ns-3-...@googlegroups.com

Hello,

Allow me to express my Big thank and appreciation to whom ever contributed in writing and setting the Vanet-routing-compare example, it is so flexible and detailed. 

It might be stright forward for some of you, but it is strange for me that when I am setting the option WAVE-PHY in the example

  cmd.AddValue ("80211Mode", "1=802.11p; 2=802.11b; 3=WAVE-PHY", m_80211mode);

I end up with no data in the dump Ascii generated files.

     AsciiTraceHelper ascii;
      Ptr<OutputStreamWrapper> osw = ascii.CreateFileStream ( (m_trName + ".tr").c_str ());
      wifiPhy.EnableAsciiAll (osw);
      wavePhy.EnableAsciiAll (osw);

Knowing that my trace is enabled. and I am trying to have simple scenario where only the BSM messages are broadcasted without any routing implementation.

Thank you

Jakub

Tommaso Pecorella

unread,
May 4, 2015, 5:48:25 AM5/4/15
to ns-3-...@googlegroups.com, sca...@ncsu.edu
Hi,

it could be a bug (or a fix to a bug). Scott should be the right guy to look at this.

Have fun,

T.

Scott Carpenter

unread,
May 4, 2015, 7:21:08 AM5/4/15
to ns-3-...@googlegroups.com
Jakub,

I am glad to hear that you find the vanet-routing-compare example useful and flexible.

To disable routing protocol traffic and evaluate only BSM messages, use "--protocol=0".

The 80211Mode option 3 was intended to support the IEEE 1609/WAVE implementation in ns-3, but was not fully working at the time vanet-routing-compare was contributed to ns-3, so that is, unfortunately, not working in the current releases.  In future work, I will be cleaning up and contributing code and that supports this.  But, if you do not need any WAVE-specific functions, then 8021Mode=2 (i.e., dedicated continuous 5.9 GHz channel access as per 802.11p) should be fine.

Best,
-Scott

Jakub

unread,
May 4, 2015, 7:54:59 AM5/4/15
to ns-3-...@googlegroups.com
Thank you Scott and Tommaso.

One more thing please is that when I am choosing the protocol=0 and disabling routing and even having sinks=0, why the RREP  is still printed out in the trace files, which is time consumption when I do not need any routing protocol. 

such as 
t 1.008 /NodeList/57/DeviceList/0/$ns3::WifiNetDevice/Phy/State/Tx ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:3a, BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=1) ns3::LlcSnapHeader (type 0x800) ns3::Ipv4Header (tos 0x0 DSCP Default ECN Not-ECT ttl 1 id 1 protocol 17 offset (bytes) 0 flags [none] length: 48 10.1.0.58 > 10.1.255.255) ns3::UdpHeader (length: 28 654 > 654) ns3::aodv::TypeHeader (RREP) ns3::aodv::RrepHeader (destination: ipv4 10.1.0.58 sequence number 0 source ipv4 10.1.0.58 lifetime 2000 acknowledgment required flag 0) ns3::WifiMacTrailer ()
I am sorry if this is trivial, but I am doing my best to search around as much as possible before posting such a questions :).   

Regards
Jakub

Scott Carpenter

unread,
May 4, 2015, 8:40:33 AM5/4/15
to ns-3-...@googlegroups.com
Hi, Jakub,

Oh, I see.  I think that is a bug (or maybe a feature).  I've logged bug 2110.  I appreciate your investigating.  The resolution may not necessarily be "trivial".

Here's what I captured into bug 2110:

When executing the vanet-routing-compare script with internet routing disabled (i.e., --run "src/wave/examples/vanet-routing-compare --protocol=0", there are still RREQ msgs being sent.

I think this is a bug.  (Or maybe it is a feature).  For IP-routing, the internet stack is installed onto every node.  However, with routing disabled by --protocol=0, no data is then submitted for routing through the network.  However, this doesn't seem to be preventing the initial route request messages from being sent (RREQ).  However, I think they are unanswered (i.e., no RREP).  Nonetheless, this is unnecessary overhead.

Furthermore, the use of IP addresses is used to determine the sender node for every received packet.  An alternative would be to instead use the MAC address to resolve sender / receiver, but this will require some refactoring of the code.

Konstantinos

unread,
May 4, 2015, 8:50:48 AM5/4/15
to ns-3-...@googlegroups.com
Hi,

Even with protocol=0, AODV gets installed (see the code snippet). 

573  case 0:
574  case 2:
575  if (m_routingTables != 0)
576  {
577  aodv.PrintRoutingTableAllAt (rtt, rtw);
578  }
579  list.Add (aodv, 100);
580  if (m_protocol == 0)
581  {
582  m_protocolName = "NONE";
583  }
584  else
585  {
586  m_protocolName = "AODV";
587  }
588  break;

I would call it a BUG and the fix should be the addition of a 'break' after case 0.

Regards,
K.

Jakub

unread,
May 4, 2015, 11:05:35 AM5/4/15
to ns-3-...@googlegroups.com

Thank you Konstantion and Scott. adding the magic break just reshaped my trace file with only the BSM Messages payloads.

Many thanks.
Jakub

Justin Gopinath

unread,
Aug 30, 2018, 7:29:51 AM8/30/18
to ns-3-users
Scott,

The code was working fine with 80211p mode. I am a ns3 user looking forward the wave multichannel operations. Shall i know in which release of ns3 has full working of vanet-routing -compare?

Thanks,
Justin
Reply all
Reply to author
Forward
0 new messages