This is my simple topology. I tested TCP between the MN and CN. However, when the MN moves between APs, the TCP connection doesn't work. Please suggest how I can restore TCP traffic.
TCP test command at CN side, iperf -s -i 1 -V
#!/usr/bin/env python
import sys
from mininet.node import RemoteController
from mininet.link import TCLink
from mininet.log import setLogLevel, info
from
mn_wifi.net import Mininet_wifi
from mn_wifi.cli import CLI
from mn_wifi.node import OVSKernelAP
from mn_wifi.link import wmediumd
from mn_wifi.wmediumdConnector import interference
def topology(args):
net = Mininet_wifi(controller=RemoteController, link=wmediumd, wmediumd_mode=interference, accessPoint=OVSKernelAP)
info("*** Creating nodes\n")
mn = net.addStation('mn', ip='2001:10::2/64', position='0,0,0')
cn = net.addHost('cn', ip='2001:20::2/64')
r1 = net.addHost('r1')
ap1 = net.addAccessPoint('ap1', ssid='ap1-ssid', mode='g', channel='1', range=60, position='50,50,0')
ap2 = net.addAccessPoint('ap2', ssid='ap2-ssid', mode='g', channel='6', range=60, position='150,50,0')
ap3 = net.addAccessPoint('ap3', ssid='ap3-ssid', mode='g', channel='11', range=60, position='250,50,0')
s1 = net.addSwitch('s1')
c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1', port=6633)
info("*** Configuring WiFi nodes\n")
net.configureWifiNodes()
info("*** Creating links\n")
net.addLink(ap1, s1)
net.addLink(ap2, s1)
net.addLink(ap3, s1)
net.addLink(s1, r1, intfName2='r1-eth0')
net.addLink(r1, cn, intfName1='r1-eth1')
info("*** Configuring propagation model\n")
net.setPropagationModel(model="logDistance", exp=4.5)
if '-p' not in args:
net.plotGraph(min_x=0, max_x=300, min_y=0, max_y=100)
info("*** Configuring mobility\n")
net.startMobility(time=0)
if '-c' not in args:
net.mobility(mn, 'start', time=10, position='10,50,0')
net.mobility(mn, 'stop', time=110, position='270,50,0')
net.stopMobility(time=111)
info("*** Starting network\n")
net.build()
c0.start()
s1.start([c0])
ap1.start([c0])
ap2.start([c0])
ap3.start([c0])
info("*** Configuring interfaces\n")
# Router R1
r1.cmd('sysctl -w net.ipv6.conf.all.forwarding=1')
r1.cmd('ip -6 addr add 2001:10::1/64 dev r1-eth0')
r1.cmd('ip -6 addr add 2001:20::1/64 dev r1-eth1')
r1.cmd('ip link set r1-eth0 up')
r1.cmd('ip link set r1-eth1 up')
# CN
cn.cmd('ip addr add 2001:20::2/64 dev cn-eth0')
cn.cmd('ip -6 route add default via 2001:20::1 dev cn-eth0')
# MN
mn.cmd('ip addr add 2001:10::2/64 dev mn-wlan0')
mn.cmd('ip -6 addr del 2001::1/64 dev mn-wlan0')
mn.cmd('ip -6 route add default via 2001:10::1 dev mn-wlan0')
info("*** Setup complete. Test with ping6 or iperf\n")
CLI(net)
info("*** Stopping network\n")
net.stop()
if __name__ == '__main__':
setLogLevel('info')
topology(sys.argv)