[ndnSIM] receiving a data message after stopping traffic

Zeinab Rezaiefar z.rezaiefar at yahoo.com
Wed Sep 13 07:01:29 PDT 2017

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) "


    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/
Internet Research Laboratory
Computer Science Department

On Sep 11, 2017, at 7:55 PM, Zeinab Rezaiefar <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 youthanks best regardszeinab

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.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
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.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.Stop(Seconds(13)); ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
      ndnGlobalRoutingHelper.InstallAll ();
// Calculate and install FIBs
//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));
  Simulator::Run ();
  Simulator::Destroy ();  return 0;

    On Tuesday, September 12, 2017 8:55 AM, Spyridon (Spyros) Mastorakis <mastorakis at cs.ucla.edu> wrote:

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?
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/
Internet Research Laboratory
Computer Science Department

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 advancebest regardsZeinab 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170913/9f57bd83/attachment-0001.html>

More information about the ndnSIM mailing list