[ndnSIM] Global Routing Router work not well
y
553939139 at qq.com
Tue Sep 12 00:31:17 PDT 2023
Dear ndnSIM team
I'm using ndnSIM for a experiment,in my experiment,producer1 and producer2 have same prefix.when i print producer2's FIB the result is
prefix is/prefix
face is257cost is2
end node
prefix is/prefix
face is259cost is1
face is258cost is1
end node
prefix is/prefix
face is258cost is0
face is257cost is2
end node
The Producer node has two next hops,not one. I don't know why there is another hop in FIB.My code and topology file is:
CommandLine cmd;
cmd.Parse(argc, argv);
AnnotatedTopologyReader topologyReader("", 25);
topologyReader.SetFileName("src/ndnSIM/examples/topologies/2-1.txt");
topologyReader.Read();
std::string prefix = "/prefix";
// Install NDN stack on all nodes
ndn::StackHelper ndnHelper;
ndnHelper.InstallAll();
ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/best-route");
ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
ndnGlobalRoutingHelper.InstallAll();
// Getting containers for the consumer/producer
Ptr<Node> producer1 = Names::Find<Node>("p1");
Ptr<Node> producer2 = Names::Find<Node>("p2");
NodeContainer consumerNodes;
consumerNodes.Add(Names::Find<Node>("c"));
ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
consumerHelper.SetPrefix(prefix);
consumerHelper.SetAttribute("Frequency", StringValue("10")); // 10 interests a second
consumerHelper.Install(consumerNodes);
ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetPrefix(prefix);
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
ndnGlobalRoutingHelper.AddOrigins(prefix, producer1);
ndnGlobalRoutingHelper.AddOrigins(prefix, producer2);
producerHelper.Install(producer1);
producerHelper.Install(producer2);
// Calculate and install FIBs
ndn::GlobalRoutingHelper::CalculateRoutes();
router
# node comment yPos xPos
c NA 1 1
r NA 1 2
p1 NA 2 3
p2 NA 0 3
link
# srcNode dstNode bandwidth metric delay queue
c r 10Mbps 2 10ms 20
r p1 10Mbps 2 10ms 20
r p2 20Mbps 2 20ms 20
Plesase tell me where is the problem.
Thanks & Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20230912/541f4d74/attachment.html>
More information about the ndnSIM
mailing list