Brian Linkletter

Author Archives: Brian Linkletter

Using the POX SDN controller

In this tutorial, we will demonstrate basic software-defined networking (SDN) concepts using the POX SDN controller, POX components, and the Mininet network simulator.

Pox-050b

We will show how to use the POX SDN controller to create software defined networks that can be used to forward packets from one host to another and create flows on the SDN switches in the network. We will use the Mininet network simulator to create the network of emulated SDN switches and hosts that will be controlled by the POX SDN controller.

About Mininet

Mininet is an open-source network simulator designed to support research and education in the topic of software defined networks. If you are not already familiar with Mininet, you should review the following posts before starting this tutorial:

More information about Mininet is available at the Mininet web site.

About POX

POX provides a framework for communicating with SDN switches using either the OpenFlow or OVSDB protocol. Developers can use POX to create an SDN controller using the Python programming language. It is a popular tool for teaching about and researching software defined networks and Continue reading

How to use MiniEdit, Mininet’s graphical user interface

The Mininet network simulator includes MiniEdit, a simple GUI editor for Mininet. MiniEdit is an experimental tool created to demonstrate how Mininet can be extended.

MiniEdit-503b

To show how to use MiniEdit to create and run network simulations, we will work through a tutorial that demonstrates how to use MiniEdit to build a network, configure network elements, save the topology, and run the simulation.

Set up Mininet

You should already be familiar with Mininet before trying to use MiniEdit. If you need some basic information about Mininet, please read my Mininet overview.

Before starting this tutorial, you should have already started the Mininet VM and connected to it via SSH with X forwarding enabled. If you need to learn how to do this, please read my post describing how to set up Mininet. If you want to use Mininet on an Amazon EC2 server, please see my post about installing Mininet on Amazon EC2.

Start MiniEdit

The MiniEdit script is located in Mininet’s examples folder. To run MiniEdit, execute the command:

$ sudo ~/mininet/example/miniedit.py

Mininet needs to run with root privileges so we started MiniEdit using the sudo command.

MiniEdit user interface

MiniEdit has a simple user interface that Continue reading

Install Mininet on an Amazon EC2 server

To install the Mininet SDN network simulator on a remote server running on Amazon’s EC2 cloud1, follow the procedure shown below. After installing it, I did some basic tests and it seems that Mininet works well on the Amazon EC2 server.

From my laptop PC, I connect to the Amazon EC2 instance via SSH. In the example below, the server’s private key file AWS-PrivateKey.pem is stored in the folder ~/AWS and the server’s public IP address is 55.155.1.55. I had previously created a new user brian on the server.

brian@Laptop:~$ ssh -X -i ~/AWS/AWS-PrivateKey.pem [email protected]

To install the latest stable version of Mininet, plus all supporting software, execute the following commands on the Amazon EC2 server running Ubuntu Server 14.04.

brian@AWS:~$ sudo apt-get install git
brian@AWS:~$ git clone git://github.com/mininet/mininet
brian@AWS:~$ mininet/util/install.sh -a

To test the installation, run the following command:

brian@AWS:~$ sudo mn --test pingall

The benefit of installing Mininet on a remote server such as an Amazon EC2 instance is that I can now experiment with Mininet from any computer, including a tablet or smartphone, at any time as long as I have a connection Continue reading

Control an Amazon EC2 server from an Apple iPad using SSH and VNC

I recently configured an Amazon EC2 instance so that I could run the XFCE desktop environment on it and control it from my local laptop computer using SSH and VNC. But what if I want to use my iPad to do control the remote Amazon EC2 server?

I want to experiment with complex network simulations running on open-source networking software when I happen have the time, from any location with a WiFi connection. I do not always have my laptop with me, but I usually have either my iPad or iPhone.

IMG_0442.PNG

In this blog post, I will show how to configure and use an iPad (and iPhone) VNC viewer app to view and control the desktop environment running on my Amazon EC2 server.

iPad software

screens-iosTo connect to a remote server from an iPad, we need a VNC viewer app. The VNC viewer app I use is Screens.

I use the Edovia Screens iPad app, which displays the full-screen desktop environment running on the remote server. There are other VNC viewer apps in the App Store but Screens seems to have a lot of functionality and I was confident it would support SSH tunneling. Screens is also a universal iOS Continue reading

Install the CORE Network Emulator on Amazon AWS

Having set up an Ubuntu Linux server running on a free micro-instance in Amazon’s Web Services EC2 service, I’d like to see how some of the open-source network simulation tools I’ve been using work in the cloud.

First, I will install the CORE Network Emulator on my Amazon AWS EC2 virtual private server. Please read the rest of this post to see how it works.

I expect that the CORE Network Emulator will install and run on an Amazon EC2 instance because it uses Linux Containers (LXC) as its virtualization technology. I have already observed that LXC containers work when run inside a virtual machine on my Laptop computer. It should work the same when running in a virtual machine in Amazon’s EC2 cloud computing service.

Install CORE

I’ve already described how to install the CORE network emulator in previous posts so I will list the installation steps below without any explanation. For details, please see my post on how to install the CORE Network Emulator from source code.

Install prerequisite software

$ sudo apt-get update
$ sudo apt-get install bash bridge-utils ebtables 
  iproute libev-dev python tcl8.5 tk8.5 libtk-img 
  autoconf automake gcc libev-dev make python-dev 
   Continue reading

How to run GUI applications on an Amazon AWS cloud server

In a previous post, I showed how easy it is to set up a remote server on Amazon’s AWS service. Now I would like see if I can run one or more of the open-source network simulators I’ve been using on this remote server. I want be able to access a network simulator from any device such as a personal computer, a tablet, or even a smart phone.

To accomplish this, I first need to install a Linux desktop environment on the remote Ubuntu server. Then, I need to set up the server and my client devices to allow the graphical user interface displayed on a remote server to be viewed on a local client.

In this post I will show how to install a Linux desktop (in this case, XFCE) and how to set up either VNC or X11 on a server and client.

Required software

Linux desktop

In this example, I chose to run the XFCE desktop environment on the Amzaon AWS remote server because XFCE uses less resources than other desktop environments such as Gnome or KDE.

Remote-access methods

There are two common methods for accessing a remote server’s graphical user interface:

  1. VNC, Virtual Network Computing, Continue reading

How to set up a new user on your Amazon AWS server

I recently set up a free Amazon AWS server. As I experimented with it, I installed a GUI desktop. Then I encountered some issues that I eventually resolved by creating a new user with its own password and then using that user for the rest of my activities.

For my own reference, and in the hope others will find it useful, here is the procedure I followed:

  1. Create a new userid, with password
  2. Add the new user to the *sudoers* file
  3. Install the AWS server’s public key for the new user
  4. Log in as the new user

I posted the details in my blog post, below.

Why do we need a password?

The default ubuntu userid does not have a password. The Amazon AWS documentation on managing users recommends creating new users with password disabled. So, why set up a new user with a password?

After installing a GUI desktop, you need to a use a password to authenticate operations performed by GUI software such as Ubuntu Software Center. I did not see any problems caused by configuring a user password. I found it was best to work in a “normal” Linux user account that has a password.

Create a Continue reading

Create a free virtual private server on Amazon Web Services

As an incentive to use their service, Amazon Web Services offers new users a “free tier” of service that provides a VPS “micro-instance” at no cost for one year.

AWS-00c-1x

The free tier of service is fairly flexible. Amazon AWS provides enough free hours to run the micro-instance twenty-four hours a day for a year. But if a user needs more services, he or she may create multiple micro instances and run them concurrently, which multiplies the rate the user consumes hours.

In this post, we’ll show how to set up the free server, and how to connect to it using SSH.

Create an AWS account

The first step is to create a user account on AWS. Go to the AWS Free Tier web page and click on “Sign up for AWS Account”

Then, click on “Create a free Account”.

AWS-00a

Click on the “Free Account” button

Follow the directions provided on the AWS web site to set up a user account. You need to have a mobile phone for identity verification.

If you already have an account on amazon.com, you can use your already existing account to log into AWS services.

Create a free instance

Amazon AWS provides excellent Continue reading

How to build Mininet documentation

After installing the Mininet software-defined network simulator on a virtual machine, you may want to build the documentation. Documentation is available on the Mininet web site but, if you installed a beta version of a new development release or installed an old version, you may want to use the documentation specific for the version you are using.

Mininet documentation is built into the source code and can be generated using the doxypy program. This post details the simple steps required to install doxypy and other required software, and to build and view the documentation.

Install doxypy

Start the Mininet virtual machine and log into it via SSH. See my previous post about setting up the Mininet SDN Network Simulator virtual machine.

On the Mininet VM, run the following command to install doxypy, and supporting software packages:

$ sudo apt-get install doxypy doxygen doxygen-latex help2man

This could take a while because it downloads over one Gigabyte of data, such as fonts.

Build the documentation

On the Mininet VM, run the following command to build the documentation

$ cd ~/mininet
$ make doc

This builds a PDF version of the documentation named refman.pdf in the folder: ~/mininet/doc/latex/.

Install a PDF Continue reading

How to install Mininet 2.2 beta

Most people who use the Mininet network simulator will download and set up the Mininet virtual machine image. However, there are times when we may want to use a different version of Mininet than the one already installed in the Mininet VM.

For example, we may want to use the newest features of Mininet currently being developed. The Mininet project releases beta-quality source code that user can download and install themselves.

This post will show how to install Mininet 2.2 Beta on a virtual machine image running Ubuntu Server. The steps described below should work for any version of Mininet that the user wants to install.

Do not install Mininet on your host computer

Warning: Do not install Mininet on your host computer. Install in in a virtual machine.

The Mininet install script may overwrite files in your home directory (depending on what you already have installed)1. If Mininet makes changes that cause problems on an existing virtual machine, you can just delete the VM and try again with a fresh Ubuntu Server image. But, if you install Mininet directly on your host computer you may cause problems.

In my own experience, I tried installing Mininet on my Continue reading

How to Customize CORE Network Emulator Services

When running services on nodes in a CORE Network Emulator scenario, we may wish to customize the services configurations.

Some reasons why a user may customize CORE services are:

  • Set up complex network emulation scenarios by adding more configuration information to required services
  • Simplify network emulation scenarios by removing default configurations from CORE Services
  • Enable the CORE GUI to execute user-generated scripts or commands on network nodes while running a simulation
  • Save customized configurations on each node in the CORE Network Emulator configuraion file.

To show how to customize CORE Services, we will work through a detailed tutorial that shows how to customize the IPForward service. We will work through the same steps required to customize any other CORE Service.

The IPForward CORE Service

The IPForward CORE Service provides a script that runs when the node starts in a simulation scenario. The script sets the IP Forwarding kernel parameters so that the node will forward packets from one port to another, according to the routing table on the node. The IPForward script is a default service on the Router node type.

Why customize this service?

The default IPForward CORE service has limited functionality: it can start IP forwarding on a Continue reading

CORE Network Emulator Services overview

CORE Services is a feature of the CORE Network Emulator — an open-source network simulator — that configures and starts processes on each node running in a network simulation. Examples of processes supported by CORE Services are: quagga, dhcpd, or radvd.

Because the CORE Network Emulator implements its virtual nodes using a lightweight virtualization technology called Linux namespaces, we cannot use the normal init or upstart scripts to start networking daemons on these nodes. We must use CORE Services.

services-ov-000b

A benefit of using CORE Services is that they allow us to set up and manage processes running on each node by using the CORE GUI. This may reduce the time required to configure nodes used in a simulation scenario, especially if a large number of nodes require similar configuration procedures. Also, network scenarios that require customized configurations can be saved and used again if those configurations are implemented by customizing CORE Services.

To run complex network simulation scenarios, we must understand how to use CORE Services. In this post we will provide an overview of CORE Services.

Overview

CORE Services are used to start processes on the virtual nodes in a CORE network simulation. For the processes Continue reading

CORE Network Emulator 4.7: What’s New

The CORE Network Emulator development team released CORE version 4.7 in August 2014. I installed this new version of CORE on a newly-installed Linux 14.04 system and tested some of the new features.

CORE-007

In this post, I list the new features that are most relevant to researchers who use the CORE GUI to set up and run network simulations. I also list some of the defects that I found, along with workarounds.

Updates and New features

The following are the most updates and new features most visible to users like me, who use the CORE GUI. There are many other updates and new features so read the CORE 4.7 release notes to review all the changes in CORE 4.7.

Link effects

The CORE team made some major improvements to the way link effects are implemented. This alone is worth upgrading to CORE 4.7. The changes are:

  • Allow jitter to be configured on links
  • Link effects, such as delay and jitter, now can be configured between hub/switch and hub/switch connections (not just between routing nodes such as PCs and Routers).
  • Link effects can be configured or changed during runtime, after the simulation is started.
  • Allow Continue reading

Blog status report 2014

The occasion of my fiftieth post is a good milestone to pause and look back on the two years since I started blogging about open-source routing and network simulation. I will review the blog’s performance statistics and reflect on why I started this blog and what I want to do next.

50th post stats

The chart above shows the blog traffic over the past two years, starting in August 2012. In the first year I thought I would reach only a small audience but, as I posted more content, more users found my blog. In the past twelve months, 29,500 unique users visited this blog. Traffic grew steadily almost every month in the past year.

Users from almost every country on Earth have visited this blog. The map below illustrates the number of users in each country who have visited the blog during the past twelve months, with shades of blue representing the number of users.

50th-post-map-stats

I considered writing a technical blog after listening to the audiobook Crush It! by Gary Vaynerchuck, read by the author. The audiobook was very inspirational and made me understand that writing a blog could be a positive experience.

The next book I read was Technical Blogging Continue reading

Run desktop environment on guest VM in cloonix network simulator

The Cloonix open-source network simulator uses the Spice remote desktop system to provide a virtual desktop connection to quest virtual machines that run a graphical user interface, such as Microsoft Windows or a Linux desktop environment.

To use a graphical desktop user interface on a guest VM, we access the VM using the Spice desktop console.

Guest VM requirements

We must be running a guest VM that has a desktop environment installed and the Spice server installed.

We already upgraded a root filesystem with the XFCE desktop in a previous post. So, in this example, we will use that filesystem, which is named jessie-networking-xfce.qcow2 and is saved in the cloonix bulk directory.

Start the guest VM

Start the cloonix graph interface (see instructions for starting cloonix). Configure the VM object to load the jessie-networking-xfce.qcow2 filesystem.

Configure VM to use filesystem with desktop already installed

Configure VM to use filesystem with desktop already installed

Then drag the VM object onto the graph interface so it starts up.

A Cloonix guest VM is now running

A Cloonix guest VM is now running

Use Spice to connect to the guest VM

Right-click on the VM and select the Open Spice desktop menu command.

Open the Spice desktop console on the guest VM

Open the Spice desktop console on the guest VM

The Spice console will Continue reading

How to run X applications on a guest VM in the cloonix network simulator

To run a program that uses a graphical user interface on a guest virtual machine running in the cloonix open-source network simulator, log into the guest VM from the host computer using SSH and forward the X11 display. Then, any X11 program you run on the guest VM using that SSH session, such as Wireshark, will display its X windows on the host computer.

Initial setup

First, we create a cloonix network simulation with at least one guest VM. In this example, we created three guest VMs named Cloon1, Cloon2, and Cloon3.

A cloonix network simulation with three guest VMs

A cloonix network simulation with three guest VMs

See previous posts related to using cloonix, if you need help setting up the example network.

Connect to guest VM via SSH

Open a new terminal window on the host computer. We do this so we can run X windows from the guests on the host. As discussed in the Cloonix v24 overview post, cloonix uses a patched version of the Dropbear SSH client so we use the dbssh command that is installed in the cloonix tree directory, ~/Netsims/cloonix-24.11.

The Dropbear SSH client automatically forwards X windows from the client machine to the server machine so Continue reading

How to simulate an IPv6 network using the cloonix network simulator

As we work through this tutorial, we will learn how to use the cloonix graph interface to build a simulation scenario that includes two small IPv6 networks connected to each other by two routers via static routes. We will also learn how cloonix saves network topologies and guest virtual machine root filesystems.

Cloonix IPv6 linux network simulation

Linux IPv6 network simulation running on the cloonix open-source network simulator

The cloonix open-source network simulator uses KVM virtual machines in the simulated network so, in this tutorial, we will demonstrate real Linux router and host configuration procedures.

Procedure summary

First, let’s review the high-level steps we will execute to set up and configure a simulated IPv6 network and then save a network topology and node configurations.

  1. Create root filesystems, one for each virtual machine we plan to create in the simulation
  2. Create static guest virtual machines with the previously-created root filesystems
  3. Connect nodes to create a network topology
  4. Configure each node in the simulated network
  5. Save the network simulation scenario for future use
  6. (Optional) Make changes and save another version of the topology
  7. (Optional) Load a saved network simulation scenario

Step 1: Create root filesystems

We intend to create a scenario made up of static root filesystems Continue reading