[ndnSIM] Regarding forwarding strategies

Swetha B swetab26 at gmail.com
Tue Feb 20 23:42:10 PST 2024


Hi members,
I am trying to compare the forwarding performance of existing Forwarding
strategies in ndnSIM 2.9 for a network with 279 nodes. All strategies show
the same rate, drop and delay with rate and delay tracers. Why is it so and
how else can I achieve this objective?


Thanks and regards
Swetha
I have used the following scenario.

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

  AnnotatedTopologyReader topologyReader("", 25);

//topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-grid-3x3.txt");

topologyReader.SetFileName("src/ndnSIM/examples/topologies/bw-delay-rand-1/1221.r0-conv-annotated.txt");
  topologyReader.Read();

  // Install NDN stack on all nodes
  ndn::StackHelper ndnHelper;
  ndnHelper.InstallAll();

  // Set BestRoute strategy
   ndn::StrategyChoiceHelper::InstallAll("/",
"/localhost/nfd/strategy/best-route");
  // ndn::StrategyChoiceHelper::InstallAll("/",
"/localhost/nfd/strategy/access");
   //ndn::StrategyChoiceHelper::InstallAll("/",
"/localhost/nfd/strategy/random");
    //ndn::StrategyChoiceHelper::InstallAll("/",
"/localhost/nfd/strategy/asf");

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

  // Getting containers for the consumer/producer
  Ptr<Node> producer = Names::Find<Node>("leaf-4337");
  NodeContainer consumerNodes;
  consumerNodes.Add(Names::Find<Node>("leaf-327"));

  // Install NDN applications
  std::string prefix = "/prefix";

  ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
  consumerHelper.SetPrefix(prefix);
  consumerHelper.SetAttribute("Frequency", StringValue("1000")); // 100
interests a second
  consumerHelper.Install(consumerNodes);

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

  // Add /prefix origins to ndn::GlobalRouter
  ndnGlobalRoutingHelper.AddOrigins(prefix, producer);

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

  Simulator::Stop(Seconds(5.0));
  //ndn::AppDelayTracer::InstallAll("app-delays-trace.txt");
  ndn::L3RateTracer::InstallAll("rate-trace.txt", Seconds(0.5));
   L2RateTracer::InstallAll("drop-trace.txt", Seconds(0.5));
  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);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20240221/4e35a287/attachment.html>


More information about the ndnSIM mailing list