Mininet-WiFi car1-wlan0 Link Down in VirtualBox Environment

10 views
Skip to first unread message

Wang Rui Xing

unread,
Feb 2, 2026, 3:56:41 AMFeb 2
to mininet-wifi-discuss
Dear Mr Ramon,

I ran this code on a native Ubuntu host and it worked perfectly. However, when I ran the exact same code inside a VirtualBox virtual machine, the car1-wlan0 link failed to come UP (it remains in a DOWN/NO-CARRIER state)." I have already tested it using the points mentioned below but the error is existing. Can you please give me idea or solution the problem?

Best Regards,
Aung Aung
  • Range & Propagation: Increased AP/Station range to 150m and moved the propagation model declaration before net.build().

  • Manual Interface Control: Used ip link set up and ifconfig commands both in the script and CLI to force the interface "UP."

  • Manual Association: Attempted to force connection using iw dev connect and iwconfig essid commands.

  • WPA Supplicant: Created a custom /tmp/car1.conf and ran the wpa_supplicant daemon in the background.

  • Wmediumd & Interference: Disabled wmediumd and interference mode to reduce CPU overhead and driver instability.

  • Controller Isolation: Tested with both simple_switch_13 and a custom Blockchain controller to check for Packet-In messages.

  • Virtualization Settings: Set VirtualBox acceleration to KVM and disabled the Ubuntu network-manager service.

  • Topology Logic: Used ac_method='manual' and net.addLink(car1, ap1) to treat the wireless link as a static software bridge.



Error ------------------
mininet-wifi> car1 ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
162: car1-wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:33 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.3/24 brd 10.0.0.255 scope global car1-wlan0
       valid_lft forever preferred_lft forever
    inet6 2001::1/64 scope global tentative
       valid_lft forever preferred_lft forever
mininet-wifi> car1 iw dev car1-wlan0 link
Not connected.

================================================================
That is my mininet-wifi python code file.

#!/usr/bin/env python3

import sys
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):

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

    info("*** Creating nodes\n")

    # OpenFlow Switch
    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')

    # Access Points (NO WPA – blockchain handles auth)
    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'
    )

    # Mobile Node (Vehicle)
    car1 = net.addStation(
        'car1',
        mac='00:00:00:00:00:33',
        ip='10.0.0.3/24',
        range=30,
        position='10,50,0'
    )

    # Ryu Controller (OpenFlow 1.3 default port)
    ryu = net.addController(
        'ryu',
        controller=RemoteController,
        ip='127.0.0.1',
        port=6653
    )

    info("*** Configuring nodes\n")
    net.configureNodes()

    info("*** Creating links\n")
    net.addLink(ap1, s1)
    net.addLink(ap2, s1)
    net.addLink(s1, server)


    info("*** Setting propagation model\n")
    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("*** Configuring mobility\n")
    net.startMobility(time=0)

    net.mobility(
        car1,
        'start',
        time=30,
        position='10,50,0'
    )

    net.mobility(
        car1,
        'stop',
        time=90,
        position='400,50,0'
    )

    net.stopMobility(time=91)

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


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

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


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

Ramon Fontes

unread,
Feb 2, 2026, 6:27:58 AMFeb 2
to Wang Rui Xing, mininet-wifi-discuss
Hi Aung Aung,

You may want to run the code with debug logging enabled to better
understand what is going wrong. At first glance, the issue may be
related to a missing package or the generic kernel version used by the
VM.

--
Ramon Fontes

Em seg., 2 de fev. de 2026 às 05:56, Wang Rui Xing
<aungsanli...@gmail.com> escreveu:
> --
> 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/0037159a-a849-4225-b33b-e96eb0580f17n%40googlegroups.com.

Wang Rui Xing

unread,
Feb 2, 2026, 9:09:47 AMFeb 2
to mininet-wifi-discuss
Dear Mr Ramon,

Thank you, sir! I forgot to check the debug logs earlier. I found the main issue was 'bash: hostapd: command not found.' After installing the package, the issue was completely resolved. It's working perfectly now.

Best Regards,
Aung Aung
Reply all
Reply to author
Forward
0 new messages