[ndnSIM] How to make NDN node choose another path that aren't affect by the hijacker
Prasetyo Adi Wibowo
prasetyoadiwibowo92 at gmail.com
Sat Jan 30 02:36:58 PST 2016
Hi Alex,
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?
and
I want to use R-script to help me make statistical computing and graphics (
http://ndnsim.net/2.1/metric.html#example-of-packet-drop-tracer-l2tracer).
Can you help me, how to run R-script for app-delays tracer and content
store tracer ?
Thank you
Best Regards,
Prasetyo
2016-01-25 2:30 GMT+07:00 Alex Afanasyev <aa at cs.ucla.edu>:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160130/078822c5/attachment.html>
More information about the ndnSIM
mailing list