<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="">you get the same results because the best route strategy is the default strategy used by NFD. On a side note, you have a topology consisting of only 2 nodes, so I am not sure what exactly you expect to see from the forwarding strategy.</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=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Dec 6, 2017, at 1:23 AM, moussaoui yehya <<a href="mailto:yehya.housseyn@hotmail.com" class="">yehya.housseyn@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols;" class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="ms-font-color-neutralDark _rp_V4 rpHighlightBodyClass ms-font-weight-regular rpHighlightAllClass" id="Item.MessageUniqueBody" style="font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont;"><div class=""><div dir="ltr" class=""><div id="divtagdefaultwrapper" class=""><font size="3" face="Calibri,Helvetica,sans-serif" class=""><span id="divtagdefaultwrapper" style="font-size: 12pt;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">thank you sir for your reply</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">actually i have modified the code and implement more than one producer and try to change the forwarding strategy but i get the same metrics, even i delete this instruction<span class="Apple-converted-space"> </span><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><font size="3" face="Calibri,Helvetica,sans-serif" class=""><span id="divtagdefaultwrapper" style="font-size: 12pt;" class="">   ndn::StrategyChoiceHelper::Install(nodes, "/", "/localhost/nfd/strategy/best-route");<br class=""></span></font>it run normally but i get the results.</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">BTW my scenario apply on Wireless sensor network<span class="Apple-converted-space"> </span><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">this is my code .. please have a look of my code:<br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""> </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">#include "ns3/core-module.h"<br class="">#include "ns3/network-module.h"<br class="">#include "ns3/applications-module.h"<br class="">#include "ns3/wifi-module.h"<br class="">#include "ns3/mobility-module.h"<br class="">#include "ns3/internet-module.h"<br class=""><br class="">#include "ns3/ndnSIM-module.h"<br class=""><br class="">using namespace std;<br class="">namespace ns3 {<br class=""><br class="">NS_LOG_COMPONENT_DEFINE("ndn.WifiExample");<br class=""><br class="">//<br class="">// DISCLAIMER:  Note that this is an extremely simple example, containing just 2 wifi nodes<br class="">// communicating directly over AdHoc channel.<br class="">//<br class=""><br class="">// Ptr<ndn::NetDeviceFace><br class="">// MyNetDeviceFaceCallback (Ptr<Node> node, Ptr<ndn::L3Protocol> ndn, Ptr<NetDevice> device)<br class="">// {<br class="">//   // NS_LOG_DEBUG ("Create custom network device " << node->GetId ());<br class="">//   Ptr<ndn::NetDeviceFace> face = CreateObject<ndn::MyNetDeviceFace> (node, device);<br class="">//   ndn->AddFace (face);<br class="">//   return face;<br class="">// }<br class=""><br class="">int<br class="">main(int argc, char* argv[])<br class="">{<br class="">  // disable fragmentation<br class="">  Config::SetDefault("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue("2200"));<br class="">  Config::SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue("2200"));<br class="">  Config::SetDefault("ns3::WifiRemoteStationManager::NonUnicastMode",<br class="">                     StringValue("OfdmRate24Mbps"));<br class=""><br class="">  CommandLine cmd;<br class="">  cmd.Parse(argc, argv);<br class=""><br class="">  //////////////////////<br class="">  //////////////////////<br class="">  //////////////////////<br class="">  WifiHelper wifi = WifiHelper::Default();<br class="">  // wifi.SetRemoteStationManager ("ns3::AarfWifiManager");<br class="">  wifi.SetStandard(WIFI_PHY_STANDARD_80211a);<br class="">  wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode",<br class="">                               StringValue("OfdmRate24Mbps"));<br class=""><br class="">  YansWifiChannelHelper wifiChannel; // = YansWifiChannelHelper::Default ();<br class="">  wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel");<br class="">  wifiChannel.AddPropagationLoss("ns3::ThreeLogDistancePropagationLossModel");<br class="">  wifiChannel.AddPropagationLoss("ns3::NakagamiPropagationLossModel");<br class=""><br class="">  // YansWifiPhy wifiPhy = YansWifiPhy::Default();<br class="">  YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default();<br class="">  wifiPhyHelper.SetChannel(wifiChannel.Create());<br class="">  wifiPhyHelper.Set("TxPowerStart", DoubleValue(5));<br class="">  wifiPhyHelper.Set("TxPowerEnd", DoubleValue(5));<br class=""><br class="">  NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default();<br class="">  wifiMacHelper.SetType("ns3::AdhocWifiMac");<br class=""><br class="">  Ptr<UniformRandomVariable> randomizer = CreateObject<UniformRandomVariable>();<br class="">  randomizer->SetAttribute("Min", DoubleValue(10));<br class="">  randomizer->SetAttribute("Max", DoubleValue(100));<br class=""><br class="">  MobilityHelper mobility;<br class="">  mobility.SetPositionAllocator("ns3::RandomBoxPositionAllocator", "X", PointerValue(randomizer),<br class="">                                "Y", PointerValue(randomizer), "Z", PointerValue(randomizer));<br class=""><br class="">  mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");<br class=""><br class="">  NodeContainer nodes;<br class="">  nodes.Create(10);<br class=""><br class="">  ////////////////<br class="">  // 1. Install Wifi<br class="">  NetDeviceContainer wifiNetDevices = wifi.Install(wifiPhyHelper, wifiMacHelper, nodes);<br class=""><br class="">  // 2. Install Mobility model<br class="">  mobility.Install(nodes);<br class=""><br class="">  // 3. Install NDN stack<br class="">  NS_LOG_INFO("Installing NDN stack");<br class="">  ndn::StackHelper ndnHelper;<br class="">  // ndnHelper.AddNetDeviceFaceCreateCallback (WifiNetDevice::GetTypeId (), MakeCallback<br class="">  // (MyNetDeviceFaceCallback));<br class="">  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "1000");<br class="">  ndnHelper.SetDefaultRoutes(true);<br class="">  ndnHelper.Install(nodes);<br class=""><br class="">  // Set BestRoute strategy<br class="">  ndn::StrategyChoiceHelper::Install(nodes, "/", "/localhost/nfd/strategy/best-route");<br class=""><br class="">  ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br class=""><br class="">  ndnGlobalRoutingHelper.InstallAll();<br class=""><br class="">  // 4. Set up applications<br class="">  NS_LOG_INFO("Installing Applications");<br class=""><br class=""> for(int i=0;i<2;i++)  <br class="">{<br class="">  ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");<br class="">  consumerHelper.SetPrefix("/test/prefix");<br class="">  consumerHelper.SetAttribute("Frequency", DoubleValue(10.0));<br class="">  consumerHelper.Install(nodes.Get(i));<br class=""><br class="">}<br class="">for(int i=2;i<10;i++)  <br class="">{<br class="">  ndn::AppHelper producerHelper("ns3::ndn::Producer");<br class="">  producerHelper.SetPrefix("/");<br class="">  producerHelper.SetAttribute("PayloadSize", StringValue("1200"));<br class="">  producerHelper.Install(nodes.Get(i));<br class=""><br class=""> }<br class="">  ////////////////<br class=""><br class="">ndn::GlobalRoutingHelper::CalculateRoutes();<br class="">  Simulator::Stop(Seconds(60.0));<br class="">ndn::CsTracer::InstallAll("cs-best-route.txt", Seconds(1));<br class=""><br class="">  Simulator::Run();<br class="">  Simulator::Destroy();<br class=""><br class="">  return 0;<br class="">}<br class=""><br class="">} // namespace ns3<br class=""><br class="">int<br class="">main(int argc, char* argv[])<br class="">{<br class="">  return ns3::main(argc, argv);<br class="">}</div><div class=""><br class=""></div></span></font></div></div></div></div></div></div></blockquote></div><br class=""></div></body></html>