intrig-unicamp / mininet-wifi

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

Not able to record pings during handover scenario #351

Closed flatmarstheory closed 2 years ago

flatmarstheory commented 3 years ago

I am having problems with recording pings. Following is my scenario.

#!/usr/bin/python
import sys

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

def topology(plot):
    net = Mininet_wifi(controller=Controller, accessPoint=UserAP,
                       link=wmediumd, wmediumd_mode=interference)
    info("*** Creating nodes\n")

    ap1 = net.addAccessPoint('ap1', mac ='00:00:00:00:10:02', ssid='ap1', mode='b', channel='1',position='50,50,0',  passwd='xxx', encrypt='wpa2', failMode="standalone", range=25, txpower=9)

    ap2 = net.addAccessPoint('ap2', mac ='00:00:00:00:10:03', ssid='ap2', mode='b', channel='6',position='100,50,0',  passwd='xxx', encrypt='wpa2', failMode="standalone", range=25, txpower=9)

    ap3 = net.addAccessPoint('ap3', mac ='00:00:00:00:10:04', ssid='ap3', mode='b', channel='2',position='150,50,0',  passwd='xxx', encrypt='wpa2', failMode="standalone", range=25, txpower=9)

    ap4 = net.addAccessPoint('ap4', mac ='00:00:00:00:10:05', ssid='ap4', mode='b', channel='3',position='150,90,0',  passwd='xxx', encrypt='wpa2', failMode="standalone", range=25, txpower=9)

    sta1 = net.addStation('sta1', mac='00:00:00:00:00:02', passwd='xxx', encrypt='wpa2', ip='10.0.0.2/8', position='30,40,0', range=20, min_v=1, max_v=5, bgscan_threshold=-60, s_inverval=5, l_interval=10, bgscan_module="simple", txpower=5)

    sta2 = net.addStation('sta2', mac='00:00:00:00:00:03', passwd='xxx', encrypt='wpa2', ip='10.0.0.3/8', position='30,40,0', range=20, min_v=5, max_v=10, bgscan_threshold=-60, s_inverval=5, l_interval=10, bgscan_module="simple", txpower=5)

    sta3 = net.addStation('sta3', mac='00:00:00:00:00:04', passwd='xxx', encrypt='wpa2', ip='10.0.0.4/8', position='30,40,0', range=20, min_v=2, max_v=7, bgscan_threshold=-60, s_inverval=5, l_interval=10, bgscan_module="simple", txpower=5)

    sta4 = net.addStation('sta4', mac='00:00:00:00:00:05', passwd='xxx', encrypt='wpa2', ip='10.0.0.5/8', position='30,40,0', range=20, min_v=2, max_v=7, bgscan_threshold=-60, s_inverval=5, l_interval=10, bgscan_module="simple", txpower=5)

    c1 = net.addController('c1')

    net.setPropagationModel(model="logDistance", exp=5)

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

    net.addLink(ap1, sta1)
    net.addLink(ap1, sta2)
    net.addLink(ap1, sta3)
    net.addLink(ap1, sta4)

    net.addLink(ap2, sta1)
    net.addLink(ap2, sta2)
    net.addLink(ap2, sta3)
    net.addLink(ap2, sta4)

    net.addLink(ap3, sta1)
    net.addLink(ap3, sta2)
    net.addLink(ap3, sta3)
    net.addLink(ap3, sta4)

    net.addLink(ap4, sta1)
    net.addLink(ap4, sta2)
    net.addLink(ap4, sta3)
    net.addLink(ap4, sta4)

    net.addLink(ap1, ap2)
    net.addLink(ap2, ap3)
    net.addLink(ap3, ap4)

    net.plotGraph(min_x=0, min_y=0, max_x=200, max_y=200)

    net.startMobility(time=0)

    net.mobility(sta1, 'start', time=10, position='30,40,0')
    net.mobility(sta1, 'stop', time=20, position='100,40,0')

    net.mobility(sta2, 'start', time=15, position='30,40,0')
    net.mobility(sta2, 'stop', time=21, position='150,60,0')

    net.mobility(sta3, 'start', time=16, position='30,40,0')
    net.mobility(sta3, 'stop', time=22, position='150,100,0')

    net.mobility(sta4, 'start', time=3, position='30,40,0')
    net.mobility(sta4, 'stop', time=10, position='50,100,0')

    net.stopMobility(time=23)

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

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

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

if __name__ == '__main__':
    setLogLevel('info')
    plot = False if '-p' in sys.argv else True
    topology(plot)
ramonfontes commented 3 years ago

Sorry?? What is the issue here??

flatmarstheory commented 3 years ago

Sorry?? What is the issue here??

The issue is that handover is not able to ICMP using WPA2 encryption. Without encryption, handover is working.

ramonfontes commented 3 years ago

Is not able to ICMP? Did you install BOFUSS??

ramonfontes commented 2 years ago

Closing due to inactivity