Getting ready

In this recipe, we will first install OpenDaylight locally. We will use its Beryllium version, as the latter versions removed OpenDaylight DLUX (the graphical user interface module) from bundling by default in the released binary ZIP:

wget https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.4-Beryllium-SR4/distribution-karaf-0.4.4-Beryllium-SR4.zip
  

You may also download other versions (such as Boron, Carbon, or latter versions in the future) from https://www.opendaylight.org/downloads. However, you will have to download and install the bundles such as DLUX on your own.

Unzip the distribution ZIP archive:

$ unzip distribution-karaf-0.4.4-Beryllium-SR4.zip
  

Then go to the bin folder:

$ cd distribution-karaf-0.4.4-Beryllium-SR4/bin
  

Now run the OpenDaylight controller by executing the karaf file:

$ ./karaf
karaf: Ignoring predefined value for KARAF_HOME
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
    
        ________                       ________                .__  .__       .__     __  
        \_____   ______   ____   ____ \______  _____  ___.__.|  | |__| ____ |  |___/  |_  
         /   |   \____ \_/ __  /     |    |  \__  <   |  ||  | |  |/ ___|  |     __    
        /    |      |_> >  ___/|   |  |    `   / __ \___  ||  |_|  / /_/  >   Y    |      
        \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__| 
                /|__|        /     /        /     //            /_____/          /          
    
    
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

OpenDaylight is a component-based software developed following the OSGi model. It uses Apache Karaf OSGi engine as its core. So you may notice that we run karaf to start OpenDaylight, opening an OSGi console as seen previously.

Install the DLUX and prerequisites:

opendaylight-user@root>feature:install odl-restconf odl-l2switch-switch odl-mdsal-apidocs odl-dlux-core
  

Now you should be able to access the DLUX web interface of OpenDaylight.

Navigate to http://localhost:8181/index.html in your browser. The default username and password are both admin.

Now, run Mininet from another window:

$  sudo mn --controller=remote,ip=127.0.0.1 --topo tree,depth=3,fanout=2
$ sudo mn --controller=remote,ip=127.0.0.1 --topo tree,depth=3,fanout=2
*** Creating network
*** Adding controller
Connecting to remote controller at 127.0.0.1:6653
*** Adding hosts and stations:
h1 h2 h3 h4 h5 h6 h7 h8 
*** Adding switches and access point(s):
s1 s2 s3 s4 s5 s6 s7 
*** Adding link(s):
(s1, s2) (s1, s5) (s2, s3) (s2, s4) (s3, h1) (s3, h2) (s4, h3) (s4, h4) (s5, s6) (s5, s7) (s6, h5) (s6, h6) (s7, h7) (s7, h8) 
*** Configuring hosts
*** Starting controller(s)
c0 
*** Starting switches and/or access points
s1 s2 s3 s4 s5 s6 s7 ...
*** Starting CLI:
mininet-wifi> 

Here, controller=remote, points to the OpenDaylight controller in 127.0.0.1. Make sure to run the controller first before running Mininet, as otherwise Mininet would have started its own internal controller as the remote controller in the same port.

The following screenshot indicates the admin console of OpenDaylight, indicating the network topology emulated by Mininet:

Network Topology in OpenDaylight DLUX

Next, we will run a simple Python program that emulates a network with switches and hosts with Mininet, and a remote controller. We will start OpenDaylight first as the remote controller.

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

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