Openflow Configuration Lab: Apnic SDN Workshop Lab
Openflow Configuration Lab: Apnic SDN Workshop Lab
Openflow Configuration Lab: Apnic SDN Workshop Lab
The following base topology will be used for Part-1. Note that the IP addresses are examples only.
When working on your lab, use the actual IP addresses of your VMs (or as indicated by your
instructors). For the purpose of this guide, we use the IP address of 192.168.1.X to refer to the
Mininet VM.
1 ©APNIC
Created: 4 Sept 2017
Updated: 13 July 2018
Thursday, September 06, 2018
For Part-2, the following topology will be used. For the purpose of this guide, we use the IP address
of `192.168.1.X` to refer to the Mininet VM and the IP address of `192.168.1.Y` to refer to the
OpenDayLight VM.
Lab Notes
As a minimum, we recommend the following hardware specifications:
• Intel i5 or i7 processor
• 6GB of RAM
• 25GB of free hard disk space
Basic steps:
1. Install VirtualBox
2. Install Wireshark
3. Import and configure Mininet VM to VirtualBox
4. Build and test a simple standalone Mininet network
5. Import ODL VM to VirtualBox
6. Build and test a simple Mininet network using an external ODL controller.
2
APNIC SDN Workshop Lab
Lab Exercise
1. Install VirtualBox
Installation steps:
• Either, download the appropriate install package for your operating system from:
https://www.virtualbox.org/wiki/Downloads, OR
2. Install Wireshark
Installation steps:
• Either, download the appropriate install package for your operating system from:
https://www.wireshark.org/download.html
OR
• Use the supplied installer to install using default parameters.
• Download Mininet VM
In order to save time, your instructor will provide you a mininet OVA virtual appliance locally
to create an Ubuntu virtual machine on VirtualBox.
Simply double-click the file mininet.ova to import it into VirtualBox. Ensure that you select
the option to re-initialise all MAC addresses.
Within VirtualBox, go into the Settings for the VM and ensure that the first network adapter is
attached to ‘Bridged Adapter’ as shown below (the interface name depends on your host OS;
the following is an example on OS X):
3 ©APNIC
Created: 4 Sept 2017
Updated: 13 July 2018
Thursday, September 06, 2018
Username: mininet
Password: mininet
Verify that the interface eth0 has been assigned an address from the same range as your host
machine (LAN) interface.
ssh mininet@192.168.1.X
4
APNIC SDN Workshop Lab
eth0 eth1
eth0
s1 eth0
h1 h2
The above command will put you into the Mininet shell:
mininet>
• Try the following commands in the Mininet CLI to get an understanding of the network:
mininet> nodes
mininet> net
mininet> dump
mininet> h1 ping h2
mininet> h2 ping h1
5 ©APNIC
Created: 4 Sept 2017
Updated: 13 July 2018
Thursday, September 06, 2018
mininet> exit
• Create another simple network on the Mininet VM but this time use the default controller.
Controller, c0
eth0 eth1
eth0
s1 eth0
h1 h2
The above command will put you back into the Mininet shell:
mininet>
• Try the following commands in the Mininet CLI to get an understanding of the network:
mininet> nodes
mininet> net
mininet> dump
6
APNIC SDN Workshop Lab
• Attempt pings between the hosts
mininet> h1 ping h2
mininet> h2 ping h1
• Wait for the flows to timeout (until the output of the following command is again empty)
• Enable snooping to see the OF message flow between the switch and controller.
• Wait for the flows to timeout (until the output of the following command is again empty)
mininet> h1 ping h2
mininet> h2 ping h1
mininet> exit
7 ©APNIC
Created: 4 Sept 2017
Updated: 13 July 2018
Thursday, September 06, 2018
In order to save time, your instructor will provide you a ubuntu-odl.ova (precompiled ODL)
virtual appliance.
Simply double-click the file ubuntu-odl.ova and import it into VirtualBox. Ensure that you select
the option to re-initialise all MAC addresses.
Within VirtualBox, go into the Settings for the VM and ensure that the first network adapter is
attached to ‘Bridged Adapter’ as shown below (the interface name depends on your host OS;
the following is an example on OS X):
Adapter 1:
Username: apnic
Password: apnic
Verify that the interface enp0s3 has been assigned an address from the same range as your host
machine (LAN) interface.
ssh apnic@192.168.1.Y
8
APNIC SDN Workshop Lab
• Run OpenDaylight:
apnic@ubuntu:~$ cd distribution-karaf-0.5.4-Boron-SR4
apnic@ubuntu:~$ ./bin/karaf
The above command will take you to the OpenDayLight shell as shown below:
Browse to the following URL on any browser (use your IP address in place of Y):
http://192.168.1.y:8181/index.html
9 ©APNIC
Created: 4 Sept 2017
Updated: 13 July 2018
Thursday, September 06, 2018
Username: admin
Password: admin
For this part of the lab, you will need to work with a partner to capture packets/messages
exchanged between the ODL controller and the mininet switch.
One of you will use your Mininet setup while the other will use their ODL setup - connect a
Mininet network running on one machine to an ODL controller running on another physical
machine.
• Start Wireshark and select interface corresponding to your LAN or WiFi interface to capture
• Create a display filter within Wireshark for openflow_v4
• Create a simple network on the Mininet VM that connects to the ODL controller (replace Y
with the controller VM address):
10
APNIC SDN Workshop Lab
The above command creates a network with:
o 1 switch, s1
o 2 hosts, h1 and h2
o h1 eth0 connected to s1 eth0
o h2 eth0 connected to s1 eth1
o Remote OpenFlow controller @192.168.1.y
OpenDaylight
controller, c0
Attendee 1
eth0 eth1
eth0
s1 eth0
h1 h2
Attendee 2
The above command will put you into the mininet CLI:
mininet>
• At this point, stop the Wireshark capture and analyse the OpenFlow messages that have
been sniffed. In particular, attempt to relate the FLOW_MOD messages with the contents
of the flow table that you displayed earlier (refer the slides where necessary).
mininet> h1 ping h2
11 ©APNIC
Created: 4 Sept 2017
Updated: 13 July 2018
Thursday, September 06, 2018
• At this point, stop the Wireshark capture and analyse the OpenFlow messages that have
been sniffed. In particular, pay attention to the Packet-In and Flow_Mod messages.
mininet> exit
• If time permits, repeat the above steps for the following topologies:
12