[ndnSIM] ndnSIM: hijacker doesn't work and empty PIT

Alex Afanasyev alexander.afanasyev at ucla.edu
Sun Dec 1 12:26:20 PST 2013


Hi Fabrizio,

Have you solved your problem yet?  In the scenario you have attached I cannot see how did you use the global routing controller, which may be the reason of a strange behavior.  Hijacker app would work only if it can attract Interests for specific prefix.  That is, the longest prefix match should be the hijacked prefix.

---
Alex

On Nov 24, 2013, at 1:42 PM, fabrizio saponaro <fab.batta at gmail.com> wrote:

> I'm working on a simple tree topology. I want that one specific node (a router) works like an hijacker, so I tried to set this node to Hijacker but this node works like a normal node and forward everything to the correct destination.
> 
> Furthermore I can't fill the PITs of every node of the topology, if I try to simulate the application, every PIT is empty, but with the visualizer I can see that every packet pass toward every node.
> 
> This is my code:
> 
> // Install CCNx stack on all nodes
>     ndn::StackHelper ccnxHelper;
>     ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");  
>     ccnxHelper.SetPit ("ns3::ndn::pit::SerializedSize", "MaxSize", "100");
>     ccnxHelper.SetContentStore ("ns3::ndn::cs::Lru", "MaxSize", "1");   // Content Store OFF
>     ccnxHelper.InstallAll ();
> 
>     // Installing global routing interface on all nodes
>     ndn::GlobalRoutingHelper ccnxGlobalRoutingHelper;
>     ccnxGlobalRoutingHelper.InstallAll ();
> 
>     // Getting containers for the consumer/producer
>     Ptr<Node> consumer1 = Names::Find<Node> ("leaf-1");
>     Ptr<Node> consumer2 = Names::Find<Node> ("leaf-2");
>     Ptr<Node> consumer4 = Names::Find<Node> ("leaf-4");
>     Ptr<Node> producer = Names::Find<Node> ("leaf-3");
>     Ptr<Node> router3 = Names::Find<Node> ("rtr-3");
>     Ptr<Node> router2 = Names::Find<Node> ("rtr-2");
>     Ptr<Node> router1 = Names::Find<Node> ("rtr-1");
> 
> 
>     //consumerswindow
>     ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerWindow");
>     consumerHelper.SetAttribute ("Window", UintegerValue (100)); 
>     consumerHelper.SetAttribute ("Size", StringValue("0.1"));   
>     consumerHelper.SetPrefix ("/rtr-3/leaf-3");
>     consumerHelper.Install (consumer1);
>     consumerHelper.SetPrefix ("/rtr-3/leaf-3");
>     consumerHelper.Install (consumer2);
> 
>    //hijaker router1
>    ndn::AppHelper hijackerHelper ("Hijacker");
>    hijackerHelper.Install (router1);
> 
>    //attacker consumercbr
>    ndn::AppHelper consumerHelper_attack ("ns3::ndn::ConsumerCbr");
>    consumerHelper_attack.SetAttribute ("Frequency", StringValue ("1")); 
>    consumerHelper_attack.SetPrefix ("/rtr-3/leaf-3");
>    consumerHelper_attack.Install (consumer4);
> 
> 
>    //producer leaf-3
>    ndn::AppHelper producerHelper ("ns3::ndn::Producer");
>    producerHelper.SetAttribute ("PayloadSize", StringValue("1024")); 
> 
>    ccnxGlobalRoutingHelper.AddOrigins ("/rtr-3", producer);
>    producerHelper.SetPrefix ("/rtr-3");
>    producerHelper.Install (producer);
> 
>    // Calculate and install FIBs
>    ccnxGlobalRoutingHelper.CalculateRoutes ();
> 
>    Simulator::Schedule (Seconds (1.0), printPitStats, router1); //print statistics about PIT
>    Simulator::Stop (Seconds (5.0));
>    Simulator::Run ();
>    Simulator::Destroy (); 
> Where am I wrong?
> 
> 
> 
> _______________________________________________
> 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/20131201/2c561724/attachment.html>


More information about the ndnSIM mailing list