<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6216" face="lucida console, sans-serif">Greetings Everyone,<br></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"><font size="2" face="lucida console, sans-serif"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6212" face="lucida console, sans-serif">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"><font size="2" face="lucida console, sans-serif"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6213" face="lucida console, sans-serif">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></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"><font size="2" face="lucida console, sans-serif"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6204" face="lucida console, sans-serif">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"><font size="2"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_4897">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"><font size="2"><br></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"><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6273" size="2">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">[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"><font size="2"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_4837">Simulator::Schedule (Seconds (5.0), ndn::LinkControlHelper::FailLink, consumer1, router1);<br></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"><br></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"><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6263" size="2">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"><br></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"><font face="lucida console, sans-serif" size="2" id="yui_3_16_0_ym19_1_1537158342923_6431">My partial code looks like this:</font><br></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"><font face="lucida console, sans-serif" size="2"><br></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"><font face="lucida console, sans-serif" size="2"><br></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"><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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6435"> +----------+ +----------+
| 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"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_5818"> // 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></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"><br></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"> <font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6314" style="font-size: small;"> </font><br></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"><font face="lucida console, sans-serif"><br></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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6234" face="lucida console, sans-serif">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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6128" face="lucida console, sans-serif">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"><font id="yui_3_16_0_ym19_1_1537158342923_6180" size="2" face="lucida console, sans-serif"><font id="yui_3_16_0_ym19_1_1537158342923_6171">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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_5788"><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6325">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"><font face="lucida console, sans-serif" size="2" id="yui_3_16_0_ym19_1_1537158342923_6362">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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_6347"><font face="lucida console, sans-serif" id="yui_3_16_0_ym19_1_1537158342923_6346">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"><font size="2" id="yui_3_16_0_ym19_1_1537158342923_4800"> </font>
-
</pre></div></body></html>