Hi,sorry for the late reply,, but the topic is quite complex.
First things first tho. Routing: there's something wrong or not fully said in your architecture.From the look of it, it smells like PMIP from a mile away. And PMIP is all but a simple system, you can't implement it in a simple way... well, otherwise it would be a simple system, which contradict my first statement :)Let's start with the addresses. The STA will have an address when it's connected to one AP. If it changes the AP, it changes its address?Answer: it depends. If the APs are in bridge mode, the address may be the same. Otherwise it must change.If the address changes, then you have a node with a mutable address, and you'll have to use another kind of address. As an example, you could use an application-level address (like changing a DynDNS entry), but it's slow as hell. I don't think you're referring to this.
If the address doesn't change, then all the APs are in the same subnet (your "core") along with the STAs. In this case you have the IP address constant, and your problem becomes a L2 forwarding issue. Should an AP forward the packet ?
I don't know if this mode of operation is supported by ns-3. Theoretically yes (place a Bridge between the CSMA and the WiFi interfaces), but I don't know how much the bridge is intelligent. Probably all the packets will be forwarded no matter what. You may need to work on this in order to enable/disable the forwarding depending on some logic (e.g., node association).
There's a last option: to use a multicast address. However, you'd need a protocol to let the APs dynamically join/leave the multicast forwarding tree, and this isn't yet supported in ns-3.
Summarising... I'd specify a bit better your scenario. You can do something similar in ns-3, but the point is: does it model your scenario with enough detail / precision ?
Yes, you're correct, sir. The ip addresses of all nodes in the scenario remain unchanged in the simulation. When I try to connect APs to the core by using P2P, all APs and all STAs are in the same subnet, while the core is not in this subnet actually. I haven't told this because I have no idea whether I should keep the ip addresses unchanged. What if changing their ip addresses in the simulation would make the problem easier to be solved. >_<
If the address doesn't change, then all the APs are in the same subnet (your "core") along with the STAs. In this case you have the IP address constant, and your problem becomes a L2 forwarding issue. Should an AP forward the packet ?And, oh, maybe I didn't make it clear that the core is actually a node as well. To be specify, what I want is when the core receive packets from the server, the core will forward the packets to all the APs unconditionally, and APs would check their own routing table to decide whether they should forward the packets to their own wifi STAs.And maybe it is important to tell that each time the server will just need to send packets to one STA. The server won't send packets to a group of STAs. But because the STA would associate with a new AP sometime, so when the core receives the packets, the core won't know which AP it should forward these packets to (, unless the core and the APs stores the ip address of each STA in their routing tables, which will make the core's routing table very big and the routing tables need to be modified manually). thus it is better for the core to forward the packets to all APs.And AP will forward the packets to its STAs only if the target STA (which the server is sending packets to) is associating with it.
I don't know if this mode of operation is supported by ns-3. Theoretically yes (place a Bridge between the CSMA and the WiFi interfaces), but I don't know how much the bridge is intelligent. Probably all the packets will be forwarded no matter what. You may need to work on this in order to enable/disable the forwarding depending on some logic (e.g., node association).Would you please give more details how to place a bridge between the CSMA and WiFi interfaces? >_< I am new to bridge and CSMA.Supposed n nodes are connected by a bridge, when a node forwards packets in the bridge, will all the rest nodes receive the packets if it is in unicast transfer mode?
There's a last option: to use a multicast address. However, you'd need a protocol to let the APs dynamically join/leave the multicast forwarding tree, and this isn't yet supported in ns-3.I have thought about multicast, but maybe it is not helpful to me, because(1) maybe I can't change unicast mode into multicast mode when the packets are transferring?(2) actually each time the server will just send packets to just one STAs, instead of a group of STAs.
Summarising... I'd specify a bit better your scenario. You can do something similar in ns-3, but the point is: does it model your scenario with enough detail / precision ?I am sorry I haven't make my question clear. I think maybe my problem would be easier actually ?