Tuesday, June 26, 2018

Software Defined IPv6 (SoDIP6) Experimentation with Mininet

In this blog post, I just want to introduce a new experiment with new term called SoDIP6. The world-wide network currently in operation is a Legacy IPv4 Network. We understand that legacy IPv4 network has several drawbacks as compared with next generation programmable IPv6 network. Legacy network is vertically integrated and complex in configuration with waste of addresses due to class-ful addressing mechanism. IPv6 is the one more secure, flexible, scalable and robust addressing protocol. Similarly, comparing with legacy network management, Software Defined Network is the horizontally distributed programmable and so flexible as well as controllable networking management approach currently in the central point of research for worldwide researchers. I just combined the two terminologies as SDN and IPv6 with a single name as Software Defined IPv6 or in short ‘SoDIP6’. SDN and the IPv6 are interrelated technologies where IPv6 operate on the network layer and SDN deals with the management of the networking operations as management layer. “The future networking infrastructure fully IPv6 operable and controlled/managed by the SDN controller is recognized as a SoDIP6 network”. The possibility of next generation energy efficient and smart networking could only be dreamed with the availability of programmable IPv6 network.

Mininet is the one best emulation tool used for testing of network operation and management. In this blog, I tried to experiment the dual stack SoDIP6 network with functioning of IPv4, IPv6 and the SDN.

I got very few (almost none) experiment incorporating IPv6 only network in the Mininet.
Almost all kind of research and experimentations are found over IPv4 network. hence, I tried to implement the IPv6 network implementation in Mininet. I have created the IPv6 network environment with custom topology as shown in figure 1 below. 
Fig.1: Mininet Custom Routing Network Topology

OpenDaylight as a remote controller and Ubuntu virtual machine. It is verified that IPv6 network environment can easily be created on Mininet and perform necessary experimentation with IP6 at SDN environment. There are some limitations I found in the communication between controller and the host over IPv6 only environment that require more research and study to sort out the issues. Like connecting remote controller with IPv6 only data plane doesn’t work with my experiment. Hence, the controller to data plane communication was set with IP4 address and rest of the data plane network environment with IPv6 only network works well so far. Here is the step-by-step document to perform the IPv6 network test with Mininet.

Things to make ready for this complete experimental test. 
This experiment was run on Oracle Virtual Box with Mininet VM and the ODL on separate Ubuntu VM with ip address The Mininet VM IP was The IPv6 address of enp0s8 interface on ODL VM was set to 2001:DB8:1212::1212 and the enp0s8 interface of Mininet VM was set to 2001:DB8:1212::1111. Similarly the IPv6 address of data plane switch/host nodes were set accordingly via the program code as shown in the code below.

Step 1: Download Mininet VM from the Mininet website and import into your virtual environment like oracle virtual box or vmware and any other virtual environment. You can install Ubuntu virtual machine of at least 10GB HDD and 1GBMB RAM in the virtual environment and then install Mininet on that VM.

Step 2: Create another VM, install Ubuntu 16.04 and on that Ubuntu Machine, download and install Open Daylight SDN controller. Please follow other documents for ODL installation and execution. For example, I have downloaded OpenDaylight version 0.8, and execute the controller as shown  below. Once the controller is executed, it is now ready to receive the OpenFlow traffic from the data plane or from Mininet VM.

/*  snapshot of ODL run status
root@LICTSRV-SDN-ODL:~/karaf-0.8.0# ./bin/karaf
Apache Karaf starting up. Press Enter to open the shell now...
100% [========================================================================]                                                                                        
    ________                       ________                .__  .__       .__     __
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   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.
Karaf started in 51s. Bundle stats: 414 active, 415 total


Step 3: In the Mininet VM, write python script to create your own custom network topology. Like for example, copy the script below that creates the topology as shown in figure 1, and then compile the code. Make sure that you have already install python on that VM (apt-get install python).

#custom topology created for SoDIP6 experimental test in Mininet.

__author__ = 'babu'

from mininet.node import CPULimitedHost
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.log import setLogLevel, info
from mininet.node import RemoteController
from mininet.cli import CLI
from mininet.link import TCLink
from mininet.util import dumpNodeConnections

#REMOTE_CONTROLLER_IP = "2001:DB8:1212::1212"

class SoDIP6Topo(Topo):
    def __init__(self, **opts):
        # Initialize topology and default Option
        Topo.__init__(self, **opts)

topos = { 'sodip6topo': ( lambda: SoDIP6Topo() )}

def runSoDIP6():
    # Create and test a simple network
    # topo = SoDIP6Topo()
    net = Mininet(topo=None,controller=None)
    net.addController("c0", controller=RemoteController, ip=REMOTE_CONTROLLER_IP, port=6633)
    #net.addController("c0", controller=RemoteController, ipv6=REMOTE_CONTROLLER_IP, port=6633)

    s = []
    h = []

    info('*** Adding Switches\n')
    for i in range(16):
        s.append(net.addSwitch('s%s' %i, protocols='OpenFlow13'))

    # adding Hosts
    info('*** Adding Hosts\n')
    for i in range(8):
        h.append(net.addHost('h%s' %i))

    #adding link among switch and hosts
    info('*** Creating Links\n')
    net.addLink(s[1], s[2])            #link between router 1 to 2
    net.addLink(s[1], s[3])
    net.addLink(s[1], s[7])
    net.addLink(s[1], s[14])
    net.addLink(s[2], s[6])
    net.addLink(s[3], s[4])
    net.addLink(s[4], s[5])
    net.addLink(s[4], s[6])
    net.addLink(s[4], s[8])
    net.addLink(s[4], s[9])
    net.addLink(s[5], s[8])
    net.addLink(s[6], s[7])
    net.addLink(s[7], s[9])
    net.addLink(s[7], s[10])
    net.addLink(s[8], s[11])
    net.addLink(s[9], s[11])
    net.addLink(s[9], s[12])
    net.addLink(s[9], s[13])
    net.addLink(s[10], s[13])
    net.addLink(s[10], s[15])
    net.addLink(s[14], s[15])          #link between router 14 and router 15

    net.addLink(h[1], s[3])            #link between host 1 and router 3 -- wireline home user H1
    net.addLink(h[2], s[3])            # wireless home user -- h2
    net.addLink(h[3], s[5])            #bank --h3
    net.addLink(h[4], s[8])            #city office -- h4
    net.addLink(h[5], s[11])           #unviersity -- h5
    net.addLink(h[6], s[13])           # Govt. Office -- h6
    net.addLink(h[7], s[15])           #NGOsINGOs -- h7
    net.addLink(h[0],s[1])             # host 0 id the NCR host connected with Central router S1

        #addign ip address to all host machine
    info('*** Starting Networks\n')

    h[0].cmd('ifconfig h0-eth0 netmask up')
    h[0].cmd('ifconfig h0-eth0 inet6 add 2001:DB8:1212::1/64 up')

    h[1].cmd('ifconfig h1-eth0 netmask up')
    h[1].cmd('ifconfig h1-eth0 inet6 add 2001:DB8:1212::9/64 up')

    h[2].cmd('ifconfig h2-eth0 netmask up')
    h[2].cmd('ifconfig h2-eth0 inet6 add 2001:DB8:1212::17/64 up')

    h[3].cmd('ifconfig h3-eth0 netmask up')
    h[3].cmd('ifconfig h3-eth0 inet6 add 2001:DB8:1212::25/64 up')

    h[4].cmd('ifconfig h4-eth0 netmask up')
    h[4].cmd('ifconfig h4-eth0 inet6 add 2001:DB8:1212::33/64 up')

    h[5].cmd('ifconfig h5-eth0 netmask up')
    h[5].cmd('ifconfig h5-eth0 inet6 add 2001:DB8:1212::41/64 up')

    h[6].cmd('ifconfig h6-eth0 netmask up')
    h[6].cmd('ifconfig h6-eth0 inet6 add 2001:DB8:1212::49/64 up')

    h[7].cmd('ifconfig h7-eth0 netmask up')
    h[7].cmd('ifconfig h7-eth0 inet6 add 2001:DB8:1212::57/64 up')

    print ("Dumping host connections")
    print ("Testing network connectivity")

if __name__ == '__main__':
    # Tell mininet to print useful information

Step 4: Once executing the code, Mininet CLI will be appeared where you test the connectivity of data plane device using ping6 for ipv6 connectivity show like below.

mininet> h1 ping6 2001:DB8:1212::57
PING 2001:DB8:1212::57(2001:db8:1212::57) 56 data bytes
64 bytes from 2001:db8:1212::57: icmp_seq=1 ttl=64 time=1.14 ms
64 bytes from 2001:db8:1212::57: icmp_seq=2 ttl=64 time=0.299 ms
64 bytes from 2001:db8:1212::57: icmp_seq=3 ttl=64 time=0.283 ms
--- 2001:DB8:1212::57 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2018ms
rtt min/avg/max/mdev = 0.283/0.575/1.144/0.402 ms

mininet> h2 ping6 2001:DB8:1212::9
PING 2001:DB8:1212::9(2001:db8:1212::9) 56 data bytes
64 bytes from 2001:db8:1212::9: icmp_seq=1 ttl=64 time=0.385 ms
64 bytes from 2001:db8:1212::9: icmp_seq=2 ttl=64 time=0.063 ms
64 bytes from 2001:db8:1212::9: icmp_seq=3 ttl=64 time=0.067 ms
--- 2001:DB8:1212::9 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3027ms
rtt min/avg/max/mdev = 0.063/0.145/0.385/0.138 ms

Step 5: run ‘pingallfull’ from Mininet CLI and then open the web interface of the ODL machine by supplying user name and password (admin/admin). You can see the topology from the Yang visualizer as shown below. for web interface in my experiment: http://[2001:DB8:1212::1212]:8181/index.html

Fig. 2: Custom Topology shown from ODL web interface (Yang Visualizer)

Fig. 3: Switch/Host (Node) status details shown in the ODL web interface (Yang Visualizer)

any query or suggestion will be welcome to my email address mentioned in www.baburd.com.np


  1. This comment has been removed by the author.

  2. Thank you very much. It helped me a lot.