<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">take a look here:</div><div class=""><br class=""></div><div class=""><div class=""><a href="https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.cpp" class="">https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.cpp</a></div><div class=""><a href="https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.hpp" class="">https://github.com/AkshayRaman/scenario-ntorrent/blob/master/extensions/ntorrent-fwd-strategy.hpp</a></div></div><div class=""><br class=""></div><div class="">This strategy is explained in this paper:</div><div class=""><br class=""></div><div class=""><a href="https://pdfs.semanticscholar.org/e954/a81a42feedba095873182ea8752ba62bffc0.pdf" class="">https://pdfs.semanticscholar.org/e954/a81a42feedba095873182ea8752ba62bffc0.pdf</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div></div></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Sep 16, 2018, at 11:25 PM, Harold Kumar <<a href="mailto:shohanmk@yahoo.com" class="">shohanmk@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6216" face="lucida console, sans-serif" class="">Greetings Everyone,<br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" face="lucida console, sans-serif" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6212" face="lucida console, sans-serif" class="">Is it possible to achieve rerouting between ndn nodes while there is a link failure? </font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" face="lucida console, sans-serif" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6213" face="lucida console, sans-serif" class="">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.<br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" face="lucida console, sans-serif" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6204" face="lucida console, sans-serif" class="">Firstly, I have used "Best-route" forwarding stretegy, which allows Consumer to send Interest towards Producer through [Consumer----> Router1---> Router3---> Router4--->Producer]</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_4897" class="">ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/best-route");</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6273" size="2" class="">Afterwards, I have created a manual link failure between Consumer1 and Router1 so that ndnSIM can do re-routing through another path. </font><font face="lucida console, sans-serif" size="2" class="">[Consumer----> Router2---> Router3---> Router4--->Producer]</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_4837" class="">Simulator::Schedule (Seconds (5.0), ndn::LinkControlHelper::FailLink, consumer1, router1);<br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6263" size="2" class="">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.</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font face="lucida console, sans-serif" size="2" id="yui_3_16_0_ym19_1_1537158342923_6431" class="">My partial code looks like this:</font><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font face="lucida console, sans-serif" size="2" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font face="lucida console, sans-serif" size="2" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_6434" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6435" class=""> +----------+ +----------+
| Router 2 | --------------- | Router 5 |
/+----------+ +-----|----\
/ \ / | \
/ \ / | \
/ \ / | \
/ \ / | ------------+
+----------/ \----------/ | | Producer |
| Consumer |---------------------| Router 3 | | +-----------+
+----------- /----------\ | /
\ / \ | /
\ / \ | /
\ / \ | /
\ / \ | /
\+----------+ +----------+
| Router 1 | | Router 4 |
+----------+ +----------+
</font></pre></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_5818" class=""> // 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);<br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""> <font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6314" style="font-size: small;" class=""> </font><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4113" class=""><font face="lucida console, sans-serif" class=""><br class=""></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4113" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6234" face="lucida console, sans-serif" class="">Sincerely,</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4113" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6128" face="lucida console, sans-serif" class="">Kamrul Morshed,</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4113" class=""><font id="yui_3_16_0_ym19_1_1537158342923_6180" size="2" face="lucida console, sans-serif" class=""><font id="yui_3_16_0_ym19_1_1537158342923_6171" class="">MS Student,</font> </font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4078" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_5788" class=""><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6325" class="">Xi'an Jiaotong Univerity,</font></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4078" class=""><font face="lucida console, sans-serif" size="2" id="yui_3_16_0_ym19_1_1537158342923_6362" class="">Xian, Shaanxi,</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_4078" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6347" class=""><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6346" class="">China. </font>
</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; user-select: text; overflow: hidden; line-height: 1.2em;" id="yui_3_16_0_ym19_1_1537158342923_3705" class=""><font size="2" id="yui_3_16_0_ym19_1_1537158342923_4800" class=""> </font>
-
</pre></div></div>_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></div></body></html>