[ndnSIM] receiving a data message after stopping traffic

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Wed Sep 13 19:57:45 PDT 2017


Hi,

here are some directions for future investigation:

1) Does the producer actually responds to the Interest? Based on your logs, it seems that the producer sends back a Data packet.
2) Even if the producer responds to the Interest, it will need some time to reach the consumer. The consumer might not be able to receive though, since the application has been stopped. I would suggest you modify the consumer application itself to stop the Interest transmission process rather than the entire application. You should keep the application up and running for a little more in order to receive data for the outstanding Interests.

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On Sep 13, 2017, at 7:01 AM, Zeinab Rezaiefar <z.rezaiefar at yahoo.com> wrote:
> 
> Dear Spyridon ,
> Thanks so much for your email. I ran the program on debugging mode and the end of the output is as follows. As you can see after consumer stop sending , it cannot receive the replied for 29th Interest message. my question is that how I can stop sending interest message but not stop receiving data message in the consumer. I would appreaciate hearing your thoughts on this issue.
> 
> 
>  " 12.9s 0 ndn.Consumer:SendPacket()
> 12.9s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 29
> 12.9s 0 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 29 with +12900000000.0ns. already 1 items
>  send the interest with sequence number 29 in node0 and total sent is 130
> 12.9149s 0 ndn.Consumer:OnData(0x2487110, 0x24f3b10)
> 12.9149s 0 ndn.Consumer:OnData(): [INFO ] < DATA for 28
> unsatisfied interest number is 1 sequence is 28in node:0
> 12.941s 3 ndn.Producer:OnInterest(0x2485530, 0x24f18a0)
> 12.941s 3 ndn.Producer:OnInterest(): [INFO ] node(3) respodning with Data: /test/%00%1D
> 13s 0 ndn.Consumer:StopApplication()
> 13.1s -1 ndn.Consumer:OnTimeout(29) "
> 
> thanks
> regards
> Zeinab
> 
> 
> 
> 
> 
> On Wednesday, September 13, 2017 11:00 AM, Spyridon (Spyros) Mastorakis <mastorakis at cs.ucla.edu> wrote:
> 
> 
> Hi Zeinab,
> 
> please forward your emails to the list, so that the rest of the ndnSIM community can see them.
> 
> I would suggest you enable the forwarder logging component to see what exactly is going on with the last few Interests:
> 
> NS_LOG=nfd.Forwarder ./waf --run=<your_scenario_name>
> 
> Hope that this helps,
> 
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
> Internet Research Laboratory
> Computer Science Department
> UCLA
> 
>> On Sep 11, 2017, at 7:55 PM, Zeinab Rezaiefar <z.rezaiefar at yahoo.com <mailto:z.rezaiefar at yahoo.com>> wrote:
>> 
>> 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 <mailto: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/ <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 <mailto: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/ef3d4bfd/attachment-0001.html>


More information about the ndnSIM mailing list