Archivi categoria: SDN

GNS3 – A milestone! (Part 2 – RYU)

Given the topology in my previous article, what if I want to use another controller flavour? Let’s say I want to test with RYU. Let’s recall the topology:

SDN testing topology

Let’s fire RYU and FlowManager up and open address http://192.168.122.100:8080/home/index.html with Firefox. Binding switches with the controller, will result in the topology populating. Please notice that RYU and FlowManager won’t add any default flow to switches, so you will be UNABLE to ping from iptermi-x to ipterm-y

RYU controller at work!

As you can see, all the matching traffic will be sent to the controller. No way to get it spread over the other ports.

Default RYU flows.

So long, and thanks for all the fishes!
This post celebrates the end of a very hard work. It was really hard to configure virtual machines (first attemp) and GNS3 appliances (second attemp) to have two different controllers up and running. It required many hours, and a lot of heat from my laptop.
I hope this will help someone to better understand SDN.

GNS3 – A milestone! (Part 1 – ODL and OFM)

Well… this is a real milestone for me: having a complete SDN system in GNS3, which can be shown to students, without requiring an ethernet connection. A great effort for me and my laptop, which has been running out of memory for a couple of times. Let’s get into the topology and show some results.

Gns3 topology.

Yep, topology is huge but is very similar to the one used by David Bombal on his tutorial. Due to RAM constrains, I’m using two GNS3 simple switches instead of the CISCO virtual switch.
On left side, two UBUNTU servers, the upper one is configured to execute OpenDaylight and Cisco OFM. It has a static IP address. The lower one, will run RYU controller and FlowManager. Only one controller is used at a time, so the other server can act as a simple web client
On the right side, the switching farm, with eth0 serving as management interface and 3 ipterm devices, running as clients. All the switches are connected to a controller.

First tests were made using ODL and OFM. After the client have succefully pinged each other, the ODL controller show the complete topology made up of three switches and three hosts.

ODL topology after ping.

The topology can be explored with CISCO OFM as well:

Cisco OFM topology view.

Well…I think the most amazing view is the one showing topology on the left and flows on the right. In this way you can have a good understanding of what’s going on with the flows. Please notice that the flows are “pre-programmed”.

Topology and Flowtable.

Adding a flow requires to select a device and fill a form to select Table, FlowID and Priority. Options on the left side, will enable form fields on the left, allowing user to tailor the flow to his needs. In the example shown, traffic incoming on port 10, will be dropped. Please notice that this is NOT an access-list, it won’t change switch configuration. It’ll alter the way the data plane manages the packet flow!

Adding a flow

Sending the flow to the switch, will stop the packet flow, hence ipterm-3 won’t ping anymore.

Showing the effect of a flow-commit.

Exploring switch flow table, will show the user-flow and will allow to remove it, restoring switch full functionality.

User inserted flow.

GNS3 – OFM App and ODL

So far… so good! I’m approaching the end of the course. Still 22% to go but, it’s fine! The problem I’m facing now is getting Cisco OFM app running.
My testbed is:
– virtualbox VM running mininet, bridged to laptop’s ethernet adapter;
– virtualbox VM running Ubuntu 20.04 with lots of ODL versions installed and bridged to laptop’s ethernet adapter.

David Bombal instructions and my revision:
1- install a fresh linux system and perform updates and upgrades;
2- install ODL prerequisites as described in my previous article;
2.1 – you should have ODL 0.8.4 up and running;
2.2 – you should be able to connect to ODL web interface
http://<ip>:8181/index.html
2.3 check you have following features: odl-restconf-all odl-openflowplugin-all
odl-l2switch-all odl-mdsal-all odl-yangtools-common
2.4 install odl-dlux-core and all odl-dluxapps
3 – get a coffee!
4 – git clone http://github.com/CiscoDevNet/OpenDaylight-OpenFlow-App.git
4.1 – sed -i ‘s/localhost/<ip_host>/g’ ./OpenDaylight-Openflow-App/ofm/src/common/config/env.module.js
4.2 apt install npm
4.3 npm install grunt@1.2.0 –save-dev
4.4 apt install node-grunt-cli
5 enter directory OpenDaylight-OpenFlow-App:
cd OpenDaylight-OpenFlow-App
grunt
At this point:
Running "connect:def" (connect) task
Waiting forever...
Started connect web server on http://localhost:9000

Now.. let’s create a topology on mininet:
sudo mn –controller=remote,ip=192.168.188.223 –topo=linear,2

OpenDayLight is up and Running!
OFM is up and running and connected to OpenDayLight controller.
OFM flow management

Please notice that OFM plays the role of an APPLICATION, which connects to an ODL controller and manages the flows on the switches. If you have some time, you’ll be able to get have it working even on GNS3 “real” topology!

GNS3 – RYU and FlowManager

I need a way to show students (easily, not too much code) what an SDN and why is it so cool. So, while attending to David Bombal course, I’m trying to find a good teaching solution.
In my previous posts, I described my efforts to installa ODL and HPE VAN SDN, but I stille missed an easy interface to interact with flows. The solution to this problem, came with RYU, and old (but, let my say… gold) SDN project written in python and from “Flowmanager” a ptyhon RYU app.

Installing RYU is quite easy, provided you follow the instruction given on its github repo.
More information are available on this site.
The only issue I found is with the “eventlet” python module, which was upgraded to correct a potential DOS problem. This has removed a wsgi.ALREADY_HANDLED function, and results in ryu-manager not running. The solution is to install the old version:
pip install eventlet==0.30.0
Invoking ryu-manager with
sudo ryu-manager --wsapi-port 8081 --verbose
results in the program starting up and being ready to accept connections from the switches.
Installing “FlowManager” is even easier, as you just have to clone a github repo. In order to bind FlowManager with RYU is
sudo ryu-manager –observe-links ~/flowmanager/flowmanager.py
Once the software starts, we can access the app via the browser, by pointing to http://<ip>:8080/home/index.html

Test topology on GNS3

To do some testing, I connected the well known GNS3 topology, and the result is amazing!

Basic RYU installation and OpenvSwitch integration

Please notice that running ryu-manager without any application, will result in the OpenvSwitch behave as a dumb piece o virtual metal: no frames will be forwarded, as no flows are entered in the switch flow table. Let me say that there is a HUGE difference between the HPE VAN SDN (which will flood the switch flows) and the RYU, which will remain “silent”. Invoking:
sudo ryu-manager ryu.app.simple_switch_13 ~/flowmanager/flowmanager.py --observe-links
will result in the ry-manager starting up and loading TWO apps: the simple switch (with OpenFlow 13 support) and the FlowManager. Once the switch connects to the controller, flows are sent to the table and routers are able to ping. Let’s check this.

Flows on the OpenvSwitch with the RYU simple_switch_13 app running
Flows as seen from the FlowManager web Interface.
Topology showing all routers, after he switch has sensed all the nodes.


GNS3 – OpenDayLight and HPE VAN SDN

After some further efforts from my previous post, I finally manged to get some data from ODL controller. I feel little frustrated in having so many issues but I keep on trying!

Reference Topology as per GNS3 course exercise.

Using Yang-UI I managed to get some information from the OpenvSwitch in the topology. Please notice how many information is it possible to acquire and a small section dealing with “tables” and “flows”.

Querying the node
Flow Information

Now, let’s go further! In the David Bombal videos, an HPE VNA SDN application is shown. By doing some Google search, it is still possibile to download the appliance for free testing. Please notice it’s a pretty old piece of software, so do expect some troubles in the way it works. Finding the product n HPE site can be boring, frustrating and time wasting, so please use this link!

Download site for HPE VAN SDN Controller.

The virtualbox appliance works like a charm. It will be ready to work in a few minutes, but you’ll have to use Firefox to access the 8443 port of the controller, due to Chrome security paranoid behaviour. After loggin in the controller, you’ll be able to register your devices on the controller and see the topology.

The OpenvSwitch in GNS3 – Data Path
GNS3 OpenvSwitch port description.

Unfortunately there is no way to have a copy of “Northbound Networks” “Flow Maker Deluxe” app, which is extensively used by David Bombal in his videos. In a forum I found an interesting post, stating that the FlowManager App has similar functions when used on RYU environment. I’ll test it. My goal is still to have a controller+app working, to show students what the potential of SDN is.