[ndnSIM] Manually Rerouting after Link Failure using ndnSIM

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Mon Sep 17 13:31:57 PDT 2018


Hi,

take a look here:

https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.cpp <https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.cpp>
https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.hpp <https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.hpp>

This strategy is explained in this paper:

https://pdfs.semanticscholar.org/e954/a81a42feedba095873182ea8752ba62bffc0.pdf <https://pdfs.semanticscholar.org/e954/a81a42feedba095873182ea8752ba62bffc0.pdf>

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA




> On Sep 16, 2018, at 11:25 PM, Harold Kumar <shohanmk at yahoo.com> wrote:
> 
> Greetings Everyone,
> 
> Is it possible to achieve rerouting between ndn nodes while there is a link failure? 
> 
> As far as I know, ndnSIM uses best-route stretegy, but if there is a link failure between two nodes; Simulator does not choose alternative path and data transaction stops. I want to implemet a stretegy so that while there is a link failure, simulator may choose alternative best-route.
> 
> Firstly, I have used "Best-route" forwarding stretegy, which allows Consumer to send Interest towards Producer through [Consumer----> Router1---> Router3---> Router4--->Producer]
> 
> ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/best-route");
> 
> Afterwards, I have created a manual link failure between Consumer1 and Router1 so that ndnSIM can do re-routing through another path. [Consumer----> Router2---> Router3---> Router4--->Producer]
> 
> Simulator::Schedule (Seconds (5.0), ndn::LinkControlHelper::FailLink, consumer1, router1);
> 
> For now, I have added manual route which do seem to do the job for a few seconds but after 3-4 seconds consumer stops sending packet. I am not sure what may have gone wrong or is there any alternative method.
> 
> My partial code looks like this:
> 
> 
>                  +----------+                 +----------+                                                             
>                  | Router 2 | --------------- | Router 5 |                                                             
>                 /+----------+                 +-----|----\                                                             
>                /             \                  /   |     \                                                            
>               /               \                /    |      \                                                           
>              /                 \              /     |       \                                                          
>             /                   \            /      |        ------------+                                             
> +----------/                     \----------/       |        |  Producer |                                             
> | Consumer |---------------------| Router 3 |       |        +-----------+                                             
> +-----------                     /----------\       |        /                                                         
>             \                   /            \      |       /                                                          
>              \                 /              \     |      /                                                           
>               \               /                \    |     /                                                            
>                \             /                  \   |    /                                                             
>                 \+----------+                  +----------+                                                            
>                  | Router 1 |                  | Router 4 |                                                            
>                  +----------+                  +----------+                                                            
>                                                                               
> 
>   // Install NDN stack on all nodes
>   ndn::StackHelper ndnHelper;
>   ndnHelper.SetDefaultRoutes(true);
>   ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "100"); //!Attention!If set to 0, then MaxSize is infinite
>   ndnHelper.InstallAll();
> 
>   // Choosing forwarding strategy {Available Strategy: best-route, multicast}
>   ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/best-route");
>  
>   // Installing global routing interface on all nodes
>   ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
>   ndnGlobalRoutingHelper.InstallAll();
> 
>   // Getting containers for the consumer/producer/router
>   Ptr<Node> consumer1 = Names::Find<Node>("C1");
>   Ptr<Node> producer1 = Names::Find<Node>("P1");
>   Ptr<Node> router1 = Names::Find<Node> ("R1");
>   Ptr<Node> router2 = Names::Find<Node> ("R2");
>   Ptr<Node> router3 = Names::Find<Node> ("R3");
>   Ptr<Node> router4 = Names::Find<Node> ("R4");
>   Ptr<Node> router5 = Names::Find<Node> ("R5");
> 
> 
>   // Installing applications for the consumer
>   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
>   //consumer node install a Consumer application that will express interests in /data namespace
>   consumerHelper.SetPrefix("/data");
>   consumerHelper.SetAttribute("Frequency", StringValue("10")); // 10 interests a second
>   consumerHelper.Install(consumer1);
> 
> 
>   // The failure of the link from a given time {FailLink,UpLink}
>   Simulator::Schedule (Seconds (5.0), ndn::LinkControlHelper::FailLink, consumer1, router1);
>   Simulator::Schedule (Seconds (15.0), ndn::LinkControlHelper::UpLink, consumer1, router1);
> 
> 
>   // Installing applications for the producer
>   ndn::AppHelper producerHelper("ns3::ndn::Producer");
>   // Producer will reply to all requests starting with /prefix
>   producerHelper.SetPrefix("/data");
>   producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
>   producerHelper.Install(producer1);
>   // Register /dst1 prefix with global routing controller and
>   ndnGlobalRoutingHelper.AddOrigins("/data", producer1);
> 
>   // Calculate and install FIBs
>   ndn::GlobalRoutingHelper::CalculateRoutes();
> 
>   // Manually configure FIB routes
>   ndn::FibHelper::AddRoute("C1", "/data", "R1", 1); 
>   ndn::FibHelper::AddRoute("C1", "/data", "R2", 1);
>  
>   ndn::FibHelper::AddRoute("R2", "/data", "R3", 1);
>   ndn::FibHelper::AddRoute("R3", "/data", "R4", 1);
>   ndn::FibHelper::AddRoute("R4", "/data", "P1", 1);
> 
>                                                                                                                                                                                                                                 
> 
> Sincerely,
> Kamrul Morshed,
> MS Student,                                                                                                                       
> Xi'an Jiaotong Univerity,
> Xian, Shaanxi,
> China.                                                                                                                              
>                                                                                                                                                                                                              
>                                                                                                                 -
>                                                                                                                  
>                                                                                                                                                                                                                                 
>                                                                                                                  
>                                                                                                                  
>                                                                                                                                
>                                                                                                                  
>                                                                                                                  
>                                                                                           
> _______________________________________________
> 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/20180917/cd42cf42/attachment-0001.html>


More information about the ndnSIM mailing list