[ndnSIM] How to make NDN node choose another path that aren't affect by the hijacker

Alex Afanasyev aa at CS.UCLA.EDU
Sun Jan 24 11:30:27 PST 2016


Hi Prasetyo,

The behavior you're seeing is because of the simple strategy (BestRoute) you're using.  This strategy has no intelligence driven by the data plane performance and only uses input from the routing plane (e.g., manual route configuration).

If you select NCC strategy, for example, you should be able to see different behavior:

...
ndn::StrategyChoiceHelper::InstallAll("/prefix/sub", "ndn:/localhost/nfd/strategy/ncc");
...

---
Alex

> On Jan 24, 2016, at 1:39 AM, Prasetyo Adi Wibowo <prasetyoadiwibowo92 at gmail.com> wrote:
> 
> Hi,
> 
> It's my first time using NDNsim and I tried to create a hijacker scenario. Everytime I run the program, packet interest that's been sent always pass through the nodes that affected by hijack(R3-H), although in the topology that I made there are other path that aren't affected by hijack(R2). Could you tell me how to make the packet interest choose another path that aren't affect by the hijacker(change to R2 when first attempt was hijacked by R3-H)? Is it possible to do that?
> 
> This is my topology
> #                                /----\
> #                             +=>| R2 |<=+
> #                            /   \----/   \
> #                           /              \
> #                          /                \
> #   /---\         /----\<=+                  +=>/----\         /---\
> #   | C |<------->| R1 |                        | R4 |<------->| P |
> #   \---/         \----/<=+                  +=>\----/         \---/
> #                          \                /
> #                           \              /
> #                            \   /----\   /
> #                             +=>| R3 |<=+
> #                                \----/
> 
> #-------y code : ------#
>   AnnotatedTopologyReader topologyReader("", 100);
>   topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-custom-hijack.txt");
>   topologyReader.Read();
> 
>   // Install NDN stack on all nodes
>   ndn::StackHelper ndnHelper;
>   ndnHelper.SetDefaultRoutes (false);
> 
>   // Getting containers for the consumer/producer
>   Ptr<Node> producer = Names::Find<Node>("P");
>   Ptr<Node> h1 = Names::Find<Node>("R3");
>   Ptr<Node> consumer=Names::Find<Node>("C");
> 
>   ndnHelper.InstallAll();
> 
>   // Installing global routing interface on all nodes
>   ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
>   ndnGlobalRoutingHelper.InstallAll();
> 
>   // Install NDN applications
>   std::string prefix = "/prefix/sub";
> 
>   ndn::StrategyChoiceHelper::InstallAll("/prefix/sub", "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();
> 
> 
> Thank you
> 
> Kind Regards,
> 
> Prasetyo
> <code.rar>_______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160124/fedd19f8/attachment.bin>


More information about the ndnSIM mailing list