intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

Mesh link between APs #486

Closed wangxichn closed 1 year ago

wangxichn commented 1 year ago

Hi, I have used meshAP.py example. But It doesn't work. It seems that packets do not cross the wireless link between ap1-mp2 and ap2-mp2 Any idea on how to solve this problem?

''' xi@xi-verdesk:~/mininet-wifi/examples$ sudo python meshAP.py Creating nodes Configuring nodes Connecting to wmediumd server /var/run/wmediumd.sock Associating Stations Starting network Running CLI *** Starting CLI: mininet-wifi> sta1 ping sta2 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. From 10.0.0.1 icmp_seq=1 Destination Host Unreachable From 10.0.0.1 icmp_seq=2 Destination Host Unreachable From 10.0.0.1 icmp_seq=3 Destination Host Unreachable From 10.0.0.1 icmp_seq=4 Destination Host Unreachable From 10.0.0.1 icmp_seq=5 Destination Host Unreachable From 10.0.0.1 icmp_seq=6 Destination Host Unreachable From 10.0.0.1 icmp_seq=7 Destination Host Unreachable From 10.0.0.1 icmp_seq=8 Destination Host Unreachable From 10.0.0.1 icmp_seq=9 Destination Host Unreachable ^C --- 10.0.0.2 ping statistics --- 11 packets transmitted, 0 received, +9 errors, 100% packet loss, time 10234ms pipe 4 mininet-wifi> net c0 sta1 sta1-wlan0:wifi sta2 sta2-wlan0:wifi ap1 lo: ap1-wlan1:wifi ap1-mp2:wifiMesh ap2 lo: ap2-wlan1:wifi ap2-mp2:wifiMesh mininet-wifi>

'''

Regards, XiWang

wangxichn commented 1 year ago

Other examples are normal, even mesh.py. Only the meshAP.py example has problem. I can't find the reason. :-(

ramonfontes commented 1 year ago

This seems a bug with either iw or Linux Kernel. I have to check it out.

Steps to reproduce the behavior:

sudo mn --wifi

mininet-wifi> sta1 iw dev sta1-wlan0 interface add sta1-mp0 type mp
mininet-wifi> sta1 iw dev sta1-mp0 info
Interface sta1-mp0
    ifindex 2
    wdev 0x1900000002
    addr 42:00:00:00:00:00
    type mesh point
    wiphy 25
    txpower 14.00 dBm

Mesh Interface has been created. However, when the interface is on master mode:

mininet-wifi> ap1 iw dev ap1-wlan1 interface add ap1-mp0 type mp
mininet-wifi> ap1 iw dev ap1-mp0 info
Interface ap1-mp0
    ifindex 63
    wdev 0x1b00000002
    addr fe:fe:c9:96:47:55
    type managed
    wiphy 27
    txpower 12.00 dBm

We cannot observe the same and a managed interface is created instead.

ramonfontes commented 1 year ago

It works if you stop the network manager service.

wangxichn commented 1 year ago

Yes, when I closed the manager service like sudo service network-manager stop, it works! Thanks a lot!