why is there no traffic in between nodes using mesh links?

115 views
Skip to first unread message

Tere tr

unread,
Apr 11, 2024, 5:12:34 AM4/11/24
to mininet-wifi-discuss
Can someone explain me why is it that when I do a ping from sta3 to sta6, and I check for the wireshark packet capture in ap4 and ap5 interfaces, there is no traffic? Is this a behaviour of mininet-wifi's mesh link? 
Also if I try using the mininet-wifi's controller as: 
c0 = net.addController('c0')
Its the same thing, I cannot track each hop. 
Screenshot from 2024-04-11 14-46-35.png



This is my code: 

#!/usr/bin/env python

"""
10Aps connected to 7APs
"""

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
import time


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 APs\n")
ap1 = net.addAccessPoint('ap1', ssid='ssid1', wlans=2, position='-45,40,0', mac='00:00:00:00:11:11')
ap3 = net.addAccessPoint('ap3', ssid='ssid3', wlans=2, position='-40,0,0', mac='00:00:00:00:33:33')
ap4 = net.addAccessPoint('ap4', ssid='ssid4', wlans=2, position='-1,8,0', mac='00:00:00:00:44:44')
ap5 = net.addAccessPoint('ap5', ssid='ssid5', wlans=2, position='37,0,0', mac='00:00:00:00:55:55')
ap6 = net.addAccessPoint('ap6', ssid='ssid6', wlans=2, position='77,0,0', mac='00:00:00:00:66:66')
info("*** creating stations\n")
sta1 = net.addStation('sta1', position='-67,70,0', ip='192.168.5.11/24', mac='00:00:00:00:00:11')
sta2 = net.addStation('sta2', position='14,74,0', ip='192.168.5.22/24', mac='00:00:00:00:00:22')
sta3 = net.addStation('sta3', position='-54,-21,0', ip='192.168.5.33/24', mac='00:00:00:00:00:33')
sta6 = net.addStation('sta6', position='100,0,0', ip='192.168.5.66/24', mac='00:00:00:00:00:66')


info("*** adding controller\n")
c0 = net.addController('c0',controller=RemoteController, ip='192.168.0.214',port=6633)
net.setPropagationModel(model="logDistance", exp=4.5)
info("*** Configuring nodes\n")
net.configureWifiNodes()

info("*** Associating Stations\n")

#Optional links

info("*** adding links\n")

net.addLink(ap1, intf='ap1-wlan2', cls=mesh, ssid='mesh-ssid')
net.addLink(ap3, intf='ap3-wlan2', cls=mesh, ssid='mesh-ssid')
net.addLink(ap4, intf='ap4-wlan2', cls=mesh, ssid='mesh-ssid')

net.addLink(ap5, intf='ap5-wlan2', cls=mesh, ssid='mesh-ssid')
net.addLink(ap6, intf='ap6-wlan2', cls=mesh, ssid='mesh-ssid')




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



info("*** plotting\n")
net.plotGraph(min_x=-100, min_y=-150, max_x=200, max_y=100)
info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
ap3.start([c0])
ap4.start([c0])
ap5.start([c0])
ap6.start([c0])
ap1.cmd("ifconfig ap1-wlan1 192.168.5.111 netmask 255.255.255.0")
ap3.cmd("ifconfig ap3-wlan1 192.168.5.133 netmask 255.255.255.0")
ap4.cmd("ifconfig ap4-wlan1 192.168.5.144 netmask 255.255.255.0")
ap5.cmd("ifconfig ap5-wlan1 192.168.5.155 netmask 255.255.255.0")
ap6.cmd("ifconfig ap6-wlan1 192.168.5.166 netmask 255.255.255.0")
time.sleep(5)


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

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


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






Thank you so much if anyone is reading this, any help can do, thank you! 

Ramon Fontes

unread,
Apr 11, 2024, 6:22:34 AM4/11/24
to Tere tr, mininet-wifi-discuss
> Is this a behaviour of mininet-wifi's mesh link? 

Of course it is not! If I were you, I would put on paper what you want to do, as I think there are some basic concepts of computer networks missing here. Mininet-WiFi will not solve communication problems if there are subnet configuration issues.

Tere tr

unread,
Apr 11, 2024, 7:15:11 AM4/11/24
to mininet-wifi-discuss
Thank you so much for your feedback; I used to have everything connected to 192.168.0.x but if I do that, it might go to my actual home router and route from there, so that's why I had to change to 192.168.5.x, so it does not interfere. 
These might be basic concepts but can you please point out what I am missing? 

Its so good to know that it's my issue and I'm doing something really stupid here.   


Screenshot from 2024-04-11 20-11-41.png

Ramon Fontes

unread,
Apr 11, 2024, 7:17:00 AM4/11/24
to Tere tr, mininet-wifi-discuss
APs have two network interfaces. What is the second subnet?

Tere tr

unread,
Apr 11, 2024, 8:24:36 AM4/11/24
to mininet-wifi-discuss
yes, Aps have two interfaces apX-wlan1 and apX-mp2

for apX-wlan1 I have this configuration 5.x
ap1.cmd("ifconfig ap1-wlan1 192.168.5.111 netmask 255.255.255.0")
ap3.cmd("ifconfig ap3-wlan1 192.168.5.133 netmask 255.255.255.0")
ap4.cmd("ifconfig ap4-wlan1 192.168.5.144 netmask 255.255.255.0")
ap5.cmd("ifconfig ap5-wlan1 192.168.5.155 netmask 255.255.255.0")
ap6.cmd("ifconfig ap6-wlan1 192.168.5.166 netmask 255.255.255.0")


for apX-mp2, I just now created this other configuration to be on different subnets. 6.x
ap1.cmd("ifconfig ap1-mp2 192.168.6.112 netmask 255.255.255.0")
ap3.cmd("ifconfig ap3-mp2 192.168.6.134 netmask 255.255.255.0")
ap4.cmd("ifconfig ap4-mp2 192.168.6.145 netmask 255.255.255.0")
ap5.cmd("ifconfig ap5-mp2 192.168.6.156 netmask 255.255.255.0")
ap6.cmd("ifconfig ap6-mp2 192.168.6.167 netmask 255.255.255.0")

Screenshot from 2024-04-11 20-53-02.png

Tere tr

unread,
Apr 11, 2024, 8:24:54 AM4/11/24
to mininet-wifi-discuss
Yes, Aps have two network interfaces apX-wlan1 and apX-mp2
for apX-wlan1I have  192.168.5.x
ap1.cmd("ifconfig ap1-wlan1 192.168.5.111 netmask 255.255.255.0")
ap3.cmd("ifconfig ap3-wlan1 192.168.5.133 netmask 255.255.255.0")
ap4.cmd("ifconfig ap4-wlan1 192.168.5.144 netmask 255.255.255.0")
ap5.cmd("ifconfig ap5-wlan1 192.168.5.155 netmask 255.255.255.0")
ap6.cmd("ifconfig ap6-wlan1 192.168.5.166 netmask 255.255.255.0")

for apX-mp2, I didn't configured any ips on my previous code, but I just added now 192.168.6.x

ap1.cmd("ifconfig ap1-mp2 192.168.6.112 netmask 255.255.255.0")
ap3.cmd("ifconfig ap3-mp2 192.168.6.134 netmask 255.255.255.0")
ap4.cmd("ifconfig ap4-mp2 192.168.6.145 netmask 255.255.255.0")
ap5.cmd("ifconfig ap5-mp2 192.168.6.156 netmask 255.255.255.0")
ap6.cmd("ifconfig ap6-mp2 192.168.6.167 netmask 255.255.255.0")




mininet-wifi> net
c0
c0
sta1 sta1-wlan0:wifi
sta2 sta2-wlan0:wifi
sta3 sta3-wlan0:wifi
sta6 sta6-wlan0:wifi
ap1 lo:  ap1-wlan1:wifi ap1-mp2:wifiMesh
ap3 lo:  ap3-wlan1:wifi ap3-mp2:wifiMesh
ap4 lo:  ap4-wlan1:wifi ap4-mp2:wifiMesh
ap5 lo:  ap5-wlan1:wifi ap5-mp2:wifiMesh
ap6 lo:  ap6-wlan1:wifi ap6-mp2:wifiMesh




El jueves, 11 de abril de 2024 a las 20:17:00 UTC+9, ramonre...@gmail.com escribió:

Tere tr

unread,
Apr 12, 2024, 4:38:16 AM4/12/24
to mininet-wifi-discuss
I find it really curious that even if I use your code meshAP.py

https://github.com/intrig-unicamp/mininet-wifi/blob/master/examples/meshAP.py

adding 2 more nodes in between 
pinging from sta1 to sta4 there is still no traffic on ap2 and ap3, and it is a successful ping. 
Screenshot from 2024-04-12 16-22-28.png

#!/usr/bin/env python

"""
This example shows on how to create wireless link between two APs with mesh
The wireless mesh network is based on IEEE 802.11s
"""

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 mn_wifi.wmediumdConnector import interference


def topology():
"Create a network."
net = Mininet_wifi(link=wmediumd, wmediumd_mode=interference)

info("*** Creating nodes\n")
sta1 = net.addStation('sta1', mac='00:00:00:00:00:11', position='1,1,0')
sta2 = net.addStation('sta2', mac='00:00:00:00:00:12', position='312,11,0')
ap1 = net.addAccessPoint('ap1', wlans=2, ssid='ssid1', position='10,10,0')
ap2 = net.addAccessPoint('ap2', wlans=2, ssid='ssid2', position='310,10,0')


sta3 = net.addStation('sta3', mac='00:00:00:00:00:13', position='592,11,0')
ap3 = net.addAccessPoint('ap3', wlans=2, ssid='ssid3', position='593,10,0')


sta4 = net.addStation('sta4', mac='00:00:00:00:00:14', position='870,11,0')
ap4 = net.addAccessPoint('ap4', wlans=2, ssid='ssid4', position='863,10,0')

c0 = net.addController('c0')

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

info("*** Associating Stations\n")
net.addLink(sta1, ap1)
net.addLink(sta2, ap2)
net.addLink(sta3, ap3)
net.addLink(sta4, ap4)
net.addLink(ap1, intf='ap1-wlan2', cls=mesh, ssid='mesh-ssid', channel=5)
net.addLink(ap2, intf='ap2-wlan2', cls=mesh, ssid='mesh-ssid', channel=5)
net.addLink(ap3, intf='ap3-wlan2', cls=mesh, ssid='mesh-ssid', channel=5)
net.addLink(ap4, intf='ap4-wlan2', cls=mesh, ssid='mesh-ssid', channel=5)

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

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

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


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

Ramon Fontes

unread,
Apr 12, 2024, 4:45:47 AM4/12/24
to Tere tr, mininet-wifi-discuss
Which interface are you looking for packets??

--
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/134403a5-c83b-4d2e-810e-1aede5c86944n%40googlegroups.com.

Tere tr

unread,
Apr 12, 2024, 5:12:55 AM4/12/24
to mininet-wifi-discuss
ap2-mp2 and ap3-mp2

Screenshot from 2024-04-12 18-07-09.png

Ramon Fontes

unread,
Apr 12, 2024, 5:54:45 AM4/12/24
to Tere tr, mininet-wifi-discuss
This is not the correct way for 802.11s. If you want to capture packets you have to create a monitor interface.

Tere tr

unread,
Apr 14, 2024, 6:10:44 AM4/14/24
to mininet-wifi-discuss
Why is that different than Wireshark or TCPdump? Because there is also no traffic using TCPDump. 

Ramon Fontes

unread,
Apr 14, 2024, 6:12:31 AM4/14/24
to Tere tr, mininet-wifi-discuss
Did you try the monitor interface???

--
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 15, 2024, 7:45:37 AM4/15/24
to mininet-wifi-discuss

Took me a while to do it, but yeah, it works; seems like I did it right cause now I can see the traffic I was looking for on Wireshark! 

For the ones who are having an issue with the same thing, I tried airmon-ng and also modifying the interface iwconfig apx-mp2 mode Monitor, but that would affect the behavior of my controller; in the end, I did: 

  • iw list to get the Wiphy
  • match it on iw dev with the wiphy index of the access point I wanted to monitor 
  • Then, create the monitoring interface with: iw phy mn115xxxx interface add monAp5 type monitor, and interface up.


Thank you so much Ramon, I'm really really grateful!

Ramon Fontes

unread,
Apr 15, 2024, 7:48:24 AM4/15/24
to Tere tr, mininet-wifi-discuss

Tere tr

unread,
Apr 15, 2024, 9:41:25 PM4/15/24
to mininet-wifi-discuss
due lack of knowledge, but it also works fine this way too, thanks!!!

Tere tr

unread,
May 1, 2024, 6:54:50 AM5/1/24
to mininet-wifi-discuss
Hello Ramon, 
Arent this mesh links supposed to be in mesh mode? 

Screenshot from 2024-05-01 19-36-33.png



Ramon Fontes

unread,
May 1, 2024, 6:55:41 AM5/1/24
to Tere tr, mininet-wifi-discuss
Is there mesh mode in Linux kernel?
Reply all
Reply to author
Forward
0 new messages