DocumentsDownloadsWikiCommunityBlogAbout

OpenFlowVMS:Basic Operations

From OpenFlow Wiki

Jump to: navigation, search

Contents


Network Configuration

Let's run through an example to understand the network configuration. Sample configurations can be found at OpenFlowVMS/samples/. We begin by copying 2hosts-1ofsw-1sw.vms.xml into the working directory

cp OpenFlowVMS/samples/2hosts-2ofsw-1sw.vms.xml <working directory>/2hosts-3ofsw.vms.xml

In this example, we will change the Ethernet switch to an OpenFlow switch.

The sample file is as such, annotated.

<network name="Sample Network">
 < !--Amount of memory to given OpenFlow switches-->
 <of_mem>32</of_mem>
 < !--A normal Ethernet switch (VDE Switch)-->
 <switch name="sw1">
 </switch>
 < !--Two OpenFlow switch-->
 <openflowswitch name="of1">
 </openflowswitch>
 <openflowswitch name="of2">
 </openflowswitch>
 < !--Two hosts, one with an xterm-->
 <host name="host1">
 </host>
 <host name="host2">
   <xterm>true</xterm>
 </host>
 < !--Connecting host1 with of2 with wirefilter-->
 <link end1="host1" end2="of2">
   <wirefilter>true</wirefilter>
 </link>
 < !--Connecting switches-->
 <link end1="of1" end2="of2" />
 <link end1="sw1" end2="of2" />
 < !--Connecting host2 with sw1-->
 <link end1="host2" end2="sw1" />
</network>

We change the Ethernet switch to an OpenFlow switch, as shown below (where the modified lines are highlighted in blue).

<network name="Sample Network">
 < !--Amount of memory to given OpenFlow switches-->
 <of_mem>32</of_mem>
 < !--Changed Ethernet switch to OpenFlow switch-->
 < !--which also spawns an xterm-->
 <openflowswitch name="sw1">
   <xterm>true</xterm>
 </openflowswitch>
 < !--Two OpenFlow switch-->
 <openflowswitch name="of1">
 </openflowswitch>
 <openflowswitch name="of2">
 </openflowswitch>
 < !--Two hosts, one with an xterm-->
 <host name="host1">
 </host>
 <host name="host2">
   <xterm>true</xterm>
 </host>
 < !--Connecting host1 with of2 with wirefilter-->
 <link end1="host1" end2="of2">
   <wirefilter>true</wirefilter>
 </link>
 < !--Connecting switches-->
 <link end1="of1" end2="of2" />
 <link end1="sw1" end2="of2" />
 < !--Connecting host2 with sw1-->
 <link end1="host2" end2="sw1" />
</network>

Other valid XML declaration can be retrieved from the XML schema definition file OpenFlowVMS/xsd/vms.xsd, which can also be used to validate the configuration file.

It is worth mentioning that wirefilter allows us to emulate loss and delay in the connection. Further, it allows us to remove and add links dynamically. Hence it serves as the basic building block for wireless simulation in this environment.

Checking the Configuration

There is a few ways to check the validation of the configuration we have created above. It is a good practice to validate your network, before running it.

Verify the XML

We can check the validity of our configuration by verifying it against its schema definition.

xmlstarlet val -e -s OpenFlowVMS/xsd/vms.xsd <working directory>/2hosts-3ofsw.vms.xml

Errors will be listed if any, else the file will be declared as valid.

Viewing the Network

Network

Also, we can draw the network and see if it is what we have intended.

 vms-draw.py 2hosts-3ofsw.vms.xml

You should see the figure on the right (labeled Network). Note that the dotted line indicates a link with wirefilter. The tool also allows the figure to be drawn in different formats.

Running the Network

To run your network, you will now run

vms-start.py 2hosts-3ofsw.vms.xml

Note that files and directories needed for the setup will be checked for in the script.

Note that the vde directory generated contains the UNIX sockets through which you can control the VDE switches and wirefilters. Hosts and OpenFlow switches are run in qemu virtual machines, using screen.

Viola! Your very own OpenFlow network! All you have to do is to have your OpenFlow controller running at localhost port 2525.

Stopping your Network

To stop simulated network, there are two ways. The recommended way is to run

./<your network name>-stop.sh

which is generated when you run vms-start.py. The other "violent" method is to kill all the networks at one go using

vms-start.py -k
Copyright 2008 by the OpenFlow Consortium. All rights reserved. Powered by MediaWiki and WordPress.