SDN 101: OpenFlow, HP Virtual Routers and GNS3

In a previous blog entry, I showed you how to integrate Mininet and GNS3
(SDN 101: Mininet (OpenFlow) and GNS3) for learning SDN and OpenFlow. Mininet is free, open source software which makes it really easy to learn. You can also download free, open source controllers like OpenDaylight and ONOS.

I will now show you how to integrate the HP VSRs running OpenFlow with GNS3. HP has recently added OpenFlow support to their VSR product (similar in concept to the Cisco CSR). Even though this is not free, you can get a 60 day trial version of the software (see below for links and details).

Note: It’s probably obvious, but HP may not support you running a set up like this… this is a lab for learning only

Network Overview

Here is a screenshot of the network I created in GNS3

Network-Overview-gns3

Device IP addresses:

  • Cisco R1 = 10.0.0.10
  • Cisco R2 = 10.0.0.11
  • ODL SDN Controller = 172.16.57.50
  • HP VAN SDN Controller = 172.16.56.31 (not shown in topology)

I am using an existing HP VAN SDN Controller in my physical network as it was easier for me to do that. You could also import the HP Controller VM into GNS3 if you prefer. I have imported an ODL Controller in this example.

HP VAN SDN Controller View:

Here is a screenshot of the OpenFlow switches and Nodes as shown on the HP VAN SDN Controller:

HP-VAN-SDN-Controller-View

ODL view:

In my tests, the Cisco routers did not show as connected to the OpenFlow enabled VSRs:

ODL-view

The following shows the VSRs registered with the HP VAN SDN Controller:

VSRs-registered-with-the-HP-VAN-SDN-Controller

And the same on ODL:

ODL

Here are VSR1 ports:

VSR1-ports

Explanation:

  • Port 1 is connected to Cisco R1
  • Port 2 is connected to HP VSR2
  • LOCAL is the local management stack of the VSR

ODL also shows that VLAN 10 has OpenFlow enabled:

ODL-also-shows-that-VLAN-10-has-OpenFlow-enabled

Here is the flow table of VSR1 (as seen on the HP VAN SDN Controller):

table-of-VSR1

And on the VSR:

[VSR1] show openflow instance 1 flow-table

Instance 1 flow table information:

Table 0 information:

Table type: Extensibility, flow entry count: 5, total flow entry count: 5

MissRule flow entry information:

cookie: 0xffff000000000000, priority: 0, hard time: 0, idle time: 0, flags:

flow_send_rem, byte count: 0, packet count: 0

Match information: any

Instruction information:

Apply actions:

  Output interface: Normal

Flow entry 1 information:

cookie: 0xfffd0000babadada, priority: 31000, hard time: 0, idle time: 0,

flags: none, byte count: 0, packet count: 0

Match information:

Ethernet type: 0x0806

Instruction information:

Apply actions:

  Output interface: Controller, send length: 65535 bytes

  Output interface: Normal

Flow entry 2 information:

cookie: 0xfffb0000faded000, priority: 60000, hard time: 0, idle time: 0,

flags: none, byte count: 0, packet count: 0

Match information:

Ethernet type: 0x8999

Instruction information:

Apply actions:

  Output interface: Controller, send length: 65535 bytes

Flow entry 3 information:

cookie: 0xfffc0000babadada, priority: 31500, hard time: 0, idle time: 0,

flags: none, byte count: 0, packet count: 0

Match information:

Ethernet type: 0x0800

IP protocol: 17

UDP source port: 68, mask: 0xffff

UDP destination port: 67, mask: 0xffff

Instruction information:

Apply actions:

  Output interface: Controller, send length: 65535 bytes

  Output interface: Normal

Flow entry 4 information:

cookie: 0xfffc0000babadada, priority: 31500, hard time: 0, idle time: 0,

flags: none, byte count: 0, packet count: 0

Match information:

Ethernet type: 0x0800

IP protocol: 17

UDP source port: 67, mask: 0xffff

UDP destination port: 68, mask: 0xffff

Instruction information:

Apply actions:

  Output interface: Controller, send length: 65535 bytes

  Output interface: Normal

[VSR1]

Here are the flow table statistics of VSR1 (as seen on ODL):

table-statistics-of-VSR1-ODL

Here are some show commands on the VSRs.

In the following output you can see that OpenFlow is enabled on GigabitEthernet1/0 and GigabitEthernet2/0. The router has an active session to the controller 192.168.56.31 using OpenFlow port 6633:

<VSR1> show openflow instance 1

Instance 1 information:

Configuration information:

Description : —

Active status : Active

Inactive configuration:

  None

Active configuration:

  Classification: VLAN, total VLANs(1)

   10

  In-band management VLAN, total VLANs(0)

   Empty VLAN

  Connect mode: Multiple

  MAC address learning: Enabled

  Flow table:

   Table ID(type): 0(Extensibility), count: 5

  Flow-entry max-limit: 65535

  Datapath ID: 0x0001cc3e5f822a02

  Default table-miss: Drop

  Forbidden port: None

Port information:

GigabitEthernet1/0

GigabitEthernet2/0

Active channel information:

Controller 1 IP address: 192.168.56.31 port: 6633

<VSR1>

The following shows the connection state (in this case it is established):

<VSR1> show openflow instance 1 controller

Instance 1 controller information:

Reconnect interval: 60 (s)

Echo interval     : 5 (s)

Controller ID           : 1

Controller IP address   : 192.168.56.31

Controller port         : 6633

Controller role         : Equal

Connect type            : TCP

Connect state           : Established

Packets sent            : 1132

Packets received        : 1152

SSL policy              : —

VRF name                : —

<VSR1>

How do you set this up?

In this blog, I am assuming that you already have a working SDN controller available. In my example I have used the HP VAN SDN Controller and ODL, but you could use ONOS, RYU or others. Here are the steps you need to complete to get this working:

Step 1: Download the HP VSR

You can download a 60 day trial version of the VSR from
here or use this: http://bit.ly/1iERu74

Make sure you download the 7.10.E0321 version:

Download-the-HP-VSR

Step 2: Import into VirtualBox

Extract the downloaded zip file and then extract it.

In this example, I imported the OVA file and cloned it in VirtualBox (VSR1 and VSR2):

Import-into-VirtualBoxHere is VSR1 running in VirtualBox:

VSR1-running-in-VirtualBox

Step 3: GNS3 VirtualBox setup

In GNS3, click Preferences  and then VirtualBox VMs. Then click New to import the new VSR VMs:

GNS3-VirtualBox-setup

Click Edit to edit the Mininet-VM settings. In my case, I enabled the remote console and created 4 NICs on the Mininet VM, but I only used 3 of them in the lab:

Mininet-VM-settings1
virtual box vm configuration

Step 4: GNS3 Topology

Create your GNS3 topology as you like

GNS3-Topology1

In my example, I am using Cisco R3 as a switch (etherswitch module) for the ODL SDN Controller, VSR1 and VSR2. The router also connects to the physical network where my HP VAN SDN Controller resides.

Step 5: Enable OpenFlow on the HP VSRs:

To enable OpenFlow on the VSRs, do the following (in this case connecting to the HP VAN SDN Controller):

<VSR1> system-view

[VSR1] openflow instance 1

[VSR1-of-inst-1] classification vlan 10

[VSR1-of-inst-1] controller 1 address ip 192.168.56.31

[VSR1-of-inst-1] active instance

[VSR1-of-inst-1] quit

[VSR1]

In this example, I configured the OpenFlow interfaces in VLAN 10 on the VSR:

<VSR1> display current-configuration

…<omitted>…

interface Vlan-interface10

ip address 10.0.0.254 255.255.255.0

#

interface GigabitEthernet3/0

port link-mode route

ip address dhcp-alloc    !This interface connects to Cisco R3 (non-OpenFlow)

#

interface GigabitEthernet1/0

port link-mode bridge

port access vlan 10

#

interface GigabitEthernet2/0

port link-mode bridge

port access vlan 10

Note: If you are using a remote console to the VSRs via GNS3, then set the aux port authentication mode and privileges initially via the Virtual Box console:

<HP> system-view

[HP] line aux 0

[HP-line-aux0] authentication-mode none

[HP-line-aux0] user-role network-admin

[HP-line-aux0] quit

[HP]

If you do this, don’t forget to enable proper authentication later.

Step 6: Test

And now you have an integrated HP VSR OpenFlow network and GNS3 working together on your computer.

Cisco R1 pinging Cisco R2:

R1# ping 10.0.0.11

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.11, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/20 ms

R1#

Cisco R1 pinging HP VSR1:

R1# ping 10.0.0.254

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.254, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms

R1#

Cisco R1 pinging HP VSR2:

R1# ping 10.0.0.253

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.253, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/8/12 ms

R1#

If you want more information, have a look at my SDN and OpenFlow courses on the GNS3 academy where over 4,000 users registered: SDN and OpenFlow Introduction | GNS3 Academy 

All the best!

David



Tags: , , , ,


About :

These days I am involved in some exciting SDN and OpenFlow projects involving the HP VAN SDN Controller, HP ProVision and HP Comware switches. These new developments in the networking world combine my passions of networking and application development. I hope to write some interesting blog entries on these exiting topics. I am both a Cisco CCIE #11023 and HP MASE as well as a Cisco Certified Systems Instructor (CCSI #22787) and Certified HP Instructor. I have been training networking courses for well over 10 years teaching on a wide range of topics including routing and switching, VoIP, OpenFlow and SDN. I have delivered instructor led courses all over the world. I started working with Cisco Unified Communications Manager when it was still called Cisco Call Manager and have been deploying, troubleshooting and teaching Unified Communications products since version 3.0. I have developed various network utilities such as the VPN Config Generator and others to help engineers in their day to day jobs. I also develop software, training materials, EBooks, videos and other products which are used throughout the world. I have designed, implemented and managed networks ranging from single sites to those that span 50 countries.

View all posts by


No comments yet.

Leave a Reply

  • Proper format "info@pakiti.com"