Getting Error in Wifi-Wired mix topology in Infrastructure mode:

159 views
Skip to first unread message

Md Ashiqur Rahman

unread,
Mar 31, 2017, 1:05:38 PM3/31/17
to ns-3-users
Hello, I'm trying to simulate the following scenario Where S is the server and C1 is the client. The access points are in ApWifiMac setup and C1 in StaWifiMac setup:


Code: https://gist.github.com/anonymous/d586b6dd3a00e598acbada85dfdae3f3


I'm getting the following error:

assert failed. cond="m_ecmpRootExits.size () <= 1", msg="Assumed there is at most one exit from the root to this vertex", file=../src/internet/model/global-route-manager-impl.cc, line=316

terminate called without an active exception

Command ['/home/marahman/ndnSIM/ns-3/build/scratch/tcp-ap'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").


I have tried other forum posts on GlobalRouting for ECMP turning true and false, but none works. The other routing protocols are all said to be designed for ad hoc except for NixVector which is not working for me either. 



Tommaso Pecorella

unread,
Apr 2, 2017, 5:54:36 AM4/2/17
to ns-3-users
Hi,

you're using ndnSIM, and we don't support that. Moreover, I think that this bug has been fixed in ns-3-dev... 

Anyway, don't you think that it's a bad idea to put all the APs in the same subnet ?
  ipv4.SetBase ("10.1.8.0", "255.255.255.0");
 
Ipv4InterfaceContainer wifiInterfaces = ipv4.Assign (staDevice);
 
Ipv4InterfaceContainer wifiApInterfaces = ipv4.Assign (apDevices);

That's the problem, and it's not a bug: it's a design issue.

T. 

Md Ashiqur Rahman

unread,
Apr 3, 2017, 7:12:55 PM4/3/17
to ns-3-users
Hello Tommaso,

Thanks for the reply. My ns-3 folder is just kept within the ndnSIM folder. I changes the code to set different subnets on the wifi faces on different APs. However, I am facing the following error at runtime:

aborted. cond="!(networkHere == networkThere)", msg="GlobalRouter::ProcessSingleBroadcastLink(): Network number confusion", file=../src/internet/model/global-router-interface.cc, line=852
terminate called without an active exception

I found a similar issue in this thread: https://groups.google.com/forum/#!topic/ns-3-users/hpFmzzYv7tw

I think I'm having similar issues and need to install global routing in all the nodes except the sta nodes and Static routing in sta nodes. This might be a dumb question but I am facing difficulties on how to install global routing on certain nodes and static routing on some other nodes.

Manish Puraswani

unread,
Apr 6, 2017, 8:05:56 AM4/6/17
to ns-3-users
Dear Md Ashiqur Rahman

I would like to suggest following :-

1) Make different channel object for each AP i.e. wifiChannel  (so that have different wifiPhy.setChannel (wifiChannel.create). For Global routing each AP must have different channel too.(As I interpreted , I may be wrong)
2) To make global routing only on AP switch your line GlopbalRoutingHelper :: populateGlobalrouting  above to  Ipv4InterfaceContainer wifiApInterfaces = ipv4.Assign (staDevices);

I do hope it will resolve problem, please update this post whatever be the results (in sprit of Open Source community )

Regards
Manish

Md Ashiqur Rahman

unread,
Apr 10, 2017, 2:21:35 AM4/10/17
to ns-3-users
Hello!

Thanks Manish for the help. Your directions for setting separate channel objects have helped! I have overcome the error for the routing. 

Now I face problems of association and TCP application. I followed other TCP examples to setup sender receiver which worked well for single STA and single AP but for this, not working.


Regards-
Ashiq

Manish Puraswani

unread,
Apr 10, 2017, 7:30:18 AM4/10/17
to ns-3-users
Dear Ashiq;

Thanks for reply

I again suggest following changes :-

1) use bridge device in place of R in ur topology diagram

to use bridge device you need to do following :-

1)  #include "ns3/bridge-module.h"

create a link (P2P /CSMA ) between bridge and AP ;Bridge and server ( As you have already did )

 for example  :-

 for (int i = 0; i < 4; i++)
    {
      NetDeviceContainer link = csma.Install (NodeContainer (terminals.Get (i), csmaSwitch));
      terminalDevices.Add (link.Get (0));
      switchDevices.Add (link.Get (1));
    }
In above code we have tried to make bridge between terminal devices and switch devices. The terminal node have two devices :-  one is AP and other is to connect switch and terminal

 // Create the bridge netdevice, which will do the packet switching
  Ptr<Node> switchNode = csmaSwitch.Get (0);
  BridgeHelper bridge;
  bridge.Install (switchNode, switchDevices);

please don't install ipstack and don't assign IP to switch device.

for more details please read example provided in src/bridge folder.

will try to modify your program and update here if something happened .


I again request you to please put final code link here again, so that it will be helpful for others.

  

Regards
manish

Manish Puraswani

unread,
Apr 10, 2017, 10:21:36 AM4/10/17
to ns-3-users


The second suggestion which I forgot is :-

see the below link to enable static routing on STA


regards
Manish

Manish Puraswani

unread,
Apr 10, 2017, 11:13:57 AM4/10/17
to ns-3-users

Dear

Sorry for multiple reply

I hope this will give you some knowledge about your problem :-


Regards
manish

Md Ashiqur Rahman

unread,
Apr 12, 2017, 1:16:42 AM4/12/17
to ns-3-users
Hello! 

I believe the following implementation currently works for one STA communicating through first AP successfully. When moves away to next AP, connection is lost after ACK timeout of 1s  as STA not under same subnet of next AP. 

By the way, GlobalRouting works for all nodes, I believe it was an issue with subnets (thanks to Tomasso) and channel setup of AP (thanks to Manish).
  • I was thinking if it's possible to change an STA-s IP and also initialize the Yans channel in runtime? This might help to overcome AP changing of STA node.
  • Is DHCP setup possible in the WIFI routers to provide dynamic IP to the STA nodes? Can anyone help with such an example?
  • Also, I see in Pcap file that association messages (probing or beacon) are treated as Malformed packets, though association does occur successfully. Any possible reason?
One thing to clarify, the "swithNode" is not an actual switch, it's a router. Sorry for my bad coding.

Reply all
Reply to author
Forward
0 new messages