[Ndn-interest] The forwarding strategy doesn't choose another path in a hijacker scenario

Lan Wang (lanwang) lanwang at memphis.edu
Sat May 11 04:52:08 PDT 2019

Best route strategy doesn’t adapt using forwarding plane information.  It’s purely based on routing ranking.  You can try the ASF strategy but first you need to make sure that R1 has both faces (one to R2 and one to $3) in its FIB entry for the name prefix P is using.


On May 11, 2019, at 6:41 AM, Farhi Nassima via Ndn-interest <ndn-interest at lists.cs.ucla.edu<mailto:ndn-interest at lists.cs.ucla.edu>> wrote:

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);

   // 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");


   // Installing global routing interface on all nodes
   ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;

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

   ndn::StrategyChoiceHelper::InstallAll("/prefix", "ndn:/localhost/nfd/strategy/best-route");

   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
   consumerHelper.SetAttribute("Frequency", StringValue("1")); // 100 interests a second

   ndn::AppHelper producerHelper("ns3::ndn::Producer");

   ndn::AppHelper Hijackers("Hijacker");

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

   // Calculate and install FIBs


  return 0;

Kind Regards.

Ndn-interest mailing list
Ndn-interest at lists.cs.ucla.edu<mailto:Ndn-interest at lists.cs.ucla.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20190511/1fa1208c/attachment-0001.html>

More information about the Ndn-interest mailing list