eth and wlan interfaces between APs

219 views
Skip to first unread message

sparkle Tr

unread,
Apr 20, 2023, 3:33:20 AM4/20/23
to mininet-wifi-discuss
Hello Ramon, 

I'm currently doing my research on SDN, and I am interested in creating a fully wireless topology. Still, I have some roadblocks I need to know how or even if it's possible to resolve. 
This is my topology.  research topo - Page 1 (13).png
With the following code
from mininet.log import setLogLevel, info
from mn_wifi.link import wmediumd, mesh
from mn_wifi.cli import CLI
from mn_wifi.net import Mininet_wifi

from mininet.node import Controller, RemoteController, OVSKernelSwitch , Host
from mn_wifi.wmediumdConnector import interference


def topology():
"Create a network."
net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference)
info("*** Creating nodes\n")

ap1 = net.addAccessPoint('ap1', position='-200,100,0', ssid='ssid1', mode='g', channel='1')
ap2 = net.addAccessPoint('ap2', position='-100,200,0', ssid='ssid2', mode='g', channel='1')
ap3 = net.addAccessPoint('ap3', position='-100,0,0', ssid='ssid3', mode='g', channel='1')
ap4 = net.addAccessPoint('ap4', position='100,200,0', ssid='ssid4', mode='g', channel='1')
ap5 = net.addAccessPoint('ap5', position='100,0,0', ssid='ssid5', mode='g', channel='1')
ap6 = net.addAccessPoint('ap6', position='200,100,0',ssid='ssid6', mode='g', channel='1')

sta1 = net.addStation('sta1', ip='10.0.0.1', position='-200,-100,0')
sta3 = net.addStation('sta3', ip='10.0.0.3', position='-100,-100,0')
sta6 = net.addStation('sta6', ip='10.0.0.6', position='200,-100,0')

c0 = net.addController('c0',controller=RemoteController, ip='127.0.0.1',port=6633)

info("*** Configuring nodes\n")
net.configureWifiNodes()

info("*** Associating Stations\n")
net.addLink(ap1,ap2)
net.addLink(ap1,ap3)
net.addLink(ap2,ap3)
net.addLink(ap2,ap5)
net.addLink(ap2,ap4)
net.addLink(ap3,ap5)
net.addLink(ap3,ap4)
net.addLink(ap4,ap5)
net.addLink(ap4,ap6)
net.addLink(ap6,ap5)

net.addLink(ap1,sta1)
net.addLink(ap3,sta3)
net.addLink(ap6,sta6)

net.plotGraph(min_x=-1000, min_y=-1000, max_x=1000, max_y=1000)
info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
ap2.start([c0])
ap3.start([c0])
ap4.start([c0])
ap5.start([c0])
ap6.start([c0])

info("*** Running CLI\n")
CLI(net)

info("*** Stopping network\n")
net.stop()


if __name__ == '__main__':
setLogLevel('info')
topology()

But when doing "net" it seems like the interfaces are ethernet, eth-, wired network. 
Screenshot from 2023-04-20 16-10-44.png
I've tried using cls=mesh, like in your mesh example (mininet-wifi/examples/mesh.py)
But when using class mesh, I understand you cannot link APs directly but will connect what is on the range; this solution does not work for me as my SDN controller does not record the throughput properly. 
I've also tried creating the interfaces into the code, like the following.  

ap4 = net.addAccessPoint('ap2', wlans=4, ssid=['ssid1','ssid2','ssid3','ssid4'], mode='g', channel='1')

But when running, the interfaces are created but not used amongst the other APs, according to Wireshark. 


Ive also used MiniEdit in which there is this option of Wifi-direct 

Screenshot from 2023-04-20 16-27-22.png

but when running on the script seems like its not possible to use with wifi-direct.
Screenshot from 2023-04-20 16-28-23.png

I've searched the mailing list but cannot find what I need. Is there any way to configure the interfaces connection between AP-AP so it could be ap1-wlan2:ap2-wlan2

I know Im missing something, and my knowledge might not be enough. Can you help me point out what I am missing? Or if what I want to do is possible? 

Let me know your thoughts if there is any missing information or anything confusing, I'm glad to post more detail! 

Thank you very much for your time. 

Ramon Fontes

unread,
Apr 20, 2023, 4:55:29 AM4/20/23
to sparkle Tr, mininet-wifi-discuss
Is there any way to configure the interfaces connection between AP-AP so it could be ap1-wlan2:ap2-wlan2

Which wifi technology would you use in the real world?

Sent from my android

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mininet-wifi-discuss/babf4209-d121-49ac-9e76-65e7191b2e18n%40googlegroups.com.

Tere tr

unread,
Apr 20, 2023, 6:07:58 AM4/20/23
to Ramon Fontes, mininet-wifi-discuss
Hey, 
I would use a wireless distribution system to connect two or several access points in real world wirelessly. 
Is there any similar way to emulate that in mininet wifi? Cause I checked for that and couldn’t find that specific solution.  


2023年4月20日(木) 午後5:55 Ramon Fontes <ramonre...@gmail.com>:

Ramon Fontes

unread,
Apr 20, 2023, 7:27:50 AM4/20/23
to Tere tr, mininet-wifi-discuss
WDS is actually obsolete. You can use 4ddress instead. https://github.com/intrig-unicamp/mininet-wifi/blob/master/examples/4address.py

Sent from my android

Tere Venegas

unread,
Apr 20, 2023, 8:50:06 AM4/20/23
to Ramon Fontes, mininet-wifi-discuss
Thank you very much Ramon for your guidance! 
I’ll try it out and see if it also works with my controller! 

Regards, 
Tere Venegas. 

2023/04/20 午後8:27、Ramon Fontes <ramonre...@gmail.com>のメール:


WDS is actually obsolete. You can use 4ddress instead. https://github.com/intrig-unicamp/mininet-wifi/blob/master/examples/4address.py

Sent from my android

On Thu, 20 Apr 2023, 07:07 Tere tr, <tereve...@gmail.com> wrote:
Hey, 
I would use a wireless distribution system to connect two or several access points in real world wirelessly. 
Is there any similar way to emulate that in mininet wifi? Cause I checked for that and couldn’t find that specific solution.  

2023年4月20日(木) 午後5:55 Ramon Fontes <ramonre...@gmail.com>:
Is there any way to configure the interfaces connection between AP-AP so it could be ap1-wlan2:ap2-wlan2

Which wifi technology would you use in the real world?

Sent from my android

On Thu, 20 Apr 2023, 04:33 sparkle Tr, <tereve...@gmail.com> wrote:
Hello Ramon, 

I'm currently doing my research on SDN, and I am interested in creating a fully wireless topology. Still, I have some roadblocks I need to know how or even if it's possible to resolve. 
This is my topology.  
<Screenshot from 2023-04-20 16-10-44.png>

I've tried using cls=mesh, like in your mesh example (mininet-wifi/examples/mesh.py)
But when using class mesh, I understand you cannot link APs directly but will connect what is on the range; this solution does not work for me as my SDN controller does not record the throughput properly. 
I've also tried creating the interfaces into the code, like the following.  

ap4 = net.addAccessPoint('ap2', wlans=4, ssid=['ssid1','ssid2','ssid3','ssid4'], mode='g', channel='1')

But when running, the interfaces are created but not used amongst the other APs, according to Wireshark. 


Ive also used MiniEdit in which there is this option of Wifi-direct 

<Screenshot from 2023-04-20 16-27-22.png>


but when running on the script seems like its not possible to use with wifi-direct.
<Screenshot from 2023-04-20 16-28-23.png>


I've searched the mailing list but cannot find what I need. Is there any way to configure the interfaces connection between AP-AP so it could be ap1-wlan2:ap2-wlan2

I know Im missing something, and my knowledge might not be enough. Can you help me point out what I am missing? Or if what I want to do is possible? 

Let me know your thoughts if there is any missing information or anything confusing, I'm glad to post more detail! 

Thank you very much for your time. 

--

Tere tr

unread,
Apr 24, 2023, 2:33:07 AM4/24/23
to mininet-wifi-discuss
Hello Ramon, 
I've implemented the solution mentioned but there are some rules the 4address needs to comply with and I'm concerned if my topology can match. 

I understand that using this kind of 4address link means the following rules:
1. Linking with cls=_4address means one AP becomes AP, and the other AP becomes Client
2. An AP can have several connections once that AP is the AP and not Client
3. An AP cannot become a client twice (from two links)

net.addLink(ap1, ap2, cls=_4address) # ap1=ap, ap2=client

Also, an access point cannot be Client and AP simultaneously for different connections; as you see in the topology I want to create, there are several redundant links.
But I would like to know more: 
Do you know if my deductions on the 4address are accurate? 
Is it possible to create redundant links from it? Cause everytime I don't follow those rules, I get the  error

c0c4a1e2-1b89-4ed2-9117-ec711778ee16.png
9e4c0ddc-9b05-4e0e-8238-4bf71b33c5d5.png

#!/usr/bin/env python

"""This example shows how to enable 4-address
Warning: It works only when network manager is stopped"""

import sys

from mininet.node import RemoteController
from mininet.log import setLogLevel, info
from mn_wifi.link import wmediumd, _4address
from mn_wifi.cli import CLI
from mn_wifi.net import Mininet_wifi
from mn_wifi.wmediumdConnector import interference


def topology(args):
"Create a network."
net = Mininet_wifi(controller=RemoteController, link=wmediumd,
wmediumd_mode=interference, config4addr=True)

info("*** Creating nodes\n")
ap1 = net.addAccessPoint('ap1', ssid="ap1-ssid", mode="g",channel="1", position='-200,100,0')
ap2 = net.addAccessPoint('ap2', ssid="ap2-ssid", mode="g",channel="1", position='-100,200,0')
ap3 = net.addAccessPoint('ap3', ssid="ap3-ssid", mode="g",channel="1", position='-100,0,0')
ap4 = net.addAccessPoint('ap4', ssid="ap4-ssid", mode="g",channel="1", position='100,200,0')
ap5 = net.addAccessPoint('ap5', ssid="ap5-ssid", mode="g",channel="1", position='100,0,0')
ap6 = net.addAccessPoint('ap6', ssid="ap6-ssid", mode="g",channel="1", position='200,100,0')
sta1 = net.addStation('sta1', ip="192.168.0.1/24", position='-200,80,0')
sta3 = net.addStation('sta3', ip="192.168.0.3/24", position='-100,-15,0')
sta6 = net.addStation('sta6', ip="192.168.0.6/24", position='200,73,0')

c0 = net.addController('c0',controller=RemoteController, ip='127.0.0.1',port=6633)
info("*** Configuring Propagation Model\n")
net.setPropagationModel(model="logDistance", exp=4.5)

info("*** Configuring nodes\n")
net.configureNodes()

info("*** Adding Links\n")
net.addLink(ap1,ap2, cls=_4address)
net.addLink(ap1,ap3, cls=_4address)
net.addLink(ap3,ap5, cls=_4address)
net.addLink(ap6,ap5, cls=_4address)
net.addLink(ap6,ap4, cls=_4address)
#net.addLink(ap2,ap3, cls=_4address)
#net.addLink(ap2,ap5, cls=_4address)
#net.addLink(ap2,ap4, cls=_4address)
#net.addLink(ap3,ap4, cls=_4address)
#net.addLink(ap4,ap5, cls=_4address)

net.addLink(ap1,sta1)
net.addLink(ap3,sta3)
net.addLink(ap6,sta6)


# if '-p' not in args:
# net.plotGraph(min_x=-600, min_y=-600, max_x=600, max_y=600)

info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
ap2.start([c0])
ap3.start([c0])
ap4.start([c0])
ap5.start([c0])
ap6.start([c0])

info("*** Running CLI\n")
CLI(net)

info("*** Stopping network\n")
net.stop()


if __name__ == '__main__':
setLogLevel('info')
topology(sys.argv)



Thanks again for sharing your knowledge with all of us in the group! 

Ramon Fontes

unread,
Apr 24, 2023, 5:46:52 AM4/24/23
to Tere tr, mininet-wifi-discuss
> 3. An AP cannot become a client twice (from two links)

Not sure what do you mean with this.


Also, an access point cannot be Client and AP simultaneously for different connections

Do you mean one interface working on master/managed mode simultaneously?? I'm getting confused.

I think those questions are not related to mn-wifi. If you have questions for a specific technology I suggest you to go through appropriate sites.

Sent from my android

Tere tr

unread,
Apr 25, 2023, 5:41:28 AM4/25/23
to mininet-wifi-discuss
Hello Ramon, 

Apologize if my explanation was not clear; what I'm asking, in a nutshell, is, why if in your code: 


when I try to link 
net.addLink(ap2, ap3, cls=_4address) 

I am getting this error saying '4address' object has no attribute 'Intf1'

Is there something I'm missing? Why is it not possible?

Screenshot from 2023-04-25 18-32-18.png

Screenshot from 2023-04-25 18-25-56.png

Thanks again for taking the time to answer my questions. :)

Ramon Fontes

unread,
Apr 25, 2023, 8:21:04 AM4/25/23
to Tere tr, mininet-wifi-discuss
https://github.com/intrig-unicamp/mininet-wifi/commit/59ee17a42f4fa95b1977c1faeca5171335ee6f65 solves the issue. Please do a "git pull" and "sudo make install"

Tere tr

unread,
Apr 26, 2023, 4:16:32 AM4/26/23
to mininet-wifi-discuss
Hi Ramon, 
Thank you so much for the update. This pull works wonders now. 

I really appreciate the time and effort you put into editing the code. While creating my topology, I noticed that none of the stations could ping sta5 and sta6. Is there any limitation on how many links/APs/stations we can have while using 4address?
Is it something I am missing? 



Screenshot from 2023-04-26 17-12-13.png

#!/usr/bin/env python

"""This example shows how to enable 4-address
Warning: It works only when network manager is stopped"""

import sys

from mininet.node import RemoteController
from mininet.log import setLogLevel, info
from mn_wifi.link import wmediumd, _4address
from mn_wifi.cli import CLI
from mn_wifi.net import Mininet_wifi
from mn_wifi.wmediumdConnector import interference


def topology(args):
"Create a network."
net = Mininet_wifi(controller=RemoteController, link=wmediumd,
wmediumd_mode=interference, config4addr=True)

info("*** Creating nodes\n")

ap1 = net.addAccessPoint('ap1', position='-20,10,0', ssid='ap1-ssid', mode='g', channel='1')
ap2 = net.addAccessPoint('ap2', position='-10,20,0', ssid='ap2-ssid', mode='g', channel='1')
ap3 = net.addAccessPoint('ap3', position='-10,0,0', ssid='ap3-ssid', mode='g', channel='1')
ap4 = net.addAccessPoint('ap4', position='10,20,0', ssid='ap4-ssid', mode='g', channel='1')
ap5 = net.addAccessPoint('ap5', position='10,0,0', ssid='ap5-ssid', mode='g', channel='1')
ap6 = net.addAccessPoint('ap6', position='20,10,0',ssid='ap6-ssid', mode='g', channel='1')
sta1 = net.addStation('sta1', ip='10.0.0.11', position='-20,0,0')
sta2 = net.addStation('sta2', ip='10.0.0.22', position='-10,30,0')
sta3 = net.addStation('sta3', ip='10.0.0.33', position='-10,-10,0')
sta4 = net.addStation('sta4', ip='10.0.0.44', position='10,30,0')
sta5 = net.addStation('sta5', ip='10.0.0.55', position='10,-10,0')
sta6 = net.addStation('sta6', ip='10.0.0.66', position='20,0,0')

c0 = net.addController('c0',controller=RemoteController, ip='127.0.0.1',port=6633)
info("*** Configuring Propagation Model\n")
net.setPropagationModel(model="logDistance", exp=4.5)

info("*** Configuring nodes\n")
net.configureNodes()

info("*** Adding Links\n")
net.addLink(ap1,ap2, cls=_4address)
net.addLink(ap1,ap3, cls=_4address)
net.addLink(ap2,ap3, cls=_4address)
net.addLink(ap2,ap5, cls=_4address)
net.addLink(ap2,ap4, cls=_4address)
net.addLink(ap3,ap5, cls=_4address)
net.addLink(ap3,ap4, cls=_4address)
net.addLink(ap4,ap5, cls=_4address)
net.addLink(ap4,ap6, cls=_4address)
net.addLink(ap6,ap5, cls=_4address)

net.addLink(ap1,sta1)
net.addLink(ap2,sta2)
net.addLink(ap3,sta3)
net.addLink(ap4,sta4)
net.addLink(ap5,sta5)
net.addLink(ap6,sta6)

if '-p' not in args:
net.plotGraph(min_x=-60, min_y=-50, max_x=80, max_y=100)
info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
ap2.start([c0])
ap3.start([c0])
ap4.start([c0])
ap5.start([c0])
ap6.start([c0])
info("*** Running CLI\n")
CLI(net)

info("*** Stopping network\n")
net.stop()


if __name__ == '__main__':
setLogLevel('info')
topology(sys.argv)

Ramon Fontes

unread,
Apr 26, 2023, 5:11:34 AM4/26/23
to Tere tr, mininet-wifi-discuss
I think this needs a further investigation from your end.

Sent from my android

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.

Tere tr

unread,
Apr 26, 2023, 5:19:29 AM4/26/23
to mininet-wifi-discuss
Understood, no worries. Thank you very much so far for your help! 

Tere tr

unread,
May 4, 2023, 8:48:32 AM5/4/23
to mininet-wifi-discuss
Hi Ramon, 
I have a question regarding the mesh network, 
Does adding cls=mesh to the links makes my network use IEEE 802.11s WLAN Mesh Networks standard?
because if I go to the link.py file there are specifics for other standards but not for 802.11s. 

I'm wondering because 802.11s has this  "Hybrid Wireless Mesh Protocol" which is the basic routing protocol for a wireless mesh network. but I don't know if using a mesh network mininet wifi also replicates this routing protocol behavior as it normally does in real life. 

let me know your thoughts! 

Capture.PNG

Ramon Fontes

unread,
May 4, 2023, 9:29:32 AM5/4/23
to Tere tr, mininet-wifi-discuss
> Does adding cls=mesh to the links makes my network use IEEE 802.11s WLAN Mesh Networks standard?

Tere tr

unread,
May 6, 2023, 5:16:00 AM5/6/23
to mininet-wifi-discuss
Thank you this was exactly what I was looking for!

Tere tr

unread,
May 23, 2023, 5:46:49 AM5/23/23
to mininet-wifi-discuss
Hello Ramon, 
I was wondering about this implementation of 4address, 
I have the following topology: 
Screenshot from 2023-05-23 18-28-45.png
with this links: 
info("*** Adding Links\n")

net.addLink(ap2,sta2)
net.addLink(ap3,sta3)
net.addLink(ap4,sta4)
net.addLink(ap3 ,ap2 , cls=_4address)
net.addLink(ap2 ,ap4 , cls=_4address)

but, when I do net command, it shows me the interfaces created but inside each one of the access points, the interfaces wlanX.staX are not showing. 
That is an issue when mapping the flow entries as these interfaces do not have a port number.  (attaching a diagram to simplify my explanation.) 

What am wondering is, is this common behavior of 4address? is there anything in mininet-wifi to mitigate the missing interfaces? 

Screenshot from 2023-05-23 18-30-26.png
but 

research topo - Page 1 (16).png

Screenshot from 2023-05-23 18-32-29.png
Screenshot from 2023-05-23 18-37-28.png

Ramon Fontes

unread,
May 23, 2023, 6:22:51 AM5/23/23
to Tere tr, mininet-wifi-discuss
> What am wondering is, is this common behavior of 4address? is there anything in mininet-wifi to mitigate the missing interfaces? 

AFAIK, it only occurs when NM is running.

Tere tr

unread,
May 24, 2023, 10:43:38 PM5/24/23
to mininet-wifi-discuss
No, this also happens when Network Manager is down. 

Tere tr

unread,
May 24, 2023, 10:55:37 PM5/24/23
to mininet-wifi-discuss
I just wanted to be really sure before replying, but yes, this happens even when Network Manager is down.

file.jpg

 

Tere tr

unread,
May 25, 2023, 4:40:26 AM5/25/23
to mininet-wifi-discuss
The interesting thing that I see is that on the node, the interfaces are created but they are partially created the interfaces in the ovs-ofctl interfaces along with its ports

In this example I created the links like this. 
info("*** Adding Links\n")

net.addLink(ap2,sta2)
net.addLink(ap3,sta3)
net.addLink(ap4,sta4)
net.addLink(ap2 ,ap4 , cls=_4address)
net.addLink(ap3 ,ap2 , cls=_4address)


And obtained the results here, missing one interface. I noticed, sometimes this happens only with the first .staX is created. 

meaning apX-wlan1.staX, in this case ap3-wlan1.sta2 is missing.
file.jpg

Reply all
Reply to author
Forward
0 new messages