Suggestion on how to simulate moving STA between to AP

75 views
Skip to first unread message

Nazmul Alam

unread,
Nov 11, 2016, 1:02:36 AM11/11/16
to ns-3-users
Hello,
I am trying to figure out how to simulate a mobile STA connected to an AP and moves to a new AP while the simulation is running.
I will try to point out my concerns in a point manner -

1. How should I approach the simulation to reconfigure (disassociate from AP1 and associate with AP2) the scenario when the Simulator is running? Will Simulator::Schedule() work?

2. before simulation starts my STA will have IP(A), but when it is disassociated from the first AP and connected to the second one, I want to provide a different IP(B). The issue is how to tell the Ipv4GlobalRoutingHelper to recompute the routing table?

Any additional suggestion will be very helpful.

Thanks.

Tommaso Pecorella

unread,
Nov 12, 2016, 7:23:13 AM11/12/16
to ns-3-users
Hi,

the first point has been discussed more than once in the group. Please search for it.
The second problem can be solved by using DHCP. It isn't yet in ns-3 but you can find it here: https://codereview.appspot.com/279540043/

T.

Nazmul Alam

unread,
Nov 12, 2016, 11:57:18 PM11/12/16
to ns-3-users
Hi,
I searched this group before posting, I did find some post regarding it, but it wasn't clear how to change the topology while the simulation is going on. Because once the Simulator::Run() is called it will execute it's run_loop and consume the events. And I did find in one post that saying Simulator::Schedule() function cannot change the topology in run time as it gives exception.

I did check the DHCP accidentally when I was upgrading to ns-3.26, but will it automatically adjust the routing?

Thank you again for your suggestion.

Nazmul Alam

unread,
Nov 13, 2016, 6:08:07 AM11/13/16
to ns-3-users
Hi,
I am not able to use the DHCP server effectively. The issue is with ipv4 routing table in nodes (checked using pyviz).
The DHCP server and client can negotiate and update the address, but a server situated in other network does not know about the updated address.
So, after the address acquisition I called the Ipv4GlobalRoutingHelper::RecomputeRoutingTables(). But the routing table in server (situated in another subnet) never updates. So, the application cannot communicate with the server.

Why GlobalRoutingHelper does not see the address?

Thanks in advance.

Nazmul Alam

unread,
Nov 16, 2016, 8:40:34 PM11/16/16
to ns-3-users
This is just an Update. If anyone wants to use DHCP for this and has multiple subnets, it's better not to use DHCP combined with GlobalRouting. Although static routing should work.

For single subnet using DHCP one needs to implement a TraceCallback whenever an ip address is assigned and update the static routing. This way I was able to use DHCP correctly.

DHCP didn't solve the mobility issue. I did it by using GlobalRouting and StaticRouting and it is easier than using DHCP. I just wanted to share the information so that in future it can be helpful.

Tommaso Pecorella

unread,
Nov 17, 2016, 6:59:29 PM11/17/16
to ns-3-users
Hi,

this could be a valid suggestion: the DHCP client should automatically update the default router in the node.
I'll let the devs know.

T.
Reply all
Reply to author
Forward
0 new messages