[ndnSIM] receiving a data message after stopping traffic

Zeinab z.rezaiefar at yahoo.com
Tue Sep 12 19:02:41 PDT 2017


> 
> Dear Spyridon ,
> thank you so much for replying. I have been running the following scenario.. although I just stop sending traffic at 13, the node 1 cannot receive the data packet after that. Therefore the last interest message will not be responded. I will be thankful to let me know what is wrong about it.  I should mention that this is a simple scenario, however, in more complicated scenario, there are more interest packets which are not replied after stopping sending traffic. I am looking forward to hearing from you
> thanks
> best regards
> zeinab
> 
> 
>  int 
> main (int argc, char *argv[])
> {
>   // setting default parameters for PointToPoint links and channels
>   Config::SetDefault ("ns3::PointToPointNetDevice::DataRate", StringValue ("1Mbps"));
>   Config::SetDefault ("ns3::PointToPointChannel::Delay", StringValue ("10ms"));
>   Config::SetDefault ("ns3::DropTailQueue::MaxPackets", StringValue ("20"));
>   // Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
>   CommandLine cmd;
>   cmd.Parse (argc, argv);
>   // Creating nodes
>   NodeContainer nodes;
>   nodes.Create (7);
>   // Connecting nodes using two links
>   PointToPointHelper p2p;
>   p2p.Install (nodes.Get (0), nodes.Get (4));
>  p2p.Install (nodes.Get (1), nodes.Get (4));
>  p2p.Install (nodes.Get (4), nodes.Get (5));
>  p2p.Install (nodes.Get (5), nodes.Get (6));
>  p2p.Install (nodes.Get (6), nodes.Get (3));
>  p2p.Install (nodes.Get (4), nodes.Get (2));
> ndn::StackHelper ndnHelper;
> ndnHelper.SetPit ("ns3::ndn::pit::Lru","PitEntryPruningTimout","20");
>  ndnHelper.SetDefaultRoutes (true);
> //ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");
> ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::CustomStrategy");
> ndnHelper.SetContentStore("ns3::ndn::cs::Stats::Lru", "MaxSize", "10");
>   //ndnHelper.InstallAll ();
> ndnHelper.Install(nodes.Get (4));
> ndnHelper.Install(nodes.Get (5));
> ndnHelper.Install(nodes.Get (6));
> ndnHelper.SetContentStore("ns3::ndn::cs::Nocache");
> ndnHelper.Install(nodes.Get (0));
> ndnHelper.Install(nodes.Get (2));
> ndnHelper.Install(nodes.Get (1));
> ndnHelper.Install(nodes.Get (3));
> ///producer
>  ndn::AppHelper producerHelper1 ("ns3::ndn::Producer");
> producerHelper1.SetPrefix ("/prefix");
>   producerHelper1.SetAttribute ("PayloadSize", StringValue("1024"));
> //producerHelper1.SetAttribute ("Signature", StringValue("224"));
> producerHelper1.Install (nodes.Get (2));
> 
> ndn::AppHelper producerHelper3 ("ns3::ndn::Producer");
> producerHelper3.SetPrefix ("/prefix");
>   producerHelper3.SetAttribute ("PayloadSize", StringValue("1024"));
> producerHelper3.Install (nodes.Get (3));
> 
> ndn::AppHelper producerHelper4 ("ns3::ndn::Producer");
> producerHelper4.SetPrefix ("/test");
>  producerHelper4.SetAttribute ("PayloadSize", StringValue("1024"));
> producerHelper4.Install (nodes.Get (3));
> //consumer
> 
> ndn::AppHelper consumerHelper1 ("ns3::ndn::ConsumerCbr");
>   // Consumer will request /prefix/0, /prefix/1, ...
>   consumerHelper1.SetPrefix ("/prefix");
>   consumerHelper1.SetAttribute ("Frequency", StringValue ("10")); // 10 interests a second
>   ApplicationContainer consumer1 =consumerHelper1.Install (nodes.Get (0)); // first node
> consumer1.Start(Seconds(0));
> consumer1.Stop(Seconds(5));
> 
> ndn::AppHelper consumerHelper3 ("ns3::ndn::ConsumerCbr");
>  consumerHelper3.SetPrefix ("/prefix");
>   consumerHelper3.SetAttribute ("Frequency", StringValue ("10")); // 10 interests a second
>   ApplicationContainer consumer3 =consumerHelper3.Install (nodes.Get (1)); // first node
> consumer3.Start(Seconds(5));
> consumer3.Stop(Seconds(10));
> ndn::AppHelper consumerHelper4 ("ns3::ndn::ConsumerCbr");
>  consumerHelper4.SetPrefix ("/test");
>   consumerHelper4.SetAttribute ("Frequency", StringValue ("10")); // 10 interests a second
>   ApplicationContainer consumer4 =consumerHelper4.Install (nodes.Get (1)); // first node
> consumer4.Start(Seconds(10));
> consumer4.Stop(Seconds(13));
>  ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
>       ndnGlobalRoutingHelper.InstallAll ();
> ndnGlobalRoutingHelper.AddOrigins("/prefix",nodes.Get(2));
> ndnGlobalRoutingHelper.AddOrigins("/prefix",nodes.Get(3));
> ndnGlobalRoutingHelper.AddOrigins("/test",nodes.Get(3));
> // Calculate and install FIBs
>     ndn::GlobalRoutingHelper::CalculateRoutes();
> //Config::Connect("/NodeList/*/$ns3::ndn::cs::Stats::Lru/WillRemoveEntry", MakeCallback(CacheEntryRemoved));
>   Simulator::Stop (Seconds (20.0));
> ndn::CsTracer::InstallAll("cs-trace(1attack).txt", Seconds(1));
> ndn::AppDelayTracer::InstallAll("app-delays1-trace.txt");
>   Simulator::Run ();
>   Simulator::Destroy ();
>   return 0;
> }
>  
> 
> 
> On Tuesday, September 12, 2017 8:55 AM, Spyridon (Spyros) Mastorakis <mastorakis at cs.ucla.edu> wrote:
> 
> 
> Hi,
> 
> yes, you should be able to receive the remaining traffic (data packets) until the simulation ends assuming that you do not destroy the simulation context and the applications are still running.
> 
> Probably you stopped the producer application or something like that?
> 
> Thanks,
>  
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
> 
>> On Sep 11, 2017, at 4:17 AM, Zeinab Rezaiefar <z.rezaiefar at yahoo.com> wrote:
>> 
>> Hello,
>> I am wondering that a consumer can receive data packet after stopping sending traffic until that simulation runs or not. for example if we define sending traffic during 1 second to 13 seconds of the simulation time and we run simulation for 20 second, the consumer can receive the data packet after 13 second or not. I should mention that recently I have ran the scenario for 60 second and the last traffic will be stopped at 53 second. In this scenario, no data packet will be received after 53 second although there are requests which are not replied until 53 second. I will become so thankful if you help me what the reason is.
>> Thanks in advance
>> best regards
>> Zeinab 
> 
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170913/174dac54/attachment-0001.html>


More information about the ndnSIM mailing list