Skip to content
lantz edited this page Dec 3, 2012 · 227 revisions

Please add helpful Frequently Asked Questions (FAQs) and high-quality answers (HQAs) below.

Since github wikis don't automatically generate a Table of Contents, please follow the existing format and add 1) an anchor for your question and 2) a link to it at the top of the page. Thanks!


How can I get started with Mininet?

The best way to get started with Mininet is to install our ready-to-run virtual machine image from the Download page, and then go through the Walkthrough and the OpenFlow tutorial.


What is the login/password for the Mininet VM?

It is currently:

mininet-vm login: mininet
Password: mininet

On some older VMs it was openflow/openflow.


How do I figure out the command-line options for the mn command?

mn --help

How can I do a native install of Mininet?

See http://mininet.github.com/download.


How do I use Mininet's Python API?

We provide a few examples of using the Python API in the mininet/examples directory.

We also provide Python DocStrings for every Mininet class and method, and you can view them using from within Python

>>> import mininet.node
>>> help(mininet.node.Node)</verbatim>

or by calling Python from within the Mininet CLI:

mininet> py help(h2)

In each case, pressing =q= should quit the pager.

Also see Mininet-API-Documentation for information on how to generate Mininet documentation in.md format.


Which versions of OpenFlow does Mininet support?

Mininet officially supports OpenFlow 1.0, and the Mininet VM image includes OpenFlow 1.0-compatible versions of the OpenFlow reference implementation as well as Open vSwitch. It is also possible to get Mininet to run with OpenFlow 0.8.9 with a few minor changes.


What OpenFlow switch implementations does Mininet support?

Mininet currently includes support for the user space reference implementations, as well as the Open vSwitch kernel implementation. All three are included in the VM image. Mininet used to support the OpenFlow 0.8.9 kernel reference implementation (--switch kernel) but that is now obsolete and has largely been replaced with Open vSwitch.

The command line options are --switch user and --switch ovsk for the user reference and Open vSwitch kernel switches, respectively.


Why does my controller, which implements an Ethernet bridge or learning switch, not work with my network which has loops in it? I can't ping anything!

It doesn't work because your network has loops in it.

Transparent bridging of L2/Ethernet networks doesn't work if the topology has loops in it, for a variety of reasons: ARP does broadcasts, packets are flooded by default, learning switches don't deal well with seeing the same MAC address on multiple ports and could potentially learn a route to themselves, and Ethernet frames don't have a time to live field (TTL) like IP packets (otherwise flooding might work, if inefficiently.) As a result, many Ethernet bridges implement variants of a Spanning Tree Protocol (STP), which simply deactivates links in the network to remove loops. Of course, this also throws away network bandwidth that you could otherwise be using, and creates a bottleneck at the root of the tree.

The OpenFlow reference controller (controller) implements a bridge/learning switch, as does NOX's pyswitch module.

In general, if you want to use a network with loops in it, you need to be absolutely sure that your controller supports such a network. As mentioned above, controller and pyswitch do not by default. NOX has a spanning_tree module, which you may wish to investigate.


Why do the switch data ports have random MAC addresses? How do I assign MAC and IP addresses to the switch data ports?

The MAC addresses reported by Linux for the switch data ports are meaningless. The switch is controlled by OpenFlow, so you should use OpenFlow to ensure that any packets destined "for the switch" are properly routed. You "assign" MAC and IP addresses "to the switch" by using OpenFlow rather than the Linux IP stack. If you attempt to use the Linux IP stack instead, it really won't work unless you are using the Linux kernel for routing (which you aren't - you're using an OpenFlow switch!) You should never attempt to use ifconfig or ip link or other utilities to assign an IP address to a switch data port. Usually you will want your controller to handle packets such as ARP and ICMP which are sent to and from "the switch," and you will want IP packets which are sent to to be handled by appropriate flow table entries. You can pick any "MAC" address you like for the switch.


Why can't I get X11 forwarding to work? I get "cannot open display:" or "$DISPLAY not set" and WireShark doesn't work! xterm doesn't work either!

This is not a Mininet problem. It means that X11 forwarding is not set up correctly. First, consult the X11 setup instructions in the [http://www.openflow.org/wk/index.php/OpenFlow_Tutorial](OpenFlow Tutorial), including:

  • Download X11
  • Install X11
  • Start up X11 server
  • Access VM via ssh

Make sure you have carefully followed the necessary steps. If things are still not working for you, you will want to make sure that:

Your X11 server on your client machine (e.g. your laptop) is installed correctly and is actually running You are connecting using X11 forwarding (e.g. ssh -X on OS X/Linux or enabling X11 forwarding in a Windows ssh client like PuTTY or SecureCRT.)

You don't have any options in your client .ssh/config which interfere with X11 forwarding

When you log in with ssh, your $DISPLAY environment variable is set X11 terminology is a bit confusing because the X11 server is actually run on the ssh client machine! The ssh client connects to the sshd server, which in turn forwards connections from X11 client applications (such as wireshark) to the local X11 server (usually running on your laptop or whatever machine is sitting in front of you.)

One note: if you have disabled IPv6, you may find that you need to add AddressFamily inet to your /etc/ssh/sshd_config.

Other unlikely causes of breaking X11 forwarding include it being disabled in /etc/sshd_config or disabled by SELinux. Neither of these should be the case in the Mininet VM image we provide. You may wish to invoke debug logging on your ssh client to see why X11 forwarding isn't working. On OS X and Linux, you can use

ssh -X -v <VM's IP address>

to see where the X11 forwarding is failing.

As an alternative to X11, you could also use VNC, but that is probably about as complicated as X11 and is left as an exercise to the reader.

If this seems too complicated, you can simply run X11 in the VM console window as described below!


X11 forwarding is too hard! Can't I just run a GUI in my VM console window?

Yes, you can!

First, log in to the VM in its console window (i.e. type directly into the VM window without using ssh.) Then, install xinit (and its dependencies) and a window manager of your choice (I picked flwm because it's small - you may prefer metacity or some other window manager):

sudo apt-get install xinit flwm

Then, you can start X11 in the VM console window using

startx

How can I use multiple controllers in my network?

One way is to use the mid-level API, as shown in examples/controllers.py


Help! I updated my Ubuntu kernel and now Open vSwitch won't start!

If you are using Ubuntu's openvswitch-datapath-dkms and openvswitch-switch packages, they should update automatically when you reboot.

Until openvswitch-datapath-dkms is reconfigured/rebuilt, Open vSwitch will refuse to start saying that its kernel module is missing. For example, you may see a message like:

FATAL: Module openvswitch not found.

If rebooting doesn't fix the problem, or if you don't want to reboot, you can reconfigure the kernel module manually and restart OVS:

sudo dpkg-reconfigure openvswitch-datapath-dkms
sudo service openvswitch-switch restart

Help! I have never used Linux or UNIX before!

There is a wide variety of very useful information available for free on the internet. Try searching for "Linux tutorial" or "Ubuntu tutorial" in Google or your search engine of choice.

Additionally, nearly every Unix system since the beginning of time includes online documentation which can be accessed using the man command. For example, to find out about the ls command, you can type

man ls

Each section (traditionally 1-8) of the manual has an intro page, and you can actually read all of the intro sections by typing:

man -a intro

There are also many useful books on Linux available on Amazon and in your local bookstore. Mark Sobell's books are classics, as are Nemeth's books on Unix/Linux system administration.


Help! I don't understand OpenFlow or SDN!

There is a wealth of useful information to be found at http://openflow.org.

Definitely read the OpenFlow White Paper and go through the OpenFlow Tutorial.


Help! I don't understand networking (or maybe computers) at all!!

There is a wealth of very useful information available for free on the internet - try some Google (or search engine of your choice) searches for things like 'networking tutorial', 'IP networking basics', etc..

You may also find useful content on Wikipedia, About.com and YouTube, as well as free online courses.

My [BL's] personal recommendation is to take an introductory CS course and an introductory networking course at your local college or university.

You may also wish to consult an introductory networking textbook such as Computer Networks: A Top-Down Approach by Kurose and Ross, or Computer Networks: A Systems Approach by Peterson and Davie. To master Ethernet switches you might want to check out The All-New Switch Book by Seifert, and for a vintage but still classic and somewhat relevant view of socket programming you might find a copy of the Unix Network Programming tomes by the late Richard Stevens.


Will you do my (home)work assignment (or paper/thesis/etc.) for me? It's due next Tuesday at 4pm.

No, because:

  • We don't want to and don't have time
  • You don't have enough money to pay our consulting rates anyway
  • It would be a violation of the honor code
  • You will learn much more doing the assignment yourself
  • It's your professor/advisor/TA/boss's job to teach you, so make them do their job!
  • Learning how to teach yourself is even more valuable than learning from someone else.

Clone this wiki locally