Ignore the previous one please.
I found the problem, but It's more confusing now.
I want to connect ap1-ap3 separelty from ap1-ap2, this is why I want to use (port1=2, port2=1) to setup wlan3 to be used as the manager for this ap1-ap3 connection.
It seems that this is not an allowed behavior to have in one ap two managers.
Is it from mininet-wifi code? Because I don't see anything that prevent it from IW.
def myNetwork():
net = Mininet_wifi(link=wmediumd,
wmediumd_mode=interference,
autoSetMacs=True, config4addr=True,
ipBase='
10.0.0.0/8')
info('*** Adding controller\n')
c0 = net.addController(name='c0',
controller=RemoteController,
ip='172.17.0.2',
protocol='tcp',
port=6653)
info('*** Add switches/APs\n')
ap_configs = dict(protocols="OpenFlow13", cls=OVSKernelAP, ssid='ap1-ssid', channel='1', mode='g')
ap1 = net.addAccessPoint('ap1', ssid='ap1-ssid', position='505.0,390.0,0', wlans=3, **ap_configs)
ap2 = net.addAccessPoint('ap2', ssid='ap2-ssid', position='750.0,383.0,0', wlans=2, **ap_configs)
ap3 = net.addAccessPoint('ap3', ssid='ap3-ssid', position='632.0,602.0,0', wlans=2, **ap_configs)
info('*** Add hosts/stations\n')
sta1 = net.addStation('sta1', ip='10.0.0.1', position='329.0,212.0,0', range=120)
sta2 = net.addStation('sta2', ip='10.0.0.2', position='931.0,239.0,0', range=120)
sta3 = net.addStation('sta3', ip='10.0.0.3', position='627.0,836.0,0', range=120)
info("*** Configuring Propagation Model\n")
net.setPropagationModel(model="logDistance", exp=3)
info("*** Configuring wifi nodes\n")
net.configureWifiNodes()
net.addLink(ap1, ap2, cls=_4address, port1=1, port2=1)
net.addLink(ap1, ap3, cls=_4address, port1=1, port2=1)
info('*** Add links\n')
net.plotGraph(max_x=1500, max_y=1500)
info('*** Starting network\n')
net.build()
info('*** Starting controllers\n')
for controller in net.controllers:
controller.start()
info('*** Starting switches/APs\n')
net.get('ap1').start([c0])
net.get('ap2').start([c0])
net.get('ap3').start([c0])
info('*** Post configure nodes\n')
CLI(net)
net.stop()