Find file
3adff63 Jul 16, 2014
170 lines (133 sloc) 5.26 KB
#
# Copyright (c) 2013-2014 University of Wisconsin-La Crosse.
# All rights reserved.
#
# Additional copyrights may follow.
# See COPYING in top-level directory.
#
(1) Install netloc
--------------------------------------------------
First you have to build netloc, install it and add netloc binary path
to your PATH environment variable. In bash, just do:
$ PATH=$PATH:/path/to/netloc/installation/bin
$ export PATH
(2) Gather hwloc data
--------------------------------------------------
Then create a directory to gather your cluster information and enter it:
$ mkdir mycluster-data
$ cd mycluster-data/
Create a subdirectory "hwloc" and place the lstopo XML output of your nodes
there.
$ ssh node001 lstopo ~/mycluster-data/hwloc/node001.xml
[...]
$ ls -l hwloc/
-rw-r--r-- 1 user group 74242 13 sept. 15:07 node001.xml
[...]
-rw-r--r-- 1 user group 26438 24 sept. 08:59 node263.xml
-rw-r--r-- 1 user group 26438 13 sept. 08:11 node264.xml
(3) Run the netloc_reader_of for your OpenFlow controller
--------------------------------------------------
Note: For this example we will be using the 'floodlight' controller
Create a subdirectory "netloc" for the netloc specific files
$ mkdir netloc
Run the netloc reader for OpenFlow:
$ netloc_reader_of --controller floodlight
-- or --
$ netloc_reader_of --controller floodlight --subnet unknown --outdir netloc
(4) Verify the .ndat files
--------------------------------------------------
$ lsnettopo netloc
Network: ETH-unknown
Type : Ethernet
Subnet : unknown
Hosts : 8
Switches: 7
----- ***** ----- ***** ----- ***** ----- ***** ----- ***** ----- *****
***** ----- ***** ----- ***** ----- ***** ----- ***** ----- ***** -----
----- ***** ----- ***** ----- ***** ----- ***** ----- ***** ----- *****
Appendix A:
Emulating an OpenFlow network with mininet and Floodlight
--------------------------------------------------
(1) Download and install mininet in VirtualBox
http://mininet.github.com/download/
http://mininet.github.com/walkthrough/
- Make sure to setup the host-adapter
VirtualBox -> Preferences
"Network" -> Add vboxnet (with DNS)
- Setup the mininet VM
Setting -> Network -> Adapter 2 (Enable as Host-only Adapter)
- Start mininet VM
- sudo pico /etc/network/interfaces
Copy the "eth0" entry to an "eth1"
Save and exit
- Boot the eth1 interface
sudo ifup eth1
(2) Download and install Floodlight in Eclipse
http://docs.projectfloodlight.org/display/floodlightcontroller/Installation+Guide
(3) Launch mininet VM
- username/password: mininet/mininet
- Make sure eth1 is listed in 'ifconfig'
(4) Start floodlight controller
- Eclipse -> Run
(5) Start a Virtual network in the mininet VM
- IP of the floodlight controller is the gateway provided by
$ route -n
- Start up a simple tree topology:
$ sudo mn --mac --controller=remote,ip=10.0.2.2,port=6633 --topo tree,depth=3,fanout=2
- Have all nodes communicate with one another
$ pingall
(6) Use the netloc reader for OpenFlow to query the controller.
$ netloc_reader_of --controller floodlight -o netloc/
(7) Verify the output
$ lsnettopo netloc/
Network: ETH-unknown
Type : Ethernet
Subnet : unknown
Hosts : 8
Switches: 7
----- ***** ----- ***** ----- ***** ----- ***** ----- ***** ----- *****
***** ----- ***** ----- ***** ----- ***** ----- ***** ----- ***** -----
----- ***** ----- ***** ----- ***** ----- ***** ----- ***** ----- *****
Appendix B:
Emulating an OpenFlow network with mininet and OpenDaylight
--------------------------------------------------
(1) Download and install mininet in VirtualBox
See Appendix A.1
(2) Download and install OpenDaylight
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation
Unzip the target.zip file, then unzip file ending with: osgipackage.zip
$ unzip target.zip
$ cd target
$ unzip distribution.opendaylight-osgipackage.zip
$ cd opendaylight/
You may need to set the JAVA_HOME environment variable:
$ export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
(3) Startup the controller
$ ./run.sh
(4) Configure the controller (this shows a basic setup)
- Open an Internet browser and go to
http://127.0.0.1/8080
- login using
username: admin
password: admin
- In the bottom right frame labeled 'Subnet Gateway Configuration'
- Click the button 'Add Gateway IP Address'
- Give it the name 'subnet1' and add the IP and subnet of '10.0.0.254/8'
(5) Setup mininet
See Appendix A.5
Note that when you do a pingall the first node will timeout on all hosts.
When you run it again, then all hosts will be connected.
The controller website will also display all nodes and switches.
Some additional details at the link below:
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation
(6) Use the netloc reader for OpenFlow to query the controller.
$ netloc_reader_of --controller opendaylight -o netloc/
-- or if you have changed the username/password
$ netloc_reader_of --controller opendaylight -o netloc/ -u <USERNAME> -p <PASSWORD>
(7) Verify the output
$ lsnettopo netloc/
Network: ETH-unknown
Type : Ethernet
Subnet : unknown
Hosts : 8
Switches: 7