Getting started with Mininet

The easiest way to get started with Mininet is to download a prepackaged VM image of Mininet (which runs over Ubuntu). This VM includes all OpenFlow binaries and preinstalled tools to support large Mininet networks along with Mininet itself. In addition to prepackaged VM installation, those of you interested can install it natively from the source code or packages on Ubuntu.

The examples in this chapter are based on Version 2.2 of Mininet. The latest version of Mininet can be downloaded from http://mininet.org/download/.

If you want to get the VM image, you have to download and install a virtualization system. VirtualBox (free, GPL) or VMware Player (free for non-commercial use) are the available choices, which are free and work on Windows, macOS, and Linux. Mininet is an Open Virtualization Format (OVF) image file (approximately 1 GB), which can be imported by VirtualBox or VMware Player (free for non-commercial use).

In VirtualBox, you can import the Mininet's OVF file by double-clicking on the VM image or going to File and selecting Import Appliance. Then, go to Settings and add an additional host-only network adapter to log in to the VM image. If you are using VMware, it may ask you to install VMware tools on the VM; if it asks, decline. In the following examples, we have used VirtualBox as our virtualization system for Mininet.

Here, are the steps are shown pictorially.

To reach the same environment, you can take the following steps:

  1. Download and install Xming X-Server, Putty (with X11 forwarding option enabled) and VirtualBox. The X11 forwarding (refer to the following information box for more information) enables you to execute programs with a graphical output (for example, Wireshark, which is preinstalled and included in the Mininet VM image).
  2. Set up the networking preference of the VirtualBox, shown as follows:

    1.  Enable the second adapter on the VirtualBox, go to Preferences | NetworkHost-only Networks. Accessing the preferences tab can be done using the Ctrl + G shortcut. Ensure the configuration match with the following screenshot:
      • The DHCP server is enabled
      • The address space matches what is in the diagram
    1. Import the extracted downloaded Mininet appliance:
    1. Configure the Putty to enable X11 forwarding:
Do not open the Putty session yet navigate back to the session window.
    1. Right-click on the VM and navigate to Settings | Network. Enable the network Adapter 2 ensure the settings are configured as Attached to: Host-only Adapter and Name: VirtualBox Host-Only Ethernet Adapter.
  1. Start the Mininet VM image in the virtualization program of your choice (VirtualBox is shown in the following screenshot):
  2. Log in to the Mininet VM using the default username and password. The default username and password are both mininet. The root account is not enabled for login and you can use sudo to execute a command with superuser privileges.

 

  1. In order to establish an SSH session to the Mininet VM, you have to find the IP address of the VM. This address for VirtualBox is probably in the range of 192.168.x.y. Type the following command in the VM console:
      /sbin/ifconfig eth0
  1. You can SSH to the VM using the putty window open previously as follows. Also, the Putty session configuration can be saved for future logins:
  1. In the following screenshot, you can see the experimental environment based on VMware Player, Mininet, Xming (X-Server), and Putty (SSH terminal). You can see that we have logged in to the Mininet VM using PuTTY (SSH client) and then we have started the Wireshark as a background process (that is, sudo wireshark &). Since the X11 forwarding is enabled, the Wireshark GUI appears as a separate window:
OpenFlow laboratory using Mininet
  1. Before starting the Mininet emulator, you have to select the Capture device in Wireshark (lo or loopback interface) and start capturing the traffic. In order to display the OpenFlow related traffic, you have to add (OpenFlow) in the filter box of Wireshark and apply it to the capturing traffic. This will instruct Wireshark to just display OpenFlow related traffic. Since Mininet has not been started yet, no OpenFlow packets should be displayed in the main window of Wireshark. In the next section, you will run a sample experiment using Mininet.
The Mininet VM does not include a desktop manager. The graphic output should be forwarded via X forwarding through SSH. You can consult the following FAQ to enable X11 forwarding. Setting X11 up correctly will enable you to run other GUI programs and the xterm terminal emulator used later in this chapter. For more information, visit https://github.com/mininet/mininet/wiki/FAQ#x11-forwarding.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset