<div dir="ltr">Hi Alex,<br><br>Thank you for your answer. I've tried ncc, acces, client control, multicast, and broadcast strategy, but the result is not like my expectation. In my simulation, I want to make the packet interest choose another path that aren't affected by the hijacker(change to R2 when first attempt was hijacked by R3-H). Can you suggest to me, what can I do to get that result?<br>and<br>I want to use R-script to help me make statistical computing and graphics (<a href="http://ndnsim.net/2.1/metric.html#example-of-packet-drop-tracer-l2tracer">http://ndnsim.net/2.1/metric.html#example-of-packet-drop-tracer-l2tracer</a>). Can you help me, how to run R-script for app-delays tracer and content store tracer ?<br><br>Thank you<br><div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Best Regards,<br><br></div>Prasetyo<br></div></div></div>
<br><div class="gmail_quote">2016-01-25 2:30 GMT+07:00 Alex Afanasyev <span dir="ltr"><<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Prasetyo,<br>
<br>
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).<br>
<br>
If you select NCC strategy, for example, you should be able to see different behavior:<br>
<br>
...<br>
ndn::StrategyChoiceHelper::InstallAll("/prefix/sub", "ndn:/localhost/nfd/strategy/ncc");<br>
...<br>
<br>
---<br>
Alex<br>
<div><div class="h5"><br>
> On Jan 24, 2016, at 1:39 AM, Prasetyo Adi Wibowo <<a href="mailto:prasetyoadiwibowo92@gmail.com">prasetyoadiwibowo92@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> 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?<br>
><br>
> This is my topology<br>
> #                                /----\<br>
> #                             +=>| R2 |<=+<br>
> #                            /   \----/   \<br>
> #                           /              \<br>
> #                          /                \<br>
> #   /---\         /----\<=+                  +=>/----\         /---\<br>
> #   | C |<------->| R1 |                        | R4 |<------->| P |<br>
> #   \---/         \----/<=+                  +=>\----/         \---/<br>
> #                          \                /<br>
> #                           \              /<br>
> #                            \   /----\   /<br>
> #                             +=>| R3 |<=+<br>
> #                                \----/<br>
><br>
> #-------y code : ------#<br>
>   AnnotatedTopologyReader topologyReader("", 100);<br>
>   topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-custom-hijack.txt");<br>
>   topologyReader.Read();<br>
><br>
>   // Install NDN stack on all nodes<br>
>   ndn::StackHelper ndnHelper;<br>
>   ndnHelper.SetDefaultRoutes (false);<br>
><br>
>   // Getting containers for the consumer/producer<br>
>   Ptr<Node> producer = Names::Find<Node>("P");<br>
>   Ptr<Node> h1 = Names::Find<Node>("R3");<br>
>   Ptr<Node> consumer=Names::Find<Node>("C");<br>
><br>
>   ndnHelper.InstallAll();<br>
><br>
>   // Installing global routing interface on all nodes<br>
>   ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br>
>   ndnGlobalRoutingHelper.InstallAll();<br>
><br>
>   // Install NDN applications<br>
>   std::string prefix = "/prefix/sub";<br>
><br>
>   ndn::StrategyChoiceHelper::InstallAll("/prefix/sub", "ndn:/localhost/nfd/strategy/best-route");<br>
><br>
>   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");<br>
>   consumerHelper.SetPrefix(prefix);<br>
>   consumerHelper.SetAttribute("Frequency", StringValue("1")); // 100 interests a second<br>
>   consumerHelper.Install(consumer);<br>
><br>
>   ndn::AppHelper producerHelper("ns3::ndn::Producer");<br>
>   producerHelper.SetPrefix(prefix);<br>
>   producerHelper.Install(producer);<br>
><br>
>   ndn::AppHelper Hijackers("Hijacker");<br>
>   Hijackers.Install(h1);<br>
><br>
>   // Add /prefix origins to ndn::GlobalRouter<br>
>   ndnGlobalRoutingHelper.AddOrigins(prefix, producer);<br>
><br>
>   // Calculate and install FIBs<br>
>   ndn::GlobalRoutingHelper::CalculateRoutes();<br>
><br>
>   Simulator::Stop(Seconds(30.0));<br>
>   Simulator::Run();<br>
>   Simulator::Destroy();<br>
><br>
><br>
> Thank you<br>
><br>
> Kind Regards,<br>
><br>
> Prasetyo<br>
</div></div>> <code.rar>_______________________________________________<br>
> ndnSIM mailing list<br>
> <a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>
> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
<br>
</blockquote></div><br></div>