[ndnSIM] ndn::StackHelper::setCsSizs()

gc199211 gc199211 at mail.ustc.edu.cn
Thu Dec 29 19:07:48 PST 2016


Thanks 
         Is there any other tracers can  calculate the hit ratio of NFD'CS, as the hit ratio is a necessary indicators   in  my experiment.
2016-12-30 

gc199211 



发件人:"Spyridon (Spyros) Mastorakis" <mastorakis at cs.ucla.edu>
发送时间:2016-12-30 01:29
主题:Re: Re: [ndnSIM] ndn::StackHelper::setCsSizs()
收件人:"gc199211"<gc199211 at mail.ustc.edu.cn>
抄送:"ndnsim"<ndnsim at lists.cs.ucla.edu>

Hi,


please use the reply-all option, so that our email exchanges are visible to all the users in the mailing list.


My understanding is that this error has to do with the fact that you tried to use the cs tracer in combination with the CS of NFD. However, the cs tracer works only in the case of the “old” CS of ndnSIM.


I will open a ticket on redmine and, hopefully, this feature will be added soon.


Thanks for letting us know,


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


On Dec 28, 2016, at 5:41 PM, gc199211 <gc199211 at mail.ustc.edu.cn> wrote:



Hi ,I just simplely add two lines  of code in the src/ndnSIM/examples/ndn-tree-cs-tracers.cpp,Here is the whole cpp,The read Line is where I have changed.

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/ndnSIM-module.h"

namespace ns3 {

/**
 * This scenario simulates a tree topology (using topology reader module)
 *
 *    /------\      /------\      /------\      /------\
 *    |leaf-1|      |leaf-2|      |leaf-3|      |leaf-4|
 *    \------/      \------/      \------/      \------/
 *         ^          ^                ^           ^
 *         |          |                |           |
 *          \        /                  \         /
 *           \      /                    \       /    10Mbps / 1ms
 *            \    /                      \     /
 *             |  |                        |   |
 *             v  v                        v   v
 *          /-------\                    /-------\
 *          | rtr-1 |                    | rtr-2 |
 *          \-------/                    \-------/
 *                ^                        ^
 *                |                        |
 *                 \                      /  10 Mpbs / 1ms
 *                  +--------+  +--------+
 *                           |  |
 *                           v  v
 *                        /--------\
 *                        |  root  |
 *                        \--------/
 *
 *
 * To run scenario and see what is happening, use the following command:
 *
 *     ./waf --run=ndn-tree-cs-tracers
 */

int
main(int argc, char* argv[])
{
  CommandLine cmd;
  cmd.Parse(argc, argv);

  AnnotatedTopologyReader topologyReader("", 1);
  topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-tree-myself.txt");
  topologyReader.Read();

  // Install NDN stack on all nodes
  ndn::StackHelper ndnHelper;
  //ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru","MaxSize","100");
 ndnHelper.setCsSize(100);
  ndnHelper.setPolicy("nfd::cs::lru");
  ndnHelper.InstallAll();
  // Choosing forwarding strategy
  ndn::StrategyChoiceHelper::InstallAll("/prefix", "/localhost/nfd/strategy/best-route");

  // Installing global routing interface on all nodes
  ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
  ndnGlobalRoutingHelper.InstallAll();

  // Getting containers for the consumer/producer
  Ptr<Node> consumers[4] = {Names::Find<Node>("leaf-1"), Names::Find<Node>("leaf-2"),
                            Names::Find<Node>("leaf-3"), Names::Find<Node>("leaf-4")};
  Ptr<Node> producer = Names::Find<Node>("root");

  for (int i = 0; i < 4; i++) {
    ndn::AppHelper consumerHelper("ns3::ndn::ConsumerZipfMandelbrot");
    consumerHelper.SetAttribute("Frequency", StringValue("100")); // 100 interests a second

    // Each consumer will express the same data /root/<seq-no>
    consumerHelper.SetPrefix("/root");
    ApplicationContainer app = consumerHelper.Install(consumers[i]);
    app.Start(Seconds(0.01 * i));
  }

  ndn::AppHelper producerHelper("ns3::ndn::Producer");
  producerHelper.SetAttribute("PayloadSize", StringValue("1024"));

  // Register /root prefix with global routing controller and
  // install producer that will satisfy Interests in /root namespace
  ndnGlobalRoutingHelper.AddOrigins("/root", producer);
  producerHelper.SetPrefix("/root");
  producerHelper.Install(producer);

  // Calculate and install FIBs
  ndn::GlobalRoutingHelper::CalculateRoutes();

  Simulator::Stop(Seconds(20.0));

  ndn::CsTracer::InstallAll("tree-cs-trace.txt", Seconds(1));
  ndn::L3RateTracer::InstallAll("rate-tracer-as-cs-tracer",Seconds(1));
  ndn::AppDelayTracer::InstallAll("app-delays-trace.txt");

  Simulator::Run();
  Simulator::Destroy();

  return 0;
}

} // namespace ns3

int
main(int argc, char* argv[])
{
  return ns3::main(argc, argv);
}


It leads to the error,Thank you
2016-12-28 

gc199211



发件人:"Spyridon (Spyros) Mastorakis" <mastorakis at cs.ucla.edu>
发送时间:2016-12-28 20:31
主题:Re: [ndnSIM] ndn::StackHelper::setCsSizs()
收件人:"gc199211"<gc199211 at mail.ustc.edu.cn>
抄送:"ndnsim"<ndnsim at lists.cs.ucla.edu>

Hi,


it is not clear to me why this happened. Could you please give us some more context?


Thanks,


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


On Dec 28, 2016, at 6:36 AM, gc199211 <gc199211 at mail.ustc.edu.cn> wrote:


Hello:
     I have found a strange problem on use ndn::StackHelper::setCsSizs(), I want to use nfd::cs::Cs as my ContentStore,Here is my code ,
//begin 
<Clip(12-28-12-20-41).png>
//end

The code  is quite simple ,But  It leads to a error
<Clip(12-28-12-30-21).png>

   The strangest thing is  if I write the code in examples/ndn-simple,It has no problem,But if I write in any other  example cpp,It leads to the error. Thank you!





2016-12-28


gc199211




__________ Information from ESET NOD32 Antivirus, version of virus signature database 14674 (20161227) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




__________ Information from ESET NOD32 Antivirus, version of virus signature database 14571 (20161208) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161230/d53e3e90/attachment-0001.html>


More information about the ndnSIM mailing list