[ndnSIM] wifi simulation with access point

Spyridon Mastorakis smastorakis at unomaha.edu
Thu Jun 25 16:58:57 PDT 2020

The FIB helper works only with wired (p2p) links if I recall correctly. It will not work with wireless links. I had pushed a patch for that on gerrit probably a couple of years ago, but it got abandoned a few weeks ago.


Spyridon (Spyros) Mastorakis
Assistant Professor
Computer Science Department
University of Nebraska, Omaha
Peter Kiewit Institute Room 175A

On Jun 25, 2020, at 6:56 PM, Muktadir R Chowdhury (mrchwdhr) <mrchwdhr at memphis.edu<mailto:mrchwdhr at memphis.edu>> wrote:

I have three nodes: two stations and one access point. Which I created in the following way:

  NodeContainer wifiStaNodes;
  wifiStaNodes.Create (2);
  NodeContainer wifiApNode;
  wifiApNode.Create (1);

  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
  wifiChannel.AddPropagationLoss ("ns3::RangePropagationLossModel", "MaxRange", DoubleValue(50));
  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
  phy.SetChannel (wifiChannel.Create());

  WifiHelper wifi;
  wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode",
  WifiMacHelper mac;

  Ssid ssid = Ssid ("ns-3-ssid");
  mac.SetType ("ns3::StaWifiMac", "Ssid", SsidValue (ssid), "ActiveProbing", BooleanValue (false));
  NetDeviceContainer staDevices = wifi.Install (phy, mac, wifiStaNodes);

  mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));
  NetDeviceContainer apDevices = wifi.Install (phy, mac, wifiApNode);

Node 0 (Consumer) , Node 2 (Access Point), and Node 1 (Producer).

All the nodes' strategy is set to best-route for the used prefix. I am manually setting up the routes between stations and ap.

  Ptr<Node> conNode = wifiStaNodes.Get(0);
  Ptr<Node> prodNode = wifiStaNodes.Get(1);
  Ptr<Node> apNode = wifiApNode.Get(0);

  ndn::FibHelper::AddRoute(conNode, "/test/prefix", apNode, 1);
  ndn::FibHelper::AddRoute(prodNode, "/test/prefix", apNode, 1);

I am getting the following error in the FibHelper::AddRoute():

msg="Cannot add route: Node# 0 and Node# 2 are not connected", file=../src/ndnSIM/helper/ndn-fib-helper.cpp, line=156

This is because the NetDevice for Node# 0 is not found, which is checked in this line:

>From the log I can see that NetDeviceTransport is created for all the nodes. Can you any one please tell what I am missing here?


ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu<mailto:ndnSIM at lists.cs.ucla.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200625/2c411eb8/attachment-0001.html>

More information about the ndnSIM mailing list