Installing Mininet, OpenDaylight and Open vSwitch. The easiest way to get started with a quick SDN lab image is using the Mininet image that is now managed by the ONLAB which is part of the ONRC.They do a nice job keeping the images maintained. OpenDayLight is an SDN controller that is funded by the Linux foundation and is feature rich, making it a popular choice for a SDN controller. This tutorial will walk you through installation of OpenDayLight Beryllium Controller on an Ubuntu VM with mininet installed on it.
Note: FYI, this is no longer up to date. Please see the project pages for the latest info and tutorials.
These VMs contains the following working components, along with a snapshot of any bugs from the time of pull. Very little if any Linux knowledge is required. Never a bad time to learn Linux anywho if you havent made the time before.
There will be plenty of bugs, but this is all brand new so be patient or help fix it. You can update the code by pulling updates, or just deleting the code directory and re-cloning the repo with the instructions in the second part of this post:
-A working OpenDaylight bootstrap controller.
-Wireshark w/ OpenFlow dissector.
-Eclipse w/ working OpenDaylight bootstrap controller.
-VM running Ubuntu 12.04.
-Intructions for installing all of the software above.
-The only service running outside of the vanilla Ubuntu install is ssh daemon. To remove run 'sudo apt-get purge openssh-server'.-VM is set to attach to the bridge your Nic is attached to rather than sharing the hosts NIC (PAT).
-DHCP is enabled on the VM.
There is a post for this at http://networkstatic.net/pre-built-opendaylight-vm-images/ That includes some videos and a bit more detail it it helps.
Both ODP and Wireshark are preinstalled on the guest VM image. The second section has instructions to install the software on another host.
*The ODP-Lab1-VM.mp4.zip (40MB) Is a video to look at before you download to see if it is something you want to download.
*The ODP-VM-Ops.zip (1.6GB) image contains both current bootstraps Wireshark + Dissector and intructions to start them both.
*The ODP-VM-Dev.zip (2.7GB) image contains both bootstraps already built into Eclipse along with the controller, Wireshark + Dissector, both current bootstraps and intructions to start them both.
For the quickstart the user ID is: 'odp' and the password is: 'passwd'. Change the password on install.
Here is the video from the project http://youtu.be/2K6Wnt3eMb8 or clone the repo for it.
Or you can clone the project to download it with:
git clone https://github.com/nerdalert/OpenDaylight-Lab.git
Download the VM
Thanks to my buddy Bill Owens of Nysernet.org for hosting the VM image. Bill also hosts some cool stuff from our friends at https://github.com/CPqD/
ftp://anonymous@paperboy.nysernet.org (Connect as 'Guest' or Anonymous)
I have moved it off GitHub since they disabled downloads and Dropbox likes to disable accounts for BW violations :-/
https://filezilla-project.org
Vmware Image Import
The images are in a .OVF format that should interop with about any hypervisor out there. I am leaving the how to below for *.Vmwarevm in case anyone needs it but I have changed the images to *.OVF.
Vmware (Commercial - Easy) - If using VMware add a guest host and locate the existing virtual disk or just unzip and double-click the vmwarevm image file.
VirtualBox Image Import
VirtualBox (Free - Easyish) - Before importing the guest VM, you just need to convert the ODP-VM-Lab1.vmwarevm image into an OVF format to import into VirtualBox.
Download VirtualBox at https://www.virtualbox.org/wiki/Downloads
Download the VMware OVF Tool (Open Virtualization Format) http://www.vmware.com/support/developer/ovf/
The tool is freeish other then having to register with Vmware or login
ovftool original-disk.vmx new-disk.ovf
e.g.
ovftool ODP-VM-Lab1.vmx ODP-VM-Lab1.ovf
Windows Example: ovftool “C:UsersNAMEDocumentsVirtual MachinesWindows 7 x64ODP-VM-Lab1.vmx” C:ODP-VM-Lab1.ovf
Mac OSX Example: /Applications/'VMware Fusion.app'/Contents/Library/'VMware OVF Tool'/ovftool ODP-VM-Lab1.vmwarevm/ODP-VM-Lab1.vmx ./ODP-VM-Lab1.ovf
After the conversion, delete the Manifest file created 'ODP-VM-Lab1.mf' to avoid a (VERR_MANIFEST_FILE_MISMATCH) error on import.
Once converted, Open VirtualBox -> File -> Import Appliance -> Find ODP-VM-xBox.ovf (or whatever you exported it to).
Adjust any of the resources (CPU, Mem, Nic) and click import.
KVM / Qemu Image Import
KVM (Free -Advanced) - KVM has native support for VMDK images. Look at the VMX config file for the following attributes:
scsi0:0.fileName, uuid.bios, ethernet0.generatedAddress
example: kvm -drive file=zimbra-000001.vmdk,boot=on
-net nic,macaddr=00:0c:29:c3:93:b9 -net tap
-uuid 564d3f3d-3280-5bf2-9431-21c9b2c393b9
or convert it with:
kvm-img convert -O qcow2 zimbra-000001.vmdk zimbra.qcow2
VM System Settings
Default VM account UID/password
User ID: odp
password: passwd
Change the root password type: 'passwd' in the console.
It is recommended to install the guest OS tools whether using VirtualBox or VM Fusion for mem ballooning copy/paste etc.
After installing the mini.iso image, you can add a fairly stripped down Ubuntu GUI with the following (~500MB):
sudo apt-get install xorg xterm gdm ubuntu-desktop menu firefox gksu synaptic --no-install-recommends
Starting OpenDaylight (ODP) Bootstrap #1
- cd /home/odp/controller/opendaylight/distribution/opendaylight/target/distribution.opendaylight-0.1.0-SNAPSHOT-osgipackage/opendaylight
- ./run.sh
- Click hyperlink on the desktop or any browser that can reach the IP of the guest VM to http://:8080
The OpenDaylight web UI is:
Username: admin
Passwork: admin
Operating OpenDaylight SDN Controller Platform (OSCP) Bootstrap #2
Start a copy of the Controller.
make start-sdnplatform
or
java -jar target/sdnplatform.jar
To stop the controller:
make stop-sdnplatform
Starting Wireshark
If you want to run everything on another machine, ssh to the guest VM using 'ssh -X ' (upper case) to X11 forwarding.
- Double click the Wireshark icon on the desktop (run with sudo privs, ignore Lua error).
- Capture -> Interfaces -> eth0. Then start the capture.
- Type 'of' (no parentheses) in the filter window to ignore all packets other then OpenFlow packets (recommended).
Using ODP
Recommend using X11 forwarding to the mininet instance in order to forward Wireshark w/X11 over the SSH session. 'ssh -X '
- Start the Mininet or physical switch.
- If physical switch piont it at the running VMs IP addr.
- If Mininet, start the mininet VM and from the CLI type:
sudo mn --controller=remote,ip= --topo tree,3
The newest version of mininet has a different syntax:
sudo mn --mac --controller=remote -- --port=6633
A video using Mininet w/ODP can be found here:
http://networkstatic.net/opendaylight-openflow-tutorial/
Follow this tutorial for configuring ODP Bootstrap #1.
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation
Follow this tutorial for configuring ODP Bootstrap #2.
https://wiki.opendaylight.org/view/OpenDaylight_SDN_Controller_Platform_(OSCP):Installation
There will be more in coming weeks as functionality increases and projects merge.
The rest of this section if for installing the software that is on the VM image in this repo. If you are just using that image, you don't need to install any of this. Building out your own lab rig would be good experience for anyone unfamiliar with Linux or building software.
Installing a Hypervisor and Guest VM
Setting up a stripped down Ubuntu VM. Download the Minimal CD.
Ubuntu mini.iso - https://help.ubuntu.com/community/Installation/MinimalCD
A video of installing with VirtualBox can be found here:
http://networkstatic.net/openvswitch-and-openflow-lab-preparation/
Installing OpenDaylight Controller Bootstrap #1
This is in order to run the project.
- apt-get update
- apt-get install maven git openjdk-7-jre openjdk-7-jdk
- git clone http://git.opendaylight.org/gerrit/p/controller.git
- cd controller/opendaylight/distribution/opendaylight/
- mvn clean install
- cd target/distribution.opendaylight-0.1.0-SNAPSHOT-osgipackage/opendaylight
- export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386/ (add to ~/.bashrc for ENV persistency)
- ./run.sh
Installing OpenDaylight SDN Controller Platform (OSCP) Bootstrap #2
sudo apt-get install unzip python-dev python-virtualenv build-essential ant git openjdk-7-jdk
git clone http://git.opendaylight.org/gerrit/p/net-virt-platform.git
cd net-virt-platform/
./setup.sh
make
Prepare the CLI w/
source /home/odp/net-virt-platform/workspace/ve/bin/activate
make stop-sdncon reset-cassandra start-sdncon
Installing Wireshark and the OpenFlow dissector
- apt-get update && apt-get install wireshark-dev wireshark mercurial git scons
- hg clone https://bitbucket.org/barnstorm/of-dissector
- cd of-dissector/src
- alias sudo='sudo env WIRESHARK=/usr/include/wireshark/'
- sudo scons install
#This creates a shared object (so) named openflow.so.
#Move openflow.so to the Wireshark plugin directory. - sudo mv /home/odp/.wireshark/plugins/openflow.so /usr/lib/wireshark/libwireshark2/plugins/
- Start Wireshark, look in Help->About->Plugins tab. You should see openflow.so as a listed dissector.
Installing Eclipse Bootstrap #1
Architectural overview of ODP https://wiki.opendaylight.org/view/OpenDaylight_Controller:Architectural_Principles
Download Eclipse IDE for Java EE Developers:
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr2
tar xvfz eclipse-jee-juno-SR2-linux-gtk-x86_64.tar.gz
Instructions for importing Bootsrap #1 into Eclipse see:
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Eclipse_CLI_Setup
Video for importing ODP Bootstrap #1 into Eclipse:
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Importing_OpenDaylight_Controller_into_Eclipse
For a Pull only Eclipse build the following will get you started.
- git clone http://git.opendaylight.org/gerrit/p/controller.git
- cd controller/opendaylight/distribution/opendaylight/
- From the CLI run -> mvn clean install (5-10 minutes and requires decent bandwidth. It is slightly sensitve to lame bandwidth like my DSL.)
- Open Eclipse and install m2e.
- Help -> Install software -> 'work with' enter the URI http://download.eclipse.org/technology/m2e/releases
- Choose the latest m2e release v1.3x. next, next, yes, finish, restart, etc.
- Import ODP: File -> import -> Maven -> Existing Maven Project -> Find the ODP dir. Anywhere at the top of the git clone
- Eclipse will parse out the pom.xml files and present all builds (leave everything checked). There should be 0 errors at this point.
- Click finish. Eclipse will install Tycho and buildhelper automatically. Next, next, finish, except warning of non-signed SW. Eclipse will ask to restart again.
- If a new install you will get the welcome screen again, just close that. Next Maven will reconcile the project, watch the status bar in the bottom right. Avoid too much clicking around until it is done to avoid any issues.
- After the bottom right status gets to 100%. In the left window, drill down into distribution.opendaylight. Find opendaylight.assembleit.launch, right click on it -> run-as -> 1. assembleit.launch. Maven will again build the project for a few minutes. You will likely have some errors in the bottom window and can likely ignore them.
- If successful, the console will eventually return '[INFO] Build Seccesful'.
- You can now run the controller directly from Eclipse by right clicking on 'opendaylight-application.launch' -> run-as -> oepndaylight-application. To stop the controller click the red square red stop button.
Importing Bootstrap #2 into Eclipse
Bootstrap #2 Overview:
https://wiki.opendaylight.org/view/OpenDaylight_SDN_Controller_Platform_(OSCP):Main#Open_SDN_Architecture
Instructions for importing Bootsrap #2 into Eclipse see:
https://wiki.opendaylight.org/view/OpenDaylight_SDN_Controller_Platform_(OSCP):Installation
- make eclipse
- Import 'sdnplatform' project into any eclipse workspace
Installing Open vSwitch
OVS can be used much like mininet for integrating hosts.
- apt-get install openvswitch-datapath-source bridge-utils
- module-assistant auto-install openvswitch-datapath
- apt-get install openvswitch-brcompat openvswitch-common openvswitch-controller
If you have the cycles, come contribute to the project. You dont have to be a programmer to contribute. Lots of documentation and architectural frameworks need to be created so jump in! Even just learning about OpenFlow / SDN and sharing that with someone else is a contribution. Hopefully this can cut down on basic build problems to keep dev focused. I will update as ODP milestones make sense. Feel free to contact me on twitter @networkstatic for information and be sure to join the mailing lists to share and collaborate with others using SDN.
Regards,
Brent
@networkstatic
http://networkstatic.net
From the course: Learning Git and GitHub
Course details
Version control is an essential skill for developers to master, and Git is by far the most popular version control system on the web. In this fast-paced course, author Ray Villalobos shows you how to install Git and use the fundamental commands you need to work with Git projects: moving files, managing logs, and working with branches. Plus, you'll learn how to work with the popular GitHub website to explore existing projects, clone them to your local hard drive, and use them as templates for your new projects. Get started now.
Want to explore Git and GitHub in more depth? Watch Git Essential Training for more comprehensive coverage of these tools.Instructor
Ray Villalobos
I love helping people learn full-stack development with a clear, practical style
- Ray Villalobos is a full-stack design/development teacher and senior staff instructor at LinkedIn Learning.His courses are focused on front-end design and development topics such as JavaScript, AngularJS, React, and Sass, plus frameworks like Bootstrap and tools that can make you a faster, more efficient developer. He has a clear and practical teaching style and will help you improve your skills through real-world exercises and projects.Previously, as a director of multimedia for Entravision Communications, Ray managed a network of radio and TV station websites on the East Coast. He also designed large newspaper sites and created interactive projects/games for the Tribune network of newspapers. You can reach him on LinkedIn or through other social networks @planetoftheweb. Check out his personal blog at http://raybo.org.
Skills covered in this course
Related courses
Welcome
“- In this video, I'll show you how to install Git on a Mac. If you wanna learn how to install Git on a PC, check out the next video. Installing things is pretty easy, all you have to do is go to the Git website, which is at git-scm.com, and then click on this Downloads for Mac button, and your download should automatically start, however, sometimes this doesn't quite work, so you have to click here to download manually, and then you have to wait five seconds, and you should see this installer package downloading. You can also click on this direct link right here, which will download it a little bit faster. Once the package finishes downloading, you can go to your downloads folder, or you can just click on this button right here, I'm using Google Chrome, and this will open up the DMG document, and you should see something like this that has the package, as well as a README text file and some other little files. If you've never installed Git before, you can double click on this package. You might get a message like this that says this package cannot be opened because it's from an unidentified developer, if you get that, just click OK, go to the apple menu and select System Preferences. And then, click on Security & Privacy, and then find this Open Anyway button, you can click on that, or if you want to, you can modify your preferences here. Click on this lock, then you can click on anywhere, then you won't see that message again. And, I'll hit Open Anyway, and just go through the install prompts. You may need to type in your password here. Just go ahead and close this. Now, if we wanna make sure that Git has installed, we need to go to our terminal application, and type in terminal, and in here, we can type in git --version to see what version of Git we're using. So, notice that I'm using Git version 2.4.0, that's the version that I downloaded. If you see something else here, there's some additional things that you may need to do. If you open up this README file, it tells you all about them, so for example, you can use this command right here. Some of the version that come with the Mac OS are almost impossible to uninstall, so let me actually go ahead and open this up, so that I can copy that command. And, you could do this command, and I'll type in my password here. Now, it says No such file or directory because I've already deleted that file, but if you run that command and it tells you something, it means that you're ready for the next step which is uninstalling your version of Git. So, you can drag this uninstall.sh bash file right here and hit return, it says that it's gonna uninstall Git, so we'll go ahead and hit yes, and it's gonna get rid of Git, let's go ahead and clear this out. Which means that we have to install it again, so we just go through the same process. Go to the apple menu, and security, say Open Anyway, close this out, and just go through these prompts again. And, once you're done with all that, you should be able to see the version of Git that you installed when you do git --version. And, that's all there is to it.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Download the exercise files for this course. Get started with a free trial today.
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Watch this course anytime, anywhere. Get started with a free trial today.