Using the OpenDaylight SDN Controller with the Mininet Network Emulator

OpenDaylight (ODL) is a popular open-source SDN controller framework. To learn more about OpenDaylight, it is helpful to use it to manage an emulated network of virtual switches and virtual hosts. Most people use the Mininet network emulator to create a virtual SDN network for OpenDaylight to control.

odl-0100-b

In this post, I will show how to set up OpenDaylight to control an emulated Mininet network using OpenFlow 1.3. Because I am using virtual machines, the procedure I use will work the same in all commonly used host systems: Linux, Windows, and Mac OS X.

Using Virtual Machines

In this lab example, I will use two virtual machines. One will run the Mininet emulated network and the other will run the OpenDaylight controller. I will connect both VMs to a host-only network so they can communicate with each other and with programs running on the host computer, such as ssh and the X11 client.

I will use VirtualBox to run the Mininet VM that I downloaded from the mininet project web site, which is the easiest way to experiment with Mininet. The Mininet project team provides an Ubuntu 14.04 LTS VM image with Mininet 2.2.1, Wireshark and OpenFlow dissector tools already installed and ready to use.

I will install and run the OpenDaylight SDN controller on a new VM I create in VirtualBox.

Setting up the OpenDaylight Virtual Machine

To build the OpenDaylight virtual machine, I downloaded the Ubuntu Server ISO image from the ubuntu.com web site. Then I installed it in a new VM in VirtualBox. If you need directions on how to install an ISO disk image in a VirtualBox virtual machine, please see my post about installing Debian in a VirtualBox VM.

Give the virtual machine a descriptive name. I named the virtual machine OpenDaylight. Configure it so it uses two CPUs and 2 GB or RAM. This is the minimum configuration to support OpenDaylight. Then add a host-only network adapter to the VM.

When the VM is powered off, click on the Settings button:

The OpenDaylight virtual machine
The OpenDaylight virtual machine

In the VM’s VirtualBox network settings, enable two network interfaces. Connect the first network adapter to the NAT interface (which is the default setting) and the second network adapter to the host-only network, vboxnet0.

Connecting network adapter 2 to the host-only network
Connecting network adapter 2 to the host-only network

Configure OpenDaylight VM interfaces

By default, the VM’s first network adapter is attached to the VirtualBox NAT interface and is already configured when the VM boots up. We need to configure the second network adapter, which is attached to the VirtualBox host-only interface vboxnet0.

List all the devices using th ip command:

brian@odl:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:ec:a9:f1 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feec:a9f1/64 scope link
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:00:27:b0:f6:70 brd ff:ff:ff:ff:ff:ff
brian@odl:~$

Note: starting in 15.10, Ubuntu uses predictable network interface names like enp0s3 and enp0s8, instead of the classic interface names like eth0 and eth1.

We see that interface enp0s8 has no IP address. This is the second network adapter connected to vboxnet0. VirtualBox can assign an IP address on this interface using DHCP if the DCHP client requests it. So, run the following command to set up interface enp0s8:

brian@odl:~$ sudo dhclient enp0s8  

Now check the IP address assigned to enp0s8:

brian@odl:~$ ip addr show enp0s8
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:b0:f6:70 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.101/24 brd 192.168.56.255 scope global enp0s8
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feb0:f670/64 scope link
       valid_lft forever preferred_lft forever
brian@odl:~$

Now we see the VirtualBox DHCP server connected to the host-only network assigned the IP address 192.168.56.101 to this interface. This is the IP address we should use when connecting to any application running on the VM.

On your system the assigned IP address may be different. You may have set up the VirtualBox preferences to use a different network prefix for the host-only network, or may have configured the DHCP server to provide a diferent address range. Also, if any other VMs were started and connected to the host-only network before this VM, then the IP address assigned will be different. If the IP address is different, that’s OK. Just use the address assigned.

Now, configure the interface enp0s8 so it will remain configured after a restart. Edit the /etc/network/interfaces file:

brian@odl:~$ sudo nano /etc/network/interfaces

Add the following lines to the end of the file /etc/network/interfaces:

# the host-only network interface
auto enp0s8
iface enp0s8 inet dhcp

Connect to the OpenDaylight VM using SSH

I like to use a terminal application when working on Virtual Machines. The VirtualBox console window has too many annoying limitations. For example, I cannot cut-and-paste text from my host system onto the VirtualBox console attached to the virtual machine, or vice-versa.

Open a terminal on host computer and login using SSH:

brian@T420:~$ ssh -X [email protected]

Now you are connected to the OpenDaylight virtual machine and can see that the host name in the prompt is changed to is odl, which I configured when installing Ubuntu on the VM.

brian@odl:~$

I also enabled X forwarding when I started SSH so I can run X programs on the OpenDaylight VM, although we won’t do that in this tutorial.

Install Java

The OpenDaylight SDN controller is a Java program so install the Java run-time environment with the following command:

$ sudo apt-get update
$ sudo apt-get install default-jre-headless

Set the JAVA_HOME environment variable. Edit the bashrc file

brian@odl:~$ nano ~/.bashrc

Add the following line to the bashrc file:

export JAVA_HOME=/usr/lib/jvm/default-java

Then run the file:

brian@odl:~$ source ~/.bashrc

Install OpenDaylight

Download the OpenDaylight software from the OpenDaylight web site. On a Linux or Mac OS host, we can use the wget command to download the tar file.

brian@odl:~$ wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.4.0-Beryllium/distribution-karaf-0.4.0-Beryllium.tar.gz

Install OpenDaylight by extracting the tar file:

brian@odl:~$ tar -xvf distribution-karaf-0.4.0-Beryllium.tar.gz

This creates a folder named distribution-karaf-0.4.0-Beryllium which contains the OpenDaylight software and plugins.

OpenDaylight is packaged in a karaf container. Karaf is a container technology that allows the developers to put all required software in a single distribution folder. This makes it easy to install or re-install OpenDaylight when needed because everything is in one folder. As we will see later, karaf also allows programs to be bundled with optional modules that can be installed when needed.

Start OpenDaylight

To run OpenDaylight, run the karaf command inside the package distribution folder.

brian@odl:~$ cd distribution-karaf-0.4.0-Beryllium
brian@odl:~$ ./bin/karaf

Now the OpenDaylight controller is running.

OpenDaylight running in a virtual machine
OpenDaylight running in a virtual machine

Install OpenDaylight features

Next, install the minimum set of features required to test OpenDaylight and the OpenDaylight GUI:

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

The above is an example of installing optional modules in a karaf container. You only need to install an optional feature once. Once installed, these features are permanently added to the controller and will run every time it starts.

We installed the following features. Click on each feature to learn more about it:

To list all available optional features, run the command:

opendaylight-user@root> feature:list

To list all installed features, run the command:

opendaylight-user@root> feature:list --installed    

Information about OpenDaylight optional features is available on the OpenDaylight wiki.

Stop OpenDaylight

When you want to stop the controller, enter the <ctrl-d> key combination or type system:shutdown or logout at the opendaylight-user prompt.

Set up the Mininet Virtual Machine

I do not cover all the steps required to set up the Mininet VM in this post because I already covered that topic in another post: Setting up the Mininet VM.

Start the Mininet VM in the VirtualBox Manager. Now we should have two VMs running: OpenDaylight VM and Mininet VM. If we started the OpenDaylight VM first, it will have IP address 192.168.56.101 and the mininet VM will receive the second available IP address on the host-only network, 192,168.56.102. We can verify this by running the ip command on the Mininet VM console:

mininet@mininet-vm:~$ ip addr show 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:e2:98:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.102/24 brd 192.168.56.255 scope global eth0
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:1b:c1:07 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.16/24 brd 10.0.2.255 scope global enp0s3
       valid_lft forever preferred_lft forever
mininet@mininet-vm:~$

Note: The Mininet VM is based on Ubuntu Server 14.04, which does not yet use the predictable network interface names like enp0s3 and enp0s8, so we see interface names like eth0 and eth1.

We see eth0 is connected to the host-only interface because it has IP address 192.168.56.102 which is in the address range assigned by the VirtualBox hot-only network DHCP server. So we know we need to use IP address 192.168.56.102 to access applications running on this virtual machine.

Connect to the Mininet VM using SSH

Now open a terminal window on your host computer and SSH into the Mininet VM. Turn X forwarding on. (If you are using Windows, use Xming for an X Window System Server and Putty as an SSH client)

brian@T420:~$ ssh -X 198.168.56.102

Start Mininet

On the Mininet VM, start a simple network topology. In this case, we will do the following:

  • Set up three switches in a linear topology
  • Each switch will be connected to one host
  • The MAC address on each host will be set to a simple number
  • The remote controller, OpenDaylight, is at IP address 192.168.56.101:6633
  • We will use OpenFlow version 1.3

The Mininet command to start this is:

mininet@mininet-vm:~$ sudo mn --topo linear,3 --mac --controller=remote,ip=192.168.56.101,port=6633 --switch ovs,protocols=OpenFlow13

Test the network

Test that the OpenDaylight controller is working by pinging all nodes. Every host should be able to reach every other host:

mininet> pingall
*** Ping: testing ping reachability
h1 -> h2 h3
h2 -> h1 h3
h3 -> h1 h2
*** Results: 0% dropped (6/6 received)

The OpenDaylight Graphical User Interface

Open a browser on your host system and enter the URL of the OpenDaylight User Interface (DLUX UI). It is running on the OpenDaylight VM so the IP address is 192.168.56.102 and the port, defined by the application, is 8181:

So the URL is: http://192.168.56.101:8181/index.html.

The default username and password are both admin.

Log in to OpenDaylight controller
Log in to OpenDaylight controller

Topology

Now we see the network topology in the OpenDaylight controller’s topology tab.

Topology of the Mininet network
Topology of the Mininet network

You can see the network that is emulated by the Mininet network emulator. You may test OpenDaylight functionality by building different network topologies in Mininet with different attributes, and by using OpenDaylight to run experiments on the emulated network. For example, you may break links between switches in Mininet to test how the network responds to faults.

Nodes

Click on the Nodes tab to see information about each switch in the network:

List of nodes
List of nodes

Click on the Node Connectors link in each row to see information about each port on the switch:

Interfaces
Interfaces

Yang UI

Yang is a data modelling structure. Engineers who work with hardware routers and switches will be familiar with another data modeling structure based on SNMP, SMI, and MIB. Yang provides functionality in SDN switches that is analogous to SMI for non-SDN switches.

The OpenDaylight Yang UI is a graphical REST client for building and sending REST requests to the OpenDaylight data store. We can use the Yang UI to get information from the data store, or to build REST commands to modify information in the data store — changing network configurations.

Click on the Yang UI tab. Then click on the Expand all button to see all available APIs. Not all of them will work because we did not install all features. One API that will work is the Inventory API. Click on it, then navigate down to the nodes attribute and click on the Send button to send the GET API method to the controller.

Yang data model of the network
Yang data model of the network

Scroll down to see all the inventory information about the network: nodes, ports, statistics, etc. Click on the switches and interfaces to see the details of each.

Understanding the Yang data model and learning how to read and write to the data store is key to understanding Software Defined Networking with the OpenDaylight controller.

Capturing OpenFlow Messages

To dive deeper into how SDN controllers and switches operate, you may want to view the OpenFlow messages exchanged between the controller and switches in the network.

The Mininet VM comes with Wireshark installed, with a custom version of the OpenFlow dissector already set up.

So the easiest way to view OpenFlow messages is to start Wireshark on the Mininet VM and capture data on the interface connected to the host-only network, which is eth0 in this case.

open a new terminal window and connect to the Mininet VM using SSH with X Forwarding enabled (or use Putty and Xming if you are using Windows):

brian@T420:~$ ssh -X 192.168.56.102

Start Wireshark on the Mininet VM:

mininet@mininet-vm:~$ sudo wireshark &

You will see a warning dialog but you can ignore it. Starting Wireshark with root privileges is a security risk but, for our simple testing, we can ignore that — or you can follow the directions in the warning message to set up Wireshark in a more secure way.

Create a display filter for OpenFlow messages. Enter the text, of in the Filter window and click on Apply. Now you will see only OpenFlow messages in the Wireshark display, as shown below.

Viewing captured OpenFlow messages in Wireshark
Viewing captured OpenFlow messages in Wireshark

Shut down the project

When it is time to end the project, shut down Mininet and OpenDaylight using the following commands:

On the Mininet VM, stop Mininet and clean up the node, then shut down the VM:

mininet> exit
mininet@mininet:~$ sudo mn -c
mininet@mininet:~$ sudo shutdown -h now

On the OpenDaylight VM, stop OpenDaylight and shut down the VM:

opendaylight-user@root> system:shutdown
brian@odl:~$ sudo shutdown -h now

Both VMs should now show that they are stopped in the VirtualBox Manager application.

Conclusion

We showed how to install OpenDaylight in a virtual machine and connect it to the Mininet network emulator running on another virtual machine. We demonstrated some features of OpenDaylight and showed how to capture OpenFlow messages exchanged between the controller and the emulated switches.

85 thoughts on “Using the OpenDaylight SDN Controller with the Mininet Network Emulator”

  1. Thanks! I found a typing error under “Install JAVA”. It should be “$ sudo apt-get install default-jre-headless” (“install” is missing)

      1. Thanks for the article.
        Everything is working fine except that, the data is not getting reflected in Nodes tab of ODL GUI.
        Its showing as “No Data Found”. I have installed all the packages of dlux but of no use.

        (there was some problem is posting comment. so I had to ask my question as reply “sorry for that”)

  2. Navdeep Uniyal

    Thank you for the tutorial. I am trying to connect my mininet host to internet by doing following steps:
    ovs-vsctl add-port s1 eth0
    ifconfig eth0 0
    dhclient s1
    Mininet CLI> h1 ifconfig h1-eth0 0
    Mininet CLI> h1 dhclient h1-eth0

    This is working fine and I am able to ping 8.8.8.8 from host h1, when I am using mininet default controller but while running ODL on the same machine (Ubuntu 14.04 LTS) the process hangs on dhclient. I am unable to resolve this. Please if you can help.

  3. Hi, I’m having issues installing the additional features and keep getting the following sorts of messages:
    Error executing command: Can’t install feature odl-restconf/0.0.0:
    Could not start bundle mvn:org.opendaylight.yangtools/concepts/0.8.0-Beryllium in feature(s) odl-yangtools-common-0.8.0-Beryllium: The bundle “org.opendaylight.yangtools.concepts_0.8.0.Beryllium [1251]” could not be resolved. Reason: Missing Constraint: Require-Capability: osgi.ee; filter=”(&(osgi.ee=JavaSE)(version=1.7))”

    I updated my Java to v1.7 but haven’t been able to fix the problem. Any suggestions?

    Thanks.

    1. abnormaldehyde

      Hi Alex!
      i faced the same problem but now its solved. Way is:

      1. use “sudo ./distribution-karaf-0.4.0-Beryllium/bin/karaf” to start the ODL.
      2. for 64 bit Ubuntu, give the command :
      “export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64”
      or, for 32 bit Ubuntu, give the command :
      “export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386”

    1. I cannot tell what the problem is from just this information. If you followed the procedure I described exactly then check the status of the IP interfaces on the ODL VM.
      Brian

  4. i want to add codes with features like pyretic firewall (java language) in my sdn controller but i m not able to add that code to my sdn controller i have done all these basic steps…..
    Can someone help me with this

    1. What are you trying to accomplish? Are you working on something similar to the netIDE project (http://www.netide.eu/)? Are you trying to run a network application written for Pyretic on OpenDaylight?
      I am not a developer so I cannot help with coding applications.

  5. Hi,
    I am new to this forum and trying to understand Mininet usage within SDN. Mininet is creating and connecting with dummy nodes. Instead is there any possibility to connect the physical nodes?
    Regards,

    1. Hi Lakshmi,
      You may run a remote controller on a different computer and use it to control mininet switches on another computer.
      You may set up physical SDN switches and connect them to each other, to physical hosts, and to a controller. But if you do that, you do not need Mininet.
      Brian

  6. Megholova Mukherjee

    Hi Brian,
    Your tutorial was immensely helpful. I have followed everything step by step. There were no issues during installation and I can ping from one vm to the other. But whenever I try to create a mininet topology using the remote controller (as you have mentioned in your tutorial) I see “unable to connect to controller”. Also I get an error message for “ovs” switch. Could you please help me solve this issue? I am completely new to this and I have a project due very soon for my semester exam.

      1. Megholova Mukherjee

        Hi Nidhi,
        I followed the same procedure again. This time I was able to connect to the controller. Make sure that during Ubuntu installation you install OpneSSH server feature. Otherwise it will not connect from SSH terminal.

  7. I tried you procedure. But the ping fails.
    pinv@pinv-sys:~$ sudo mn –topo linear,3 –mac –controller=remote,ip=10.130.100.40,port=8181 –switch ovs,protocols=OpenFlow13
    *** Creating network
    *** Adding controller
    *** Adding hosts:
    h1 h2 h3
    *** Adding switches:
    s1 s2 s3
    *** Adding links:
    (h1, s1) (h2, s2) (h3, s3) (s2, s1) (s3, s2)
    *** Configuring hosts
    h1 h2 h3
    *** Starting controller
    c0
    *** Starting 3 switches
    s1 s2 s3 …
    *** Starting CLI:
    mininet> ping all
    *** Unknown command: ping all
    mininet> h1 ping h2
    PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
    From 10.0.0.1 icmp_seq=1 Destination Host Unreachable

    1. And forgot to mention, the controller used is ODL – Berylium
      All nodes are physical hosts, not VM.
      Able to ping from mininet node to ODL node.
      pinv@pinv-sys:~$ ping 10.130.100.40
      PING 10.130.100.40 (10.130.100.40) 56(84) bytes of data.
      64 bytes from 10.130.100.40: icmp_seq=1 ttl=63 time=1.02 ms.

      Can you suggest any troubleshooting tips.

        1. I could connect to the ODL web through 10.130.100.40/8181.index.html.
          So, I used 8181.

          When I tried with 6633 it says :-

          pinv@pinv-sys:~$ sudo mn –topo linear,3 –mac –controller=remote,ip=10.130.101.78,port=6633 –switch ovs,protocols=OpenFlow13
          *** Creating network
          *** Adding controller
          Unable to contact the remote controller at 10.130.100.40:6633.

          1. Hey Raj! Did you figure out what the issue was? When I try to test by executing pingall, I get this. Let me know if you figured out what port number to use for ODL. Thanks.
            h1 -> X X
            h2 -> X X
            h3 -> X X
            *** Results: 100% dropped (0/6 received)

        2. Hi Brian, is there a way to run any security solution (e.g Hp network protector) on an opendaylight controller?

          Thanks.

  8. Hey Brian! Thanks for writing this blog. I followed the steps mentioned to create OpenDaylight VM. When I try to connect to that VM from the host machine using SSH, there is a Connection Refused error popping up. Could you please tell me what might have gone wrong? I used port 22 and the ip assigned to the host-only interface.

  9. Hi Brian !
    My name is Nam. I come from VietNamese. I use English Language is not well. So please try to understand my issue. First,Thanks you very much for writing this blog. However, I got an issue when following the steps mentioned to start the Mininet. Below is detail:
    Step 1: Set up and start OpenDayLight

    namvo@ubuntu:~/distribution-karaf-0.4.0-Beryllium$ ./bin/karaf
    OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0

    ________ ________ .__ .__ .__ __
    \_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
    / | \\____ \_/ __ \ / \ | | \\__ \ > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
    \_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
    \/|__| \/ \/ \/ \/\/ /_____/ \/

    Hit ” for a list of available commands
    and ‘[cmd] –help’ for help on a specific command.
    Hit ” or type ‘system:shutdown’ or ‘logout’ to shutdown OpenDaylight.

    Step 2: Set up and start mininet, but I get an issue is “Unable to contact the remote controller at 192.168.56.101:6633”

    mininet@mininet-vm:~$ sudo mn –topo linear,3 –mac –controller=remote,ip=192.168.56.101,port=6633 –switch ovs,protocols=OpenFlow13
    *** Creating network
    *** Adding controller
    Unable to contact the remote controller at 192.168.56.101:6633
    *** Adding hosts:
    h1 h2 h3
    *** Adding switches:
    s1 s2 s3
    *** Adding links:
    (h1, s1) (h2, s2) (h3, s3) (s2, s1) (s3, s2)
    *** Configuring hosts
    h1 h2 h3
    *** Starting controller
    c0
    *** Starting 3 switches
    s1 s2 s3 …
    *** Starting CLI:
    mininet> pingall
    *** Ping: testing ping reachability
    h1 -> X X
    h2 -> X X
    h3 -> X X
    *** Results: 100% dropped (0/6 received)

    Thanks,
    Nam Vo

    1. Add IP information:
      Mininet Machine:
      mininet@mininet-vm:~$ ip addr show
      1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
      2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 08:00:27:27:6f:5d brd ff:ff:ff:ff:ff:ff
      inet 192.168.56.102/24 brd 192.168.56.255 scope global eth0
      valid_lft forever preferred_lft forever
      3: eth1: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 08:00:27:8a:d5:69 brd ff:ff:ff:ff:ff:ff
      inet 10.0.2.15/24 brd 10.0.2.255 scope global eth1
      valid_lft forever preferred_lft forever
      11: ovs-system: mtu 1500 qdisc noop state DOWN group default
      link/ether ae:51:6f:18:19:e2 brd ff:ff:ff:ff:ff:ff

      OpenDaylight machine:

      1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
      2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 08:00:27:1e:b0:ba brd ff:ff:ff:ff:ff:ff
      inet 10.0.2.15/24 brd 10.0.2.255 scope global enp0s3
      valid_lft forever preferred_lft forever
      inet6 fe80::a00:27ff:fe1e:b0ba/64 scope link
      valid_lft forever preferred_lft forever
      3: enp0s8: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 08:00:27:f5:83:5e brd ff:ff:ff:ff:ff:ff
      inet 192.168.56.101/24 brd 192.168.56.255 scope global enp0s8
      valid_lft forever preferred_lft forever
      inet6 fe80::a00:27ff:fef5:835e/64 scope link
      valid_lft forever preferred_lft forever

      Ping Information from DayLight Machine to mininet:
      namvo@ubuntu:~/distribution-karaf-0.4.0-Beryllium$ ping 192.168.56.102
      PING 192.168.56.102 (192.168.56.102) 56(84) bytes of data.
      64 bytes from 192.168.56.102: icmp_seq=1 ttl=64 time=0.524 ms

      Ping Information from mininet to DayLight machine:
      mininet@mininet-vm:~$ ping 192.168.56.101
      PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data.
      64 bytes from 192.168.56.101: icmp_seq=1 ttl=64 time=0.573 ms

    2. Please make sure of the following things:

      1) In ODL: Install these features: feature:install odl-openflowplugin-all odl-openflowplugin-flow-services-ui
      2) In Mininet: kill the process listening on TCP port 6633 and restart the topology
      Let me know if still doesn’t work.

      1. Hi Pawash,
        I do such your suggestions. However, I get an issue when installing the feature of OpenDayLight.

        Below is detail, what did id do:

        OpenDayLight: copy and paste into terminal “feature:install odl-openflowplugin-all odl-openflowplugin-flow-services-ui”
        opendaylight-user@root>feature:install odl-openflowplugin-all odl-openflowplugin-flow-services-ui
        Error executing command: Can’t install feature odl-openflowplugin-all/0.0.0:
        Bundle “org.opendaylight.controller.model.inventory” version “1.3.0.Beryllium” has already been installed from: mvn:org.opendaylight.controller.model/model-inventory/1.3.0-Beryllium

        Below is the using port in mininet:
        mininet@mininet-vm:~$ sudo netstat -lptu
        Active Internet connections (only servers)
        Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
        tcp 0 0 *:ssh *:* LISTEN 945/sshd
        udp 0 0 *:25565 *:* 1245/dhclient
        udp 0 0 *:bootpc *:* 1245/dhclient
        udp 0 0 *:bootpc *:* 571/dhclient
        udp 0 0 10.0.2.15:ntp *:* 1145/ntpd
        udp 0 0 192.168.56.102:ntp *:* 1145/ntpd
        udp 0 0 localhost:ntp *:* 1145/ntpd
        udp 0 0 *:ntp *:* 1145/ntpd
        udp 0 0 *:61742 *:* 571/dhclient

        Thanks you very much for your support time,
        Nam Vo

      2. Hi Pawash,
        I did such as your suggestions. However, I got an issue when installing the feature of OpenDayLight.

        Below is detail, what did I do:

        OpenDayLight: copy and paste into terminal “feature:install odl-openflowplugin-all odl-openflowplugin-flow-services-ui”
        opendaylight-user@root>feature:install odl-openflowplugin-all odl-openflowplugin-flow-services-ui
        Error executing command: Can’t install feature odl-openflowplugin-all/0.0.0:
        Bundle “org.opendaylight.controller.model.inventory” version “1.3.0.Beryllium” has already been installed from: mvn:org.opendaylight.controller.model/model-inventory/1.3.0-Beryllium

        Below is the using port in mininet:
        mininet@mininet-vm:~$ sudo netstat -lptu
        Active Internet connections (only servers)
        Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
        tcp 0 0 *:ssh *:* LISTEN 945/sshd
        udp 0 0 *:25565 *:* 1245/dhclient
        udp 0 0 *:bootpc *:* 1245/dhclient
        udp 0 0 *:bootpc *:* 571/dhclient
        udp 0 0 10.0.2.15:ntp *:* 1145/ntpd
        udp 0 0 192.168.56.102:ntp *:* 1145/ntpd
        udp 0 0 localhost:ntp *:* 1145/ntpd
        udp 0 0 *:ntp *:* 1145/ntpd
        udp 0 0 *:61742 *:* 571/dhclient

        Thanks you very much for your support time,
        Nam Vo

        1. Try this option:

          Change the port in mininet to 6653. If this doesnt work let me know these things.

          1) output of netstat -pa | grep 6653
          2) output of netstat -pa | grep 6633
          3) link from where you have git cloned the project.
          4) the opendaylight configuration xml file in ./distribution/opendaylight-karaf/target/assembly/etc/opendaylight/karaf directory

      3. after install feature:install odl-openflowplugin-all odl-openflowplugin-flow-services-ui, it works, thanks!

        1. Hello,
          I met the same problem, pingall returned “100% dropped”, I’ve installed feature as you suggested: odl-openflowplugin-flow-services-ui
          but still failed, do you have any idea?

          Thanks so much.

    3. Hi, remove “=” between “controller” and “remote”, and use a double dash “–” instead of single dash “-” it will be fine.
      sudo mn -c
      sudo mn –topo linear,5 –controller remote,ip=,port=6633 –switch=ovs,protocols=OpenFlow13
      *** Creating network
      *** Adding controller
      *** Adding hosts:
      h1 h2 h3 h4 h5
      *** Adding switches:
      s1 s2 s3 s4 s5
      *** Adding links:
      (h1, s1) (h2, s2) (h3, s3) (h4, s4) (h5, s5) (s2, s1) (s3, s2) (s4, s3) (s5, s4)
      *** Configuring hosts
      h1 h2 h3 h4 h5
      *** Starting controller
      c0
      *** Starting 5 switches
      s1 s2 s3 s4 s5 …
      *** Starting CLI:
      mininet> pingall
      *** Ping: testing ping reachability
      h1 -> h2 h3 h4 h5
      h2 -> h1 h3 h4 h5
      h3 -> h1 h2 h4 h5
      h4 -> h1 h2 h3 h5
      h5 -> h1 h2 h3 h4
      *** Results: 0% dropped (20/20 received)
      mininet>

  10. Loopasmita Deka

    Can I generate real traffic that uses different applications ? I need a large SDN traffic(open flow)
    to use in my statistical model designed for SDN traffic classification ..Please HELP

  11. Currently having problems connecting the internet
    Source: 192.168.56.102 Destination: 192.168.56.1 Protocol: ICMP Length: 98 Info: Echo (ping) request id=0x2dba, seq=144/36864, ttl=64 (no response found!)

  12. Hi,
    I want to use Opendaylight with mininet-wifi.But I am not sure whether the installation is the same as mininet or not?
    Could you please guide me?
    Thank you

      1. I have one more question. That would be kind of you to guide me.
        I have already installed Mininet Wifi at ubuntu at VirtualBox and it took a lot. So is it necessary to uninstall it? Since based on the procedure, I have to install OpenDaylight at the first and after that install Mininet. Is it possible to keep the Mininet Wifi and only install OpenDaylight? (The IP address of interface in Mininet Wifi is :192.168.56.101)

        Thank you in advance,

          1. I apologize for my mistake in the question, the correct question is :
            “I have already installed “Mininet Wifi” at ubuntu at VirtualBox and it took a lot. So is it necessary to uninstall it? Since based on the procedure, I have to install OpenDaylight at the first and after that install “Mininet wifi”.
            Thank you

          2. You do not need to uninstall Mininet-WiFi. I used two virtual machines: one for Miinet (or Mininet-WiFi) and one for OpenDaylight. So install OpenDaylight in a different VM.

      2. Hello Brain,

        Thanks for sharing this blog, this is June, I just start up my SDN jounery and met some problem.

        after connect remote ODL controller with mininet, pingall command is failed, I try to ping from h1 to swith/ and h2 to switch , they’re working well.

        odl-openflowplugin-flow-services-ui is installed alreadly, port 6653 is used.
        Is there anything I can provide to fix it ? thanks so much if you could kindly relpy

  13. Hi,
    Can you please provide possible list of options for topology? I want to develop custom network topology to see capabilities of mininet.

  14. Hi,
    Could you please let me know if it is possible to install OpenDaylight and Mininet in the same virtual machine?
    Thank you in advance

    1. Hi. It`s possible. I used the Image from this website.
      http://sdnhub.org/tutorials/sdn-tutorial-vm/
      Jumpstart your SDN development through our all-in-one pre-built tutorial VM, built for you by SDN Hub. This is a 64-bit Ubuntu 14.04 image (3GB) that has a number of SDN software and tools installed.

      *everything is pre-installed! 🙂

  15. Hi Brian, thanks for the awesome video. Can you please share how we can configure firewall using opendaylight controller and mininet?…Thanks

  16. Pingback: OFNet SDN network emulator | Open-Source Routing and Network Simulation

  17. Hii, when I am connecting to mininet with ssh with this command
    ssh -X 192.168.56.102
    the password – mininet
    it’s not connecting , it says permission denied.. what is wrong?? any idea

      1. Thanks Brian. Everything is working now. But one problem, when I open Opendaylight in the via URL , I can see nodes and everything but not in YANG UI , when I click on expand all. It shows nothing. what should I do?

      2. Hii Brian , I installed the features as mentioned here .. but I can not see Yang UI , nothing is coming up when I extend , can you help please?

  18. Is there anyone who can help me. Everything is working fine but just Yang UI , I can see the tab Yang Ui but when I click on Expand all, nothing comes up. I guess there is something wrong with the features I have installed. I installed features given in this tutorial. Do I have to install any other as well?

    Please reply

    1. Hi Guarav,
      Try also installing the following karaf features and let me know if this works:
      odl-dlux-core
      odl-dlux-node
      odl-dlux-yangui
      odl-dlux-yangvisualizer
      Thanks,
      Brian

      1. Brian, Yangui is still now working. I can see the tabs but now inside details when I expand.

        Thanks Gaurav

  19. Cool.. Thanks Brian. Its working now.
    Actually I was trying to identify and filter flows, but without using wireshark. Like matching flows, identifying flow… , any idea about that?
    Which match filters can be applied?

  20. Hi,
    Thanks for your tutorial.
    I wanted to ask whether there is way to run both Mininet and opendaylight on a single Ubuntu 16.04.(Without using virtual box) as you know there are some ways to install mininet and one of the can be done through terminal in Ubuntu (We would not need to have an image of VM).

  21. Hii, I created a custom mesh topology in the same above environment with ODL in Vm1 and mininet in vm2 with 4 switches and 2 host, ping is working, now I am trying to check which path host 1 is taking to communicate with host 2 (may be shortest path according to dijkstra algorith) , so I have installed Cacti network monitoring tool to find the best path in term of bandwidth usage and cost , but having issue with cacti software. Is there anyone who can help me with this?

    Thanks
    Gaurav

  22. Thanks for the article. I am facing a problem.
    All the tabs in ODL GUI(topology,YANGUI) are showing the data and I am able to ping in mininet to different nodes except that in nodes tab(ODL GUI) I am not able to see the nodes. Its showing as “No data found”. What could be the problem ?

  23. Thanks for the article.
    Everything is working fine except that, the data is not getting reflected in Nodes tab of ODL GUI.
    Its showing as “No Data Found”. I have installed all the packages of dlux but of no use.

  24. Hello,
    Can you tell me about how to run topology on floodlight, open daylight or onos controller using sdn hub ??
    sdn hub is installed in virtual box….and host OS is win10

  25. Hello,
    I am doing a project to assign bandwidth values on the links of the created topology using “bw” in the python code.But i am not able to access or use the bandwidth parameter values, further i have to implement an algorithm based on these values.so please help me through this..
    Thanks in advance

  26. Hi Brian,

    I installed OpenDaylight (Boron release) and Mininet using your tutorial. For some weeks it worked perfectly, but today when I tried to run the ODL virtual machine, I received the follow error “JVM must be 1.8.0 or greater “.

    Do you know how to solve this?

Comments are closed.

Scroll to Top