Set up the Mininet network simulator

The easiest way to get started using the Mininet network simulator is to use the Mininet virtual machine. It is based on the Ubuntu Linux Server operating system and comes with all the software and tools required to support Mininet already installed. 

Mininet open-source network simulator running on an Apple iMac

The Mininet web site provides detailed setup notes, describing how to download and use the Mininet virtual machine. While I was following the procedure described in these notes, I found a few points where some more information would have been helpful. For my own reference, and to help anyone else who will install Mininet, I list the procedure I followed in the post, below.

SSH and X Server software

I set up the Mininet virtual machine on my Apple iMac computer. The Mac OS X operating system comes with SSH software but does not come with an X server already installed. You must install the XQuartz X server from http://xquartz.macosforge.org. See the Apple Support web sit for more details at: http://support.apple.com/kb/HT5293.

On the Linux desktop distributions, the SSH and X-server software are already available.

On a computer running Windows, you need to download and install the required SSH and X-server software (I recommend PuTTY and XMing).

Download the Mininet virtual machine

Download the Mininet virtual machine (VM) from http://mininet.org/download. I chose the latest version available, which was mininet-2.1.0-130919-ubuntu-13.04-server-amd64-ovf.zip. This file is a compressed ZIP archive containing two files so, after downloading it, decompress it and save the files to my hard drive.

To decompress the archive, double-click on the mininet-2.1.0-130919-ubuntu-13.04-server-amd64-ovf.zip file to automatically launch the archive application or use the following command in the terminal window:

$ tar -xvf mininet-2.1.0-130919-ubuntu-13.04-server-amd64-ovf.zip

This will create a folder named mininet-2.1.0-130919-ubuntu-13.04-server-amd64-ovf. The folder will contain the following files:

mininet-vm-x86_64.vmdk
mininet-2.1.0-130919-ubuntu-13.04-server-amd64.ovf

Import the virtual machine into VirtualBox

Next, create a version of the Mininet virtual machine that will run in VirtualBox by importing the Mininet virtual machine into the VirtualBox program

Start the VirtualBox manager application on your host system.

Install Mininet open-source network simulator

To import the Mininet virtual machine, use the VirtualBox menu command:

File → Import Appliance

In the next screen, click the “Open appliance” button.

Navigate to the folder containing the mininet-2.1.0-130919-ubuntu-13.04-server-amd64.ovf file and select it.

Import mininet open-source network simulator

Then, click the “Continue” button to get to the Appliance Settings screen. Use the default settings, but you can change virtual machine’s name, if you want to. I changed the name from vm to Mininet. Click on the “Import” button.

Change name of Mininet virtual machine

After a few minutes, you will see the Mininet VM you imported in the VirtualBox window.

Add a Host-only Adapter in VirtualBox

To use Mininet in the way recommended by the Mininet setup notes, you must create a “host only” network interface in VirtualBox. This creates a loopback interface on the host computer that can be used to connect the virtual machine to the host computer (or to other virtual machines). You will need this so that the host computer can run remote X11 sessions on the virtual machine in the later steps.

Open the VirtualBox preferences panel. Use the VirtualBox menu command:

VirtualBox → Preferences.

adding a host-only network adapter in virtualbox

Click on the “Network” icon in the Preferences panel. Then. click on the small green “plus” sign on the right side of the window to add a new network adapter. An adapter called vboxnet0 will be created. The default settings should be acceptable.

add host-only network adapter to VirtualBox

Check the settings by clicking on the small “screwdriver” icon on the right side of the window to edit the adapter’s configuration. Make a note of the IP address.

In this case the default IP address used by VirtualBox for the first host-only adapter is 192.168.56.1/24.

VirtualBox 2

The DHCP server is enabled on the interface and we see that the Lower Address Bound is 192.168.56.101/24. So, we know that the IP address of the virtual interface connected to the host-only network on the virtual machine will be assigned that IP address.

VirtualBox

For future use, note the following information:

  • Host-only network address: 192.168.56.0/24
  • Host IP address on host-only network: 192.168.56.1/24
  • Virtual Machine’s virtual interface IP address on host-only network: 192.168.56.101/24

Add Network Adapter to Mininet virtual machine

In the VirtualBox Manager window, click on the Mininet virtual machine and then click on the “Settings” icon on the top of the window. Click on the “Network” icon in the settings panel that appears.

The virtual machine already has one interface defined. On the “Adapter 1” tab, we see an interface set up as a NAT.

Mininet - Network 3

This will allow the virtual machine to connect to the internet. But to use Mininet we still need a way for the virtual machine to connect directly to the host computer. So, we need to add another virtual adapter and connect it to the “host-only network” interface we created earlier.

Click on the “Adapter 2” tab and, in the “Attached to:” field, select “Host-only network”. This allows other programs running on your host computer to connect to the VM using SSH. Since only one host-only network is currently created, VirtualBox will automatically select the vboxnet0 host-only network.

Mininet - Network

Click the “OK” button.

Now the network settings are configured for the Mininet virtual machine. You may change some of the other settings if you want to but the default values for all other settings will work well.

Start the Mininet virtual machine

In the VirtualBox manager, select the Mininet virtual machine and then click the “Start” button to start the Mininet VM.

Oracle VM VirtualBox Manager

The VM will boot up and present you with a login prompt.

Log in with userid=mininet and password=mininet

Configure a new virtual ethernet interface on the virtual machine

Run the ifconfig command to see the interfaces available on the Mininet virtual machine. We see two interfaces: eth0 and lo. You previously set up the Mininet virtual machine so that the interface eth0 would be connected to the NAT interface on your host computer, so it has been assigned an IP address that will work on the LAN connected to the host computer. In this case, eth0 has the IP address, 10.0.2.15/24.

Mininet [Running] 3

This allows the virtual machine to connect to the internet. We can verify a connection to the internet by pinging an external server such as google.com.

mininet@mininet-vm:~$ ping -c 1 google.com

But, we do not see an interface that is connected to the host-only interface. We need to configure eth1.

To see all available interfaces, even ones that are not up, execute the ifconfig -a command.

mininet@mininet-vm:~$ ifconfig -a

Now, we see that we have three interfaces: lo, eth0, and eth1. But eth1 is not up and does not have an IP address assigned. We can fix this by starting the DHCP client on eth1 so it will request an IP address from the DHCP server that is running on the host-only interface connected to eth1.

mininet@mininet-vm:~$ sudo dhclient eth1

Run the ifconfig command again. You will see that the interface eth1 now has an IP address 192.168.56.101 assigned to it.

Mininet [Running] 2

You can verify this interface is working now by pinging the host computer’s host-only interface address, 192.168.56.1 from the Mininet virtual machine.

mininet@mininet-vm:~$ ping -c 1 192.168.56.1

To permanently configure the new interface, edit the /etc/network/interfaces file and add an interface named eth1.

mininet@mininet-vm:~$ sudo vi /etc/network/interfaces

Just copy the same configuration for eth0 for eth1. In my case, I added the following lines to the file:

auto eth1
iface eth1 inet dhcp

Mininet [Running]

Now, the next time you start the Mininet virtual machine, the system will automatically configure the eth1.

Using SSH to connect to the Mininet VM

We are done using the VirtualBox interface to the Mininet virtual machine. In the next steps, you will use the SSH client software on your computer to connect to the Mininet virtual machine. This accomplishes two things:

  1. From the host computer, we can connect to remote X applications running on the Mininet VM, such as xterm and wireshark.
  2. We can use an easier-to-use terminal window or xterm window to interact with the Mininet virtual machine. You will have noticed by now that working with the VirtualBox console window is difficult because:
    • The VirtualBox console window captures your mouse whenever you use it and you have to use the appropriate “host key” to escape from the virtual machine and return control to your host computer.
    • You cannot cut-and-paste text from the virtual machine console window to a program on your host computer.

We need to set up an SSH connection to the virtual machine with X11 forwarding enabled so that we can run X applications on the Mininet virtual machine but display the applications on the X Server running on our host computer. Then we can set up an Xterm and stop using the virtual machine console window.

SSH configuration

On the Mininet VM, SSH forwarding is already enabled (in the /etc/ssh/sshd_config file). So you do not need to make any SSH configuration changes on the virtual machine.

Connect with SSH

Open the Terminal application on your computer (Windows users will use PuTTY).

In the Terminal window, use the SSH client on your computer to start an SSH session to the Mininet VM.

iMac:Desktop blinklet$ ssh -Y [email protected]

You will see a warning about the RSA key. Enter “yes” to continue. This will also add the RSA key to your SSH client so you will not see the warning again.

Desktop — mininet@mininet-vm- ~ — ssh — 80×32

Now you are logged into the Mininet virtual machine via a secure SSH session. Now, you can run remote X11 clients on the Mininet virtual machine over this SSH session.

Launch a remote X11 client

Note: As stated earlier, on a Mac you need to install the XQuartz X server from http://xquartz.macosforge.org.

In the Terminal window, which is now running an SSH session connected to the Mininet virtual machine, start an Xterm:

mininet@mininet-vm:~$ xterm -sb &

An Xterm window will open on the screen. You need the “-sb” option if you want to have a scrolling buffer in the Xterm window (so you can scroll back if you need to).

mininet@mininet-vm- ~

Now you know that applications running on the Mininet virtual machine can use X forwarding to display windows on the host computer. You will be able to use the Mininet virtual machine as described in the documentation on the Mininet web site.

As an extra activity, run Wireshark on the Mininet Xterm window:

mininet@mininet-vm:~$ sudo wireshark &

Wireshark should start up running on the Mininet virtual machine but is displayed in an X window on your host computer.

Wireshark running on Mininet open-source network emulator

You have completed setting up the Mininet virtual machine.

Conclusion

We set up the Mininet virtual machine on our computer and we verified that we can communicate properly with it. We are ready to work with Mininet. The next step is to follow the documentation on the Mininet web site and try out the Mininet Walkthrough tutorial.

91 thoughts on “Set up the Mininet network simulator”

  1. I am not able to ping my host from my mininet vm. My vboxnet0 on my mac has:

    vboxnet0: flags=8843 mtu 1500
    ether 0a:00:27:00:00:00
    inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255

    when I run ping -c 1 192.168.56.1 , I get the message saying that 0 packets received and 100% loss.

    One more thing while I am asking, how do I enable scrolling on the VM terminal window? I am using a macbook pro and the trackpad.

    Thanks,
    Jeremy

    1. ping -c 1 192.168.56.1 is not correct.
      ping -c l 192.168.56.1 is correct.
      please attention to “l” is correct.
      not 1

  2. Hello, I have a problem, when I type
    ‘$sudo dhclient eth1’
    I receive an error that says
    “can’t find interface eth1”.
    how do I fix it?
    I’ve been using VirtualBox in windows 8
    I am a beginner in mininet and I want to learn it.
    can any one help me please? thanks alot

    1. Hi zibafar,
      Did you set up the second network adapter in VirtualBox before you started the mininet virtual machine?
      When you run the ifconfig -a command, do you see the eth1 interface?
      Thanks,
      Brian

  3. hello 🙂
    i tried so many times to solve the problem

    ________________________
    mininet> xterm h1 h2
    Warning: This program is an suid-root program or is being run by the root user.
    The full text of the error or warning message cannot be safely formatted
    in this environment. You may get a more descriptive message by running the
    program as a non-root user or by removing the suid bit on the executable.
    xterm: Xt error: Can’t open display: %s
    xterm: DISPLAY is not set
    mininet> Warning: This program is an suid-root program or is being run by the root user.
    The full text of the error or warning message cannot be safely formatted
    in this environment. You may get a more descriptive message by running the
    program as a non-root user or by removing the suid bit on the executable.
    xterm: Xt error: Can’t open display: %s
    xterm: DISPLAY is not set
    any options ?? :/

      1. yeah i did
        this what i get
        {
        Warning: This program is an suid-root program or is being run by the root user.
        The full text of the error or warning message cannot be safely formatted
        in this environment. You may get a more descriptive message by running the
        program as a non-root user or by removing the suid bit on the executable.
        xterm: Xt error: Can’t open display: %s
        xterm: DISPLAY is not set
        }

        another question is it related to python >???
        cause i got error msg located to line in python any ideas
        am a beginner :/
        thanx

  4. mininet> gterm h1
    Traceback (most recent call last):
    File “/usr/local/bin/mn”, line 5, in
    pkg_resources.run_script(‘mininet==2.0.0’, ‘mn’)
    File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
    File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 1239, in run_script
    execfile(script_filename, namespace, namespace)
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/EGG-INFO/scripts/mn”, line 280, in
    MininetRunner()
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/EGG-INFO/scripts/mn”, line 113, in __init__
    self.begin()
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/EGG-INFO/scripts/mn”, line 266, in begin
    CLI( mn )
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/mininet/cli.py”, line 72, in __init__
    self.cmdloop()
    File “/usr/lib/python2.7/cmd.py”, line 142, in cmdloop
    stop = self.onecmd(line)
    File “/usr/lib/python2.7/cmd.py”, line 221, in onecmd
    return func(arg)
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/mininet/cli.py”, line 235, in do_gterm
    self.do_xterm( line, term=’gterm’ )
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/mininet/cli.py”, line 231, in do_xterm
    self.mn.terms += makeTerms( [ node ], term = term )
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/mininet/term.py”, line 60, in makeTerms
    return [ makeTerm( node, title, term ) for node in nodes ]
    File “/usr/local/lib/python2.7/dist-packages/mininet-2.0.0-py2.7.egg/mininet/term.py”, line 44, in makeTerm
    return Popen( cmds[ term ] + args )
    File “/usr/lib/python2.7/subprocess.py”, line 679, in __init__
    errread, errwrite)
    File “/usr/lib/python2.7/subprocess.py”, line 1259, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory

    :/ am really sorry for asking much but am lost

    1. Hi Yazan,
      I tried to reproduce this problem in my own system. I run the Mininet VM v2.1 in VirtualBox on a host system that runs Xubuntu 14.04. I followed the procedures in described in my two Mininet posts related to setting up the Mininet VM and running Mininet. I saw no problems. The xterms started correctly.

      I don’t know your setup so it is difficult for me to help debug this issue. I suggest you post your issue to the Mininet mailing list. Someone on that list may be better able to help you.

      Sorry I cannot be more helpful.
      –Brian

      1. brian really thanx
        i feel embarrassed cuz i have been working on windows 7 with vmware workstation
        and i have downloaded cygwin 64 terminal and ssh package
        i didnt know about the ubuntu that i should work with ubuntu :/
        i will try to do this again :))) thank u

        1. Hi Yazan,

          This should work on a Windows 7 host machine.

          Based on what you’ve told me so far, I suspect you do not have an X-server running on your Windows 7 host. That would explain why you get the “display not found” errors. So, maybe just start by running XMing, a free X-server for Windows, along with your current setup and see if that helps.

          In the past, I ran the Mininet VM in VirtualBox on a Windows 7 host computer, I used XMing as my X-server, and I used Putty as my SSH client. This worked fine for me. I suggest you use VirtualBox, XMing, and Putty and see if that works for you on Windows 7. They are all free tools. I have not used VMWare or Cygwin so I cannot help you with those tools.

          Brian

          1. hy brian
            ok now am usuing ubuntu 13.10 wireshrak works well and xterm !!
            every thing is fine with it but i downloaded virtualbox and mininet
            i faced the same problem
            root@mininet-vm:/home/mininet# sudo wireshark

            (process:8496): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback ‘C’ locale.
            error: XDG_RUNTIME_DIR not set in the environment.

            (wireshark:8496): Gtk-WARNING **: cannot open display
            any ideas ????
            thank u very much :))))

          2. Please check the host-only network adapter in VirtualBox. Is it set up correctly?
            I’ve never seen this problem after I followed the steps I describe in this blog post. Please tell me all the steps you followed to set up the mininet VM and VirtualBox, and to connect to the mininet VM.
            –Brian

  5. ok fisrt extract the file
    then import
    adding vbox0 then adapter to vm
    actully i didnt do it from terminal i just
    extracted the file then i did every thing
    from terminal i can use xterm , sudo wireshark it opens every thing is fine
    i saw at wireshark my connection ssh with vm but
    when i start the connection with mininet i cant xterm or wireshark
    sudo mn works
    pingall works
    but i have no idea why ://
    i am working on it more than 5 days , crashed my o.s but still trying 🙁
    -yazan

    1. That’s not enough detail.
      Did you set up the host-only adapter in VirtualBox? I think that you do not have a connection between the mininet VM and the host system.

    2. I faced the same issue, it was solved once I downloaded xming and started it, before starting VM

  6. it wooooooooooooooooooooooooooorks !!!!! finally
    biko@yazan-Inspiron-5520:~$ ssh -AX [email protected]
    this was the problem 🙁 do u believe it !!!!!!!
    not ssh -x but -AX worked !!! i dont know how and why actually

  7. Hey, great tutorial! I’m getting stuck with the dhclient tool, it’s not resolving a new interface for eth1.

    sudo dhclient eth1 -v

    DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval # (xid=0xcb0a6ce) *repeating a bunch of times*
    No DHCPOFFERS received

    Been working on getting this up for almost a week…

  8. hi.
    I am new on mininet, I had floodlight switch and I run it on Eclipse, on mininet I want to make network by this command “sudo mn –controller=remote –ip=192.168.1.51, –port=6633” but there is an error said “sudo mn –controller=remote –ip=192.168.1.51, –port=6633” could you tel me what I should do?
    regards.

  9. hi.
    I am new on mininet, I had floodlight switch and I run it on Eclipse, on mininet I want to make network by this command “sudo mn –controller=remote –ip=192.168.1.51, –port=6633″ but there is an error said “ mn: error: no such option: –port ″ could you tel me what I should do?
    regards.

  10. Pingback: How to install the Mininet SDN Network Simulator | Open-Source Routing and Network Simulation

  11. Pingback: How to build Mininet documentation | Open-Source Routing and Network Simulation

  12. Pingback: Emulating a Hetzner root with mininet at Rene's Blog

  13. Pingback: Recommended Links - GlobalConfig.net -

  14. Pingback: How to use MiniEdit, Mininet’s graphical user interface | Open-Source Routing and Network Simulation

  15. I am having a problem. When I follow the steps and do the initial ifconfig, it gives me that eth0 has the inet addr: 192.168.56.101
    why is that happening? I followed the steps, I am not sure why it is not showing the correct inet add r. anyone can help me?

    1. Check the settings in VirtualBox. Are you using the default NAT or did you have another NAT network created using a different network CIDR? Check VirtualBox preferences (File –> Preferences).

      1. I am new to this, so I do not really know what to do. I followed the instructions. I just went to preferences and created the vboxnet0 and then when to setting, etc, as described. Please help me. I am desperate.

        1. I tried installing it on another computer, followed all the steps, and it is giving me the same problem. I did it for a previous project, and it worked, I am not sure why it is not working for this one.
          I even tried to continue, and followed the steps to add ethi1, but when it gets an addr, it adds the one that eth0 should have. I am confused and running out of time. help

          1. I recreated the same issue you saw. VirtualBox has changed the way it handles network interfaces since I posted this tutorial. Now, it starts the host-only interface first on eth0. This is why you see the address 192.168.56.101. The NAT interface is now connected to eth1, so when you follow the next step in the tutorial and execute the command sudo dhclient eth1, you will see the address 10.0.2.15 assigned to it.

            This is confusing because we set up the NAT interface on Adapter 1 so we expect it should connect to the VM’s eth0, not the eth1 interface. I do not know why VirtualBox is working this way right now (or maybe it is something new in version 2.2 of the Mininet VM).

            So you can continue with the tutorial after executing the command, sudo dhclient eth1. The host-only network and the NAT network will both be up and running at that point and the rest of the tutorial is not affected by the change to the numbering of the network interfaces.

          2. Hi, I tried the same and i am having the same problem. And when i try to follow next steps to SSH in VM from the host it is not working. The terminal in host shows Request timeout for icmp_seq#. Please help. I am stuck and cant go forward.

          3. Marc van der Laan

            This message should help the people who get a time out error when trying to connect via putty (ssh) to the virtual machine.
            VirtualBox has changed the host-only adapter IP-address to 169.254.230.107 (in my set-up). When I do change this IP-address to a (static) one with format: 192.168.56.[1-10] – e.g. 192.168.56.3 (in my set-up) – an IP-address that does not exist yet – then I can finally ping and connect with putty in the DOS cmd prompt: putty.exe -X [email protected]. The IP-address 192.168.56.103 is the one assigned to eth0 in my set-up.

  16. Pingback: Install Gephi on the Mininet VM | Open-Source Routing and Network Simulation

  17. Pingback: Visualizing software defined network topologies using POX and Gephi | Open-Source Routing and Network Simulation

  18. Pingback: How to map OpenFlow switch TCP ports in Mininet SDN simulations | Open-Source Routing and Network Simulation

  19. Hi Brian,
    I followed all the steps mentioned in your blog, but i am facing with a problem. IP address of eth0 and eth1 are getting interchanged wen i checked using ifconfig. eth0 is showing address 192.168.56.101 and eth1 showing 10.0.2.15. Please help me .I am stuck and i couldnt go further

    1. Hi Brian,
      Even I am facing the same problem. Due to this my putty doesn’t connect to eth1 interface at all, it says connection timed out. However I tried connecting to other ip addresses on my network via putty and it works fine. This means problem is not with the connection or putty.

      1. This problem is not solved even in the previous comments who raised this issue of changed ip address to 10.0.2.15.
        I am still facing “Network Error: Connection Timed out”.

  20. Pingback: Using POX components to create a software defined networking application | Open-Source Routing and Network Simulation

  21. I am not able to create two network adapter in Mininet VM. Adapter2/3/4 is grey out. can You please help me on this??

    1. Hello Hira,
      If you set up the Mininet VM by following my instructions, then you should be able to connect to the internet from the Mininet VM. What exactly are you trying to do? Eth0 should be connected to the NAT interface in VirtualBox. I suggest you check your VirtualBox configurations for the Mininet VM.
      Thanks, Brian

      1. Thanks so much for the answer! I did follow them exactly as you said. However, the place where you mentioned adding a host-only adapter, that is by going into Preferences -> Network -> Host-only Adapter tab, I didn’t add a new one, because there already was one, and with exactly the same setting as the one in your snapshots. How do you think I can check that etho0 is connected to the NAT interface ?

        1. I think maybe VirtualBox is using eth0 to connect to the NAT interface because the IP address looks like it is on host-only-adapter’s IP subnet. Probably, eth1 is connected to the NAT interface. Check that eth1 is set up and has an IP address.
          Thanks,
          Brian

  22. Pingback: Mininet Graphical Topology Creation – Mohit Ritolia

  23. Sir xterm command now working in my virtual box…i install xming also…
    when i command ” xterm h1″ so it says “cannot connect to display” please help

  24. Pingback: Setting Up A Virtual Web Server With Virtualbox – VPS

  25. Hello! I installed Wireshark version 2.0.3 for mac on my MacBook Pro. It starts correctly from launchpad without Xquartz. If I try to launch wireshark from the terminal, it doesn’t start. Why?

  26. I get this error: XDG_RUNTIME_DIR not set in the environment
    (wireshark:1667): Gtk-WARNING **: cannot open display

    1. Hi Claudia,
      Where are you running Wireshark on the command line? Are you running wireshark in the terminal window of the Mininet VM? If so, it does not matter that Wireshark is also set up on your Mac OS. You still need an X server to display the Wireshark GUI running on the Mininet VM. You still need to install Quartz.
      Brian

      1. Thank you Brian! I installed XQuartz. Now when I launch wireshark from the Terminal window (which is now running an SSH session connected to the Mininet virtual machine), wireshark version 1.10.6 (an old version that I thought I had uninstalled time ago) starts even if wireshark version 2.0.3 is installed on my mac.
        Instead, if I launch wireshark from the Terminal of the Mininet virtual machine, I still have these errors: XDG_RUNTIME_DIR not set in the environment and : Gtk-WARNING **: cannot open display.

        1. When I have encountered this issue, it was because I had a problem either with the connection between the VM and my host machine or I had not started SSH with the correct options.

          Use “ssh -X” to turn on X forwarding. If this does not work, try “ssh -Y”.

          Also, you will be running the version of Wireshark that comes bundled on the Mininet VM.

          Brian

  27. Hi, Brian!

    After mininet VM installation, I have eth0 initialized with 192.168.56.104 IP-address and after I activate eth1 with sudo dhclient command it assigns 10.0.2.15 IP-address to eth0. When I ping google.com from VM environment it comes back with 1 packets transmitted, 0 received, 100% packet loss so it does seem that there is no connectivity via interface. When I try to connect to VM from terminal via ssh it says ssh: connect to host 192.168.56.104 port 22: Operation timed out.

    What the reason can be?

    Regards, Petr.

    1. when I ping 192.168.56.104 from Virtual Machine the transmission comes through successfully but I’m still not able to connect to VM environment (ssh -Y [email protected]) via ssh.

  28. Maruthi Ramprasad

    thanks so much for the detailed walkthrough
    definetely recommended for getting started with mininet

  29. Hi Brian. Thanks for tutorial. I am working on DDOS attack using POX controller. I setup topology in MINIEDIT with 64 hosts connected to 4 different switches. Problem is by default in miniedit default IP base is set to ‘10.0.0.0/8’. But in my work i need to assign different hosts with different IP addresses e.g. 10 hosts that belong to subnet 10.0.0.0/8 fine, rest 10 hosts belong to different subnet IP e.g. 140.45.0.0/16 and so on. How I can do this in mininet? I am stuck here badly and really frustrated due to limitations of mininet. Please help

      1. Yes.It work. I’m new in Mininet ,,, but it is amazing, I’m going to do my Ph.D on that. thanks a lot Dear Brain.

  30. Hi brian,

    Thanks for the detail setup process. It has helped me a lot. However I am trying to get the hosts h1 and h2 in mininet to connect to the Internet so I connect the eth1 to s1 through the following process,

    sudo ovs-vsctl add-port s1 eth1

    xterm to h1
    ifconfig h1-eth0 0
    dhclient h1-eth0

    I get the host h1 and h2 to connect to Internet but my SSH connection to th VM is lost. Later I tried to get switch-port s1 (internal) in openvswicth s1 to get IP from DHCP so I ca re-establish the SSH connection but it doesn’t work. switch-port s1 (internal) doesnt get any IP from DHCP server. Can you help me with this issue?

  31. Pingback: Using the OpenDaylight SDN Controller with the Mininet Network Emulator | Open-Source Routing and Network Simulation

  32. Hello,can somebody help me,i have problem with Mininet.When i want to create SSH,enable x11 forwarding using Putty i get message putty fatal network error,connection timed out.What is the problem ???

  33. Hi,
    It seems that i couldnt ping to google or any website using mininet cmd (it gave “Unknown host” error) . I also noticed the inet address of eth0 was not 10.2.0.15 but 192.168.56.101. This happened when i added host-only adapter as 2nd adapter but when i removed it, the inet address of eth0 was correct (10.2.0.5) and i could ping to google site as normal.

  34. Dear Brian,

    Thanks a lot for this great guide. It was indeed helpful. I had some minor issues while I was going through the instructions:

    1) 192.168.56.101 did not work for me. 192.168.56.102 did. Please see below:

    insight086:~ lquesada$ ping 192.168.56.101
    PING 192.168.56.101 (192.168.56.101): 56 data bytes
    Request timeout for icmp_seq 0
    Request timeout for icmp_seq 1
    Request timeout for icmp_seq 2
    Request timeout for icmp_seq 3
    Request timeout for icmp_seq 4
    Request timeout for icmp_seq 5
    Request timeout for icmp_seq 6
    Request timeout for icmp_seq 7
    ping: sendto: No route to host
    Request timeout for icmp_seq 8
    ping: sendto: Host is down
    Request timeout for icmp_seq 9
    ping: sendto: Host is down
    Request timeout for icmp_seq 10
    ping: sendto: Host is down
    Request timeout for icmp_seq 11
    ^C
    — 192.168.56.101 ping statistics —
    13 packets transmitted, 0 packets received, 100.0% packet loss
    insight086:~ lquesada$ ping 192.168.56.102
    PING 192.168.56.102 (192.168.56.102): 56 data bytes
    64 bytes from 192.168.56.102: icmp_seq=0 ttl=64 time=0.355 ms
    64 bytes from 192.168.56.102: icmp_seq=1 ttl=64 time=0.332 ms
    64 bytes from 192.168.56.102: icmp_seq=2 ttl=64 time=0.333 ms
    64 bytes from 192.168.56.102: icmp_seq=3 ttl=64 time=0.386 ms
    64 bytes from 192.168.56.102: icmp_seq=4 ttl=64 time=0.476 ms
    64 bytes from 192.168.56.102: icmp_seq=5 ttl=64 time=0.317 ms
    64 bytes from 192.168.56.102: icmp_seq=6 ttl=64 time=0.272 ms
    64 bytes from 192.168.56.102: icmp_seq=7 ttl=64 time=0.208 ms
    64 bytes from 192.168.56.102: icmp_seq=8 ttl=64 time=0.299 ms
    64 bytes from 192.168.56.102: icmp_seq=9 ttl=64 time=0.308 ms
    64 bytes from 192.168.56.102: icmp_seq=10 ttl=64 time=0.285 ms
    64 bytes from 192.168.56.102: icmp_seq=11 ttl=64 time=0.332 ms

    2) When excecuting the command ‘sudo wireshark &’ I got the following error:
    https://www.dropbox.com/s/94vxhixrpi93il0/errorMsg.png?dl=0

    I am running virtual box Version 5.1.14 r112924 (Qt5.6.2). I am using Mininet 2.2.1 on Ubuntu 14.04 LTS (http://onlab.vicci.org/mininet-vm/mininet-2.2.1-150420-ubuntu-14.04-server-amd64.zip)

    My machine is a MacBookPro running macOS Sierra version 10.12.2.

    Cheers,
    Luis

Comments are closed.

Scroll to Top