[Ndn-interest] The forwarding strategy doesn't choose another path in a hijacker scenario
Farhi Nassima
nassima.farhi at yahoo.com
Sat May 11 04:41:23 PDT 2019
Hello everyone,
I tried a hijacker scenario with the topology and the code below, i can see that the hijacker is working fine because the consumer node is sending interests and it doesn't receive anything and the hijacker (R3) is receiving but it doesn't send anything and the interest aren't reaching the producer, but why the best-route forwarding strategy isn't changing the path to a node that is not affected by hijack (R2) ? isn't it what it is supposed to do inherently ? i've tried other strategies (multicast, ncc, ...) but none of them changes the path as well. Can anyone, please tell me how can i do that ? Thank you in advance.
+=>| R2 |<=+
/ \----/ \
/ \
/ \
/---\ /----\<=+ +=>/----\ /---\
| C |<------->| R1 | | R4 |<------->| P |
\---/ \----/<=+ +=>\----/ \---/
\ /
\ /
\ /----\ /
+=>| R3 |<=+
\----/
AnnotatedTopologyReader topologyReader("", 6); topologyReader.SetFileName("src/ndnSIM/examples/topologies/topohijack.txt"); topologyReader.Read();
// Install NDN stack on all nodes ndn::StackHelper ndnHelper; ndnHelper.SetDefaultRoutes (true); // Getting containers for the consumer/producer Ptr<Node> producer = Names::Find<Node>("Node5"); Ptr<Node> h1 = Names::Find<Node>("Node3"); Ptr<Node> consumer=Names::Find<Node>("Node0"); ndnHelper.InstallAll(); // Installing global routing interface on all nodes ndn::GlobalRoutingHelper ndnGlobalRoutingHelper; ndnGlobalRoutingHelper.InstallAll(); // Install NDN applications std::string prefix = "/prefix"; ndn::StrategyChoiceHelper::InstallAll("/prefix", "ndn:/localhost/nfd/strategy/best-route"); ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr"); consumerHelper.SetPrefix(prefix); consumerHelper.SetAttribute("Frequency", StringValue("1")); // 100 interests a second consumerHelper.Install(consumer); ndn::AppHelper producerHelper("ns3::ndn::Producer"); producerHelper.SetPrefix(prefix); producerHelper.Install(producer); ndn::AppHelper Hijackers("Hijacker"); Hijackers.Install(h1); // Add /prefix origins to ndn::GlobalRouter ndnGlobalRoutingHelper.AddOrigins(prefix, producer); // Calculate and install FIBs ndn::GlobalRoutingHelper::CalculateRoutes(); Simulator::Stop(Seconds(30.0)); Simulator::Run(); Simulator::Destroy();
return 0;
Kind Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20190511/0a71c693/attachment.html>
More information about the Ndn-interest
mailing list