Using the OpenDaylight SDN Controller with the Mininet Network Emulator

February 28, 2016 — 73 Comments

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 brian@192.168.56.101

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.

73 responses to 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)

  2. Navdeep Uniyal March 9, 2016 at 7:52 am

    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.

  4. Brian, thanks for this demo.

    Q. Previous demos before Berllium using OpenFlow like:

    https://www.youtube.com/watch?v=Aue5kLSQhew

    Show an extensive tabbed interface with flows on openflow. Do you know if this got re-incorporated into the Yang interface or am I missing a module?

    Thanks,

    Scott Franco

  5. Thank you for the tutorial,

    opendaylight not provide web access -> http://x.x.x.x:8181/dlux/index.html

    I did the same for all installations. What do you think could be a problem?

  6. Thanks for your tutorial. As a beginner, it helps me a lot.

    But I have a kind of stupid question. How can I figure out the my username and password in this link: http://192.168.56.101:8181/index.html?

  7. 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

  8. 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,

    • 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

  9. Megholova Mukherjee May 26, 2016 at 1:13 pm

    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.

  10. 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

    • 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.

      • Hi Raj,
        You are using the wrong port for the controller. Use port 6633.
        Brian

        • 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.

          • 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)

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

          Thanks.

    • my problem is that host h1 is not connected ..everything else i connected , just h1 is not

  11. 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.

  12. Very Well Presented. Thank you.

  13. 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

    • 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

    • 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.

      • 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

      • 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

        • 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

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

    • 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>

  14. Loopasmita Deka July 12, 2016 at 8:28 am

    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

  15. 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!)

  16. Thanks a lot , great page to learn and get opendaylight and mininet work.

  17. 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

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

  19. 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

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

  21. I would like to know about bfd implementation in mininet with open daylight controller

  22. 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

  23. 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

  24. 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?

  25. 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).

  26. 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

Trackbacks and Pingbacks:

  1. OFNet SDN network emulator | Open-Source Routing and Network Simulation - November 20, 2016

    […] Install OpenDaylight on the OFNet VM by running the commands shown below. I describe these commands in more detail in my post about Using OpenDaylight with Mininet. […]

Leave a Reply

Text formatting is available via select HTML. <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*