I don't know how to implement this kind of topology

293 views
Skip to first unread message

Red zhaoyj

unread,
Mar 15, 2015, 11:57:34 AM3/15/15
to ns-3-...@googlegroups.com
Hi,

it is the second time I post my question here today, as well as in my life. >_< Sorry for taking your time.
I want to model a network, whose topology looks like this one:
                    +-------------AP_A
                    |
                    |--------------AP_B
                    |
server--------core------------AP_C
                    |
                    |---------------AP_D-----------STA_Y
                    |
                    +--------------AP_E-----------STA_X
What I want to implement is when server sends packets to the core, the core will spread the packets to all the APs, and APs will check their routing table to decide whether to send the packets to the stations.
For example, considering server is sending packets to STA_X, then the following goes 
(1) server sends packets to the core
(2) the core spreads the packets to the five APs
(3) only AP_E will send packets to its receiver, STA_X. The other four APs will do nothing.

I don't know how to implement the topology between core and APs. I have tried these 2 ways:
(A) simply tried P2P (each AP connects to the core using P2P), and both the core and APs need to store the IP addresses of STAs in the routing table. And if a STA connects to a new AP in the middle of the simulation (I did this by changing the code in sta-wifi-mac.cc), the core, the new AP and the old AP will have to modify their routing table. Modifying the routing tables is a difficult job but what's worse is that this kind of topology cause high packet loss, when the number of APs reaches 30.
(B) put the core and the APs in the same CSMA channel. At the beginning I thought maybe the packets sent by the core will spread in the CSMA network automatically, then each AP will receive the packets. But finally I found that actually each time only two nodes in the CSMA network are in communication.

Actually I am just looking for a way(in which I don't need to modify routing tables of any nodes) to implement the topology above, or something familiar. I don't know if this is practical.

Sincerely hope for your help ! Any advice will be appreciated.

Bests,

Red zhaoyj

unread,
Mar 16, 2015, 1:51:30 AM3/16/15
to ns-3-...@googlegroups.com
Could anyone please give me some advice. T.T or suggestions, instructions, ideas, improvement, modifications will be also helpful.

Red zhaoyj於 2015年3月15日星期日 UTC+8下午11時57分34秒寫道:

Tommaso Pecorella

unread,
Mar 16, 2015, 8:11:55 AM3/16/15
to ns-3-...@googlegroups.com
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 ?

Hoe this helps.

T.

Red zhaoyj

unread,
Mar 16, 2015, 10:02:47 AM3/16/15
to ns-3-...@googlegroups.com


Tommaso Pecorella於 2015年3月16日星期一 UTC+8下午8時11分55秒寫道:
Hi,

sorry for the late reply,, but the topic is quite complex.
Very appreciate your reply, sir !!
 

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.

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 ?

Tommaso Pecorella

unread,
Mar 16, 2015, 2:18:47 PM3/16/15
to ns-3-...@googlegroups.com
Hi,

for the sake of simplification, I'll cut the previous messages, leaving only the relevant parts.


On Monday, March 16, 2015 at 3:02:47 PM UTC+1, Red zhaoyj wrote:
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. >_<

Changing the node address is a matter of scenario. You should simulate a scenario, not the opposite. I.e., first you have a real model you want to mimic, then you simplify it (maybe) in order to ease the simulation burden, then you simulate it.
If you try to simulate something using a completely different system...well, the result will not match :)

In your specific case, both cases are equally tricky. 

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.

Finally I got what you want to model. It does have a name, you know ?
Anyway, you can't link the APs and the core node with P2P links. Each P2P link need to have its own subnet, or it will not work.
Moreover, P2P links can't be added to a BridgeNetDevice, so...

Anyway, I'd start by looking at this example:
examples/wireless/wifi-wired-bridging.cc

Then I'd try to modify what needs to be changed. In particular the logic to not forward a packet to a node not in range.
 
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?

Yes, check the example :)
 
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.

If you didn't think to multicast, don't complicate your life with it :P
 
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 ?

Your question is very clear. What I meant is... you need / want to mimic a real system, not the opposite. I was just suggestion to not bend your simulation scenario to the simulator.

Cheers,

T.
 

Red zhaoyj

unread,
Mar 16, 2015, 10:59:57 PM3/16/15
to ns-3-...@googlegroups.com
Hi,

It seems I have violated some basic rules of science, >.< which made me look stupid. Actually I am not mimic anything in the reality. I just need to put APs, STAs and the server together, and ensure they can communicate with each other. Changing the ip address of STA is much more realistic. But (1) as you said mutable address will make the simulation slow (2) I don't know how to implement this, so I am not going to change their ip addresses. >w<

To be honest, I don't know the name of what I am modeling. Otherwise, time wouldn't be wasted to explain this kind of topology.

I will check the examples/wireless/wifi-wired-bridging.cc and take a try now. My aim is just to model the network well to avoid high packet loss.

My pleasure to have your reply, sir.

Tommaso Pecorella於 2015年3月17日星期二 UTC+8上午2時18分47秒寫道:

Tommaso Pecorella

unread,
Mar 17, 2015, 4:37:36 AM3/17/15
to ns-3-...@googlegroups.com
I don't see which science rule you violated :)

In the past some vendors tried it, then some big players "tombstoned" it (e.g., Cisco). Recently I've seen a new interest for something similar.

Cheers,

T.

Red zhaoyj

unread,
Mar 18, 2015, 5:10:24 AM3/18/15
to ns-3-...@googlegroups.com
Hi,

At last, I model the network I want! That example helps me a lot!
Thank you very much, sir! ^_^

Tommaso Pecorella於 2015年3月17日星期二 UTC+8下午4時37分36秒寫道:
Reply all
Reply to author
Forward
0 new messages