Replacing ethX with the name of the unnumbered interface

Note down the IP address of eth1 (probably the 192.168.x.x one) for the host-only network; you will need it later. Next, using your SSH client (PuTTY, terminal.app, and so on) log in to your Mininet VM. For example, on a Linux host, enter the following command:

      $ ssh -X mininet@[eth1's IP address]  

In order to use the X11 applications (xterm and Wireshark), the X Server must be running. The next verification is the accessibility of the X server. Try starting up an X terminal using the xterm command:

      $ xterm  

Then a new terminal window should appear. If you have succeeded, the environment of the OpenFlow laboratory will be ready and you can close the xterm. If you get an xterm: Xt error: Can't open display (or similar error), verify your X server installation.

Under Windows, the Xming server must be running, and you must make an SSH connection with X11 forwarding enabled. First, start Xming. Xming will not show any window, but you can verify that it is running by looking for its process in Windows' taskbar. Second, make an SSH connection with X11 forwarding enabled. If you are using PuTTY, you can connect to your OpenFlow laboratory by entering your VM's IP address (eth1) and enabling X11 forwarding. To enable X11 forwarding from PuTTY's GUI, open PuTTY and go to Connection | SSH | X11, then enable X11 forwarding.

Alternatively, you can install X11 into the VM itself (that is, inside your OpenFlow laboratory VM). To install X11 and a simple window manager, log in to the VM console window (username: mininet, password: mininet) and enter the following commands:

      $ sudo apt-get update
$ sudo apt-get install xinit flwm

Now, you should be able to start an X11 session in the VM console window by typing this:

      $ startx  

After establishing an SSH connection to your OpenFlow laboratory VM and logging in to it (username: mininet, password: mininet), you can start the sample Mininet network by entering the following command:

      $ sudo mn --topo single,3 --mac --switch ovsk --controller remote  

Note that since you have not started any OpenFlow controller, you will get an error message like unable to contact the remote controller at 127.0.0.1:6633. Since X11 forwarding is also enabled, you can start Wireshark to be able to capture OpenFlow traffic. You can start Wireshark by entering the following command in your terminal (PuTTY):

      mininet@mininet-vm:~$ wireshark &  

This will open the Wireshark GUI and you can start capturing the network traffic and filtering the OpenFlow traffic as explained in Chapter 3, Implementing the OpenFlow Switch.

Now you can start your remote OpenFlow controller. This controller is in fact running inside your OpenFlow laboratory VM. So you need to go to your VM console and enter the following commands:

      mininet@mininet-vm:~$ cd pox
      mininet@mininet-vm:~/pox$ ./pox.py forwarding.l2_learning  

After a while your OpenFlow soft-switch in the Mininet will get connected to this controller. The output of your POX controller should look like the following:

      POX 0.0.0 / Copyright 2011 James McCauley
      DEBUG:core:POX 0.0.0 going up...
      DEBUG:core:Running on CPython (2.7.3/Sep 26 2012 21:51:14)
      INFO:core:POX 0.0.0 is up.
      This program comes with ABSOLUTELY NO WARRANTY.  This program is 
free software, and you are welcome to redistribute it under
certain conditions.
Type 'help(pox.license)' for details. DEBUG:openflow.of_01:Listening for connections on 0.0.0.0:6633 INFO:openflow.of_01:[Con 1/1] Connected to 00-00-00-00-00-01 DEBUG:forwarding.l2_learning:Connection [Con 1/1] Ready. POX>

The debug messages of POX show that your OpenFlow switch is connected to POX (OpenFlow controller) and behaves as an L2 learning switch.

This concludes the setup of our OpenFlow laboratory. We managed to set up a network using Mininet and also started a remote OpenFlow controller (POX) as an environment for Net App development. In Chapter 6, Net App Development, we will use this laboratory setup for our sample Net App development.

In the next section, we'll introduce another setup based on the ODL project.

..................Content has been hidden....................

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