TCP doesn't work

17 views
Skip to first unread message

University Mail

unread,
May 29, 2025, 4:59:21 AMMay 29
to mininet-wifi-discuss
Dear All, 

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 MN, iperf -c 2001:20::2 -b 3M -t 200 -V
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)

 

Ramon Fontes

unread,
May 29, 2025, 7:39:47 AMMay 29
to University Mail, mininet-wifi-discuss
Please take a look at the control plane, especially the flow timeout settings. We've already discussed this extensively here.

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mininet-wifi-discuss/ba21cfa6-538f-4952-8e3b-2aa2ffdc2c34n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages