[ndnSIM] RIB do not work well

Mortaza Nikzad mrtz_azad at yahoo.com
Thu Apr 26 03:32:19 PDT 2018


Hi everyone!
I wrote a simple ndnSiIM scenario to test different forwarding strategies. In this scenario, there are three different routes to destination. one route with 3 hops to destination and 1 mbps data rate in bottleneck link, another with 4 hops and 1 mbps data rate in bottleneck link and the third one with 4 hops but 10 mbps data rate in bottleneck link.
When I run the simulation interests unexpectedly forward through 3 hops route. Moreover, in absence of 3 hop route, nodes mistakenly choose the route with lower data rate (4 hops with 1 mbps data rate). in addition I found that in multicast strategy, interests do not multicast. In fact, it works as the best strategy works.
it is my simulation program:

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/ndnSIM-module.h"
#include <sstream>
using namespace ns3;

namespace ns3 {

int
main(int argc, char* argv[])
{
  double alpha=1.0;
	std::string topo="src/ndnSIM/examples/topologies/topo-cong.txt";
	CommandLine cmd;
	cmd.AddValue( "topo", "topo that be used:" , topo);
  cmd.Parse(argc, argv);
  AnnotatedTopologyReader topologyReader("", 10);
  topologyReader.SetFileName(topo);
  topologyReader.Read();

  /****************************************************************************/
  // Install NDN stack on all nodes
    ndn::StackHelper ndnHelper;
	ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
	ndnHelper.Install(Names::Find<Node>("Src1"));
	ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
	ndnHelper.Install(Names::Find<Node>("Dst1"));	
	ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
	ndnHelper.Install(Names::Find<Node>("Rtr1"));
	ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
	ndnHelper.Install(Names::Find<Node>("Rtr2"));
	ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
	ndnHelper.Install(Names::Find<Node>("Rtr3"));
	ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
	ndnHelper.Install(Names::Find<Node>("Rtr4"));
 
  /****************************************************************************/
  //Set BestRoute strategy
  ndn::StrategyChoiceHelper::InstallAll("/Dst1", "/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> consumer1 = Names::Find<Node>("Src1");
  Ptr<Node> producer1 = Names::Find<Node>("Dst1");
  /****************************************************************************/

ndn::AppHelper consumerHelper("ns3::ndn::ConsumerWindow");
consumerHelper.SetAttribute("MaxSeq", StringValue("10000")); // Max Seq num
 consumerHelper.SetAttribute("Window", StringValue("100"));
  /****************************************************************************/
  // on the first to ninth consumer node install a Consumer application
  // that will express interests in /dst1 to /dst9 namespace
  consumerHelper.SetPrefix("/Dst1");
  consumerHelper.Install(consumer1);	

  /****************************************************************************/
  ndn::AppHelper producerHelper("ns3::ndn::Producer");
  producerHelper.SetAttribute("PayloadSize", StringValue("1040"));
  /****************************************************************************/
  // Register /dst1 to prefix with global routing controller and
  // install producer that will satisfy Interests in /dst1 to namespace
  producerHelper.SetPrefix("/Dst1");
  producerHelper.Install(producer1);
ndnGlobalRoutingHelper.AddOrigins("/Dst1", producer1);
  /*****************************************************************************/	
	// Calculate and install FIBs
  ndn::GlobalRoutingHelper::CalculateRoutes();

  Simulator::Stop(Seconds(100.0));

  /****************************************************************************/
  Simulator::Run();
  Simulator::Destroy();

  return 0;
}

} // namespace ns3

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

and it is the used topology:

router
# node  comment     yPos    xPos
Src1	NA		1		3
Rtr1	NA		3		5
Rtr2	NA		1		10
Rtr3	NA		5		10
Rtr4	NA		3		11
Dst1	NA		3		13

link
# srcNode   dstNode     bandwidth   metric  delay   queue
Src1        Rtr1        10Mbps     1        10ms    20
Rtr1        Rtr2        10Mbps      1        10ms    20
Rtr1        Rtr4       1Mbps         1        10ms    20
Rtr3        Rtr4        10Mbps      1        10ms    20
Rtr1        Rtr3        1Mbps        1        10ms    20
Rtr2        Rtr4        10Mbps      1        10ms    20
Dst1        Rtr4        10Mbps     1        10ms    20


has anyone an idea about this problem? is my simulation program correct?
any idea or suggestion will be helpful.
thanks.


More information about the ndnSIM mailing list