intrig-unicamp / mininet-wifi

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

Channel changing issue with APs #343

Closed aramhong closed 3 years ago

aramhong commented 3 years ago

Hello,

I appreciate a good simulator always.

I'm testing several frequencies using channel changing,

The 2GHz bands (channel 1~10) work really well, however, 5GHz bands(36~185) doesn't work.

I've tried both commands and .py file, building network is okay but 'pingall' lost 100%.

Especially, when I put 5GHz channel into ap, iwconfig says "ESSID:off/any" in ap1-wlan1, and the same in ap2, ap3.

I have no idea how to make this work.

ramonfontes commented 3 years ago

Can you run the command in debug mode sudo mn --wifi --mode=n --freq=5 --channel=36 -v debug?

It works:

mininet-wifi> sta1 iw dev sta1-wlan0 scan
*** errRun: ['stty', '-icanon', 'min', '1'] 
  0BSS 02:00:00:00:02:00(on sta1-wlan0) -- associated
    last seen: 2031.488s [boottime]
    TSF: 1605150304427359 usec (18578d, 03:05:04)
    freq: 5180
    beacon interval: 100 TUs
    capability: ESS (0x0001)
    signal: -36.00 dBm
    last seen: 0 ms ago
    Information elements from Probe Response frame:
    SSID: my-ssid
    Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 
    DS Parameter set: channel 36
    Supported operating classes:
         * current operating class: 115
    HT capabilities:
        Capabilities: 0x0c
            HT20
            SM Power Save disabled
            No RX STBC
            Max AMSDU length: 3839 bytes
            No DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 8 usec (0x06)
        HT TX/RX MCS rate indexes supported: 0-15
    HT operation:
         * primary channel: 36
         * secondary channel offset: no secondary
         * STA channel width: 20 MHz
         * RIFS: 0
         * HT protection: no
         * non-GF present: 0
         * OBSS non-GF present: 0
         * dual beacon: 0
         * dual CTS protection: 0
         * STBC beacon: 0
         * L-SIG TXOP Prot: 0
         * PCO active: 0
         * PCO phase: 0
    Extended capabilities:
         * Extended Channel Switching
         * Multiple BSSID
         * SSID List
         * Operating Mode Notification
    WMM:     * Parameter version 1
         * BE: CW 15-1023, AIFSN 3
         * BK: CW 15-1023, AIFSN 7
         * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
         * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
mininet-wifi> sta1 ping -c1 sta2
_popen ['mnexec', '-da', '13232', 'ip', 'addr', 'show', 'sta2-wlan0'] 13690*** errRun: ['stty', '-icanon', 'min', '1'] 
  0PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.198 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.198/0.198/0.198/0.000 ms

Results from hostapd:

*** ap1 : ("echo 'interface=ap1-wlan1\ndriver=nl80211\nssid=my-ssid\nwds_sta=1\nhw_mode=a\nchannel=36\nwmm_enabled=1\nieee80211n=1\nctrl_interface=/var/run/hostapd\nctrl_interface_group=0' > mn13214_ap1-wlan1.apconf",)
> > > > > > > > > *** ap1 : ('hostapd -B mn13214_ap1-wlan1.apconf ',)
Configuration file: mn13214_ap1-wlan1.apconf
Using interface ap1-wlan1 with hwaddr 02:00:00:00:02:00 and ssid "my-ssid"
ap1-wlan1: interface state UNINITIALIZED->ENABLED
ap1-wlan1: AP-ENABLED

ps: you may have to stop network manager.

aramhong commented 3 years ago

Thanks, Dr.Ramons. It works in debug mode.