Inquiry regarding Mobility Awareness and Looping Issues in Mininet-WiFi Experiment

4 views
Skip to first unread message

Wang Rui Xing

unread,
Mar 10, 2026, 4:57:39 AM (2 days ago) Mar 10
to mininet-wifi-discuss

Dear Mr Ramon,

Currently conducting an experiment on Handover Signaling Overhead Measurement using Mininet-WiFi. I am reaching out to seek your guidance regarding a persistent mobility issue I encountered in my simulation.

Experiment Scenario:

  • Network Topology: 2 Access Points (each with a 200m range) and 1 Mobile Node (car1).

  • Simulation Duration: 400 seconds.

  • Mobility Path: A looping path from 0m to 400m (outbound) and 400m back to 0m (return).

  • Variable Speed: Testing from 2m/s up to 10m/s.

The Problem: Despite defining the mobility start and stop commands before the net.build() call and using net.is_reproducible = True, the mobile node (car1) consistently starts at the destination (400m position) and remains stationary throughout the simulation. It seems the node is only aware of the final position defined in the script or fails to initiate the movement thread from the 0m starting point.

My Current Code Structure:

#!/usr/bin/env python3

import sys
import time
from mininet.log import setLogLevel, info
from mininet.node import RemoteController, OVSSwitch
from mn_wifi.net import Mininet_wifi
from mn_wifi.link import wmediumd
from mn_wifi.cli import CLI
from mn_wifi.wmediumdConnector import interference

def topology(args):

    mobility_speed = 2  
    simulation_duration = 400
    distance = 400
    travel_time = int(distance / mobility_speed)

    info("*** Creating Mininet-WiFi network\n")
    net = Mininet_wifi(
        controller=RemoteController,
        switch=OVSSwitch,
        link=wmediumd,
        wmediumd_mode=interference
    )
   

    net.is_reproducible = True

    info("*** Creating nodes\n")
    s1 = net.addSwitch('s1', cls=OVSSwitch, protocols='OpenFlow13', position='200,100,0')
    server = net.addHost('server', ip='10.0.0.1/24', position='200,150,0')
    ap1 = net.addAccessPoint('ap1', ssid='ssid-ap1', mode='g', channel='1', range=100, position='100,50,0')
    ap2 = net.addAccessPoint('ap2', ssid='ssid-ap2', mode='g', channel='6', range=100, position='300,50,0')
   

    car1 = net.addStation('car1', mac='00:00:00:00:00:33', ip='10.0.0.3/24', range=30, position='0,50,0')
    ryu = net.addController('ryu', controller=RemoteController, ip='127.0.0.1', port=6653)

    info("*** Configuring nodes\n")
    net.configureNodes()
    net.addLink(ap1, s1)
    net.addLink(ap2, s1)
    net.addLink(s1, server)
    net.setPropagationModel(model='logDistance', exp=4.5)

    if '-p' not in args:
        net.plotGraph(min_x=-50, min_y=-50, max_x=500, max_y=150)


    info(f"*** Configuring Mobility Path: 0m -> 400m -> 0m ({mobility_speed} m/s)\n")
    net.startMobility(time=0)
   

    net.mobility(car1, 'start', time=1, position='0,50,0')
    net.mobility(car1, 'stop', time=1 + travel_time, position='400,50,0')
   

    net.mobility(car1, 'start', time=travel_time + 2, position='400,50,0')
    net.mobility(car1, 'stop', time=(travel_time * 2) + 2, position='0,50,0')

    net.stopMobility(time=simulation_duration)


    info("*** Starting network\n")
    net.build()
    ryu.start()
    ap1.start([ryu])
    ap2.start([ryu])
    s1.start([ryu])

    time.sleep(2)
    info("*** Starting Normal Ping (1 req/sec)\n")
    car1.cmd('ping -i 1 10.0.0.1 > ping_exp2_result_2ms.txt &')

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

if __name__ == '__main__':
    setLogLevel('info')
    topology(sys.argv)

Questions:

  1. Is there a specific reason why the node defaults to the destination position upon startup instead of following the scheduled mobility path?

  2. Is my understanding of the looping mobility concept correct for a 400s duration at 2m/s up to 10m/s, or is there a more efficient way to implement an "Out-and-Back" movement?

  3. Could you suggest a simple code snippet or a workaround to ensure the node reliably starts at 0m and completes the loop?

I have attached my full script for your reference. Any insights or suggestions to resolve this mobility awareness issue would be greatly appreciated.

Thank you for your time and for this great tool.

Best regards,

Aung Aung



Ramon Fontes

unread,
Mar 10, 2026, 6:08:55 AM (2 days ago) Mar 10
to Wang Rui Xing, mininet-wifi-discuss
Hi,

1. The car has a static position defined in:

car1 = net.addStation('car1', ..., position='0,50,0').

2. Yes, I think so.

3. The code you sent to us without the position parameter.

Regards,
Ramon Fontes




--
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/08a0be91-c694-4ea4-8228-aacfdbedff3cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages