Showing posts with label Networking. Show all posts
Showing posts with label Networking. Show all posts

Wednesday, 8 April 2015

The Evolution of Networking a Brief History

In the early days of computing the idea of computer networking did not exist computers or mainframes as they were known were large structures that took up entire floors of buildings. To transfer any data from these mammoth machines you would need to use a physical media such as magnetic tapes. As mainframes started to evolve they needed new ways in which they could move data these new mediums presented themselves in the form of remote terminal controllers or card readers that operated as subservient devices known as peripherals directly controlled by the mainframe. The first network connections that started to emerge at this point in time were very simple point to point or point to multipoint links. This limited the communications on a network to a small chain of physically connected devices where the mainframe controlled what communications were sent.

Over time these mainframe systems got smaller and more like the computer systems we are all familiar with so as the technologies evolved a new way to connect all of these separate systems to share communications without a mainframe arose. This need for a new method of communication brought about the emergence of the local area network (LAN) and along with it new technologies arrived such as IEEE 802.3 and IEEE 802.5.
The LAN was a shared media network and did not scale well so the solution that was devised to solve this issue was the emergence of bridged networks. The idea of a bridged network was to split the shared media network into separate segments to allow for better aggregation of bandwidth as now not all of the devices would be transmitting at the same time. The bridged network concept was later replaced by switches that allowed for many more improvements such as VLAN implementation and the spanning tree protocol that eliminated loops in a network just to mention a few.     
  

The final layer of communication that was added to these networks was routing, many different routing protocols were developed to allow networks to route traffic outside of a LAN and across the internet. As switches and routers developed so did the programmability of this hardware to deliver more secure and faster communications. If you refer to Fig 01.1 below it illustrates how software starts to play a role as the hardware becomes more efficient as it evolves over the years.


Fig 01.1


Before the emergence of Open Flow the protocol at the heart of SDN researchers were examining new ways to evolve the networks of the future. The earliest work recorded at programmable networks did not involve internet routers or switches but in fact surrounded ATM switches. Fig 01.2 below denotes the earliest technologies in existence that eventually led to the birth of Open Flow the protocol and the emergence of SDN.


Project
Description
Open signaling
Separating the forwarding and control planes in ATM switching (1999)
Active networking
Separating control and programmable switches (late 1990s)

DCAN
Separating the forwarding and control planes in ATM switching (1997)
IP switching
Controlling layer two switches as a layer three routing fabric (late 1990s)
MPLS
Separating control software, establishing semi-static forwarding paths for flows in traditional routers (late 1990’s)
RADIUS, COPS
Using admission control to dynamically provision policy (2010)
Orchestration
Using SNMP and CLI to help automate configuration of networking equipment (2008)
Virtualization Manager
Using plug-ins to perform network reconfiguration to support server virtualization (2011)
ForCES
Separating the forwarding and control planes (2003)
4D
Locating control plane intelligence in a centralized system(2005)
Ethane
Achieving complete enterprise and network access and control using separate forwarding and control planes and utilizing a centralized controller (2007)
Fig 01.2




The two technologies to take note of from Fig 01.2 are Devolved Control of ATM Networks (DCAN) and Open Signaling. As you can see from the above description DCAN and Open Signaling both separated the forwarding and control planes in ATM switches and gave the control to an external device very similar to the controller function in SDN networks. This technology never fully gained the trust of IT Administrators and as a result never became a mainstream technology.  The rest of the technologies in Fig 01.2 all played a part in the steps required to get to where we are today with SDN.  It wasn’t however until the arrival of Open Flow that SDN was actually born the year was 2008 and researchers along with vendors had started to play with the idea of Open Flow. Open Flow was designed to allow researchers to experiment and innovate with protocols in everyday network. This concept was to become a defining change how the industry approached networking. It wasn’t until 2011 that SDN actually started to make an impact on the networking industry as many big named vendors such as Cisco started to implement the Open Flow specification into their products. The Open Flow specification indicates the protocol to be used between the SDN controller and the switch it also specifies the behavior that is expected from the switch.

If we look at this specification in more detail we can break it down into a number of bullet points the basic operation of an Open Flow solution is.
·         The controller populates the flow table entries on the switches
·         The switch examines incoming packets when it identifies a matching flow it carries out the action associated with the flow
·         If the switch cannot find a matching flow it forwards the packet to the controller and waits for further instructions on how to deal with the packet
·         The controller will update the switch with new flow entries as new patterns are identified this allows the switch to deal with these packets locally.
The best resource for information on the Open Flow standard is the Open Networking Foundation (ONF) established in 2011 by Deutsche Telekom, Facebook, Google, Microsoft, Version and Yahoo. One of the most powerful aspects of Open Flow is the fact that it is open meaning researchers can contribute to new methods of network management, operation and control unlike the closed shop model of networking that exists in today’s network’s and as a result has lead to stifled innovation.


One major advantage of having an open source platform for networking is security; it is widely known that open source software tends to be a lot more secure than off the shelf distributions. This is due to the fact that open source can be peer reviewed by anyone interested in the field leading to faster discovery and patching of security issues and weakness before a product is introduced to a working environment. This is the type of innovation that networking has been lacking but with the introduction of SDN this is all starting to change.  


Tuesday, 7 April 2015

Setting up OpenDayLight Controller and linking it to mininet

Prerequests:
-VMWare Workstation [recommended] or
-Virtual Box [free software not as good but does the job]
-Ubuntu 14.04 32bit OS installed and named Controller or something like that [please have this vm set up by following my blog on setting up mininet from scratch]
-Second OS running Ubuntu 14.04 32bit installed and named Mininet [please have this vm set up by following my blog on setting up mininet from scratch]

Note: you will have to set up the Ubuntu 14.04 virtual machine yourself I recommend 20GB of hard drive space and 4GB of ram if your machine can handle it. Also both machines must be set up with mininet as instructed in my previous blog.

The most straight forward way to set up the OpenDaylight Controller (ODL) is to download the latest pre-built version from there website http://www.opendaylight.org/software/downloads .
I would highly recommend this option for anyone who is new to the world of software-defined networking (SDN). The latest version of the ODL controller available at the moment is Helium-SR3. Make sure that you download the .tar file when using Ubuntu. When the download is complete right click on the file and extract it to your home folder you are now ready to get started. You should have your two vms powered on side by side, make sure that your mininet vm has been set up properly as indicated in blog on how to set up mininet from scratch. I do not want you to run mininet on this machine yet so if it is running type exit into the mininet command prompt. The first machine we are going to work on is the controller vm so you have downloaded and extracted the most recent distribution now lets get it to run.
Launch the terminal and type in

dir

if you have extracted the distribution to your home folder you will see it here.
Next command you need is

cd distribution-karaf-0.2.3-Helium-SR3

now to run the controller type in

./bin/karaf

the controller will come up but it takes about 6 minutes to come online fully.
We now need to find out the ip address of our virtual machine this can be obtained by opening another terminal window don't close the ODL controller command window. In the second terminal type in

ifconfig

and take note of the ip address of the machine you will need this to link mininet to the controller.
The below video will go through the above steps in-case you don't understand anything,




We are now going to leave the controller vm and go to our mininet vm if you have set it up like instructed in the previous blog on mininet this should work just fine.
Now we are going to link mininet to our controller that is running on a separate vm. We have already got the ip address of the machine that our controller is sitting on which in this case is 192.168.195.135 your ip will more than lightly be different so don't forget to check and change accordingly.
In our terminal window enter the following command to link mininet and the controller

sudo mn --topo=tree,3 --mac --switch=ovsk --controller=remote,ip=192.168.195.135

if you have entered this correctly then mininet should be connected we now need to go back to our controller vm and see if we are all good. There is a video below going through the above set up.

Ok so if all of the above is working like in the videos then you are in a good place and you are about to see what mininet looks like when connected to the OpenDaylight Controller. Lets head back over to our controller vm and launch the browser. In the browser type in the following

localhost:8181/dlux/index.html#/login

When the interface for the ODL Dlux comes up the username and password is admin/admin
you are now logged in and you should be able to see your mininet network displayed in the topology tab. There is a video below showing you how to do this but if you have got this far well done and have fun experimenting with mininet and OpenDaylight. Please leave a comment and let me know how you got on an if this blog has been helpful.





Monday, 6 April 2015

Setting up Mininet From Scratch Ubuntu 14.04

Prerequisites for this set up:
-VMWare Workstation [recommended] or
-Virtual Box [Free software not as good as VMWare but works just fine]
-Ubuntu 14.04 operating system 32bit link below
[  http://www.ubuntu.com/download/desktop ]
-Internet connection with access to GitHub
-Patience and composure are also required [you cannot download this :)]
___________________________________________________________________________

Software defined networking (SDN) is the new kid on the block when it comes to networking, but to understand it we must first get hands on with the technology. The best way to do this with out going bankrupt is to use the Stanford University SDN emulation software known as mininet. There are many in-depth tutorials on how to install the software and after running into a number of different issues I have decided to let you know how I installed mininet with all of its bells and whistles. Don't forget that http://mininet.org/ is a gold mind of information when it comes to this technology and should be referred to for guidelines and instructions. I will also upload videos on this blog that you can follow step by step with me as I run through an install of mininet from start to finish. Your going to have to set up the virtual machine yourself but this is very straight forward and there are many different tutorial on this so lets go straight to getting mininet up and running.

The first step is to access the setting on the Ubuntu OS and turn off the lock function; this stops the machine locking during an install and knocking out your connection to Github which will happen if the machine locks. 
The next step is to open the terminal and type in the following commands.
sudo apt-get install mininet
This command will install a number of core files for mininet and allow mininet to run you can see to output of this command by referring to Fig 2.1 below.












Fig 2.1

The next step is to kill any controllers that mininet may have activated by issuing the following command you can see the output from this command below in Fig 2.2.
sudo mn –c









Fig 2.2


The next step is to install git so that mininet can be downloaded from Github and create a file structure on our test machine. The output from the following command can be seen in Fig 2.3.
sudo apt-get install git










Fig 2.3

Now that git has installed we need to pull mininet down from GitHub using the following command you can view this output in Fig 2.4 below.
git clone git://github.com/mininet/mininet









Fig 2.4

The next step is to switch mininet to the latest version by entering the below commands you can see this output below in Fig 2.5.
cd mininet
git tag # list available versions
git checkout –b cs244-spring-2012-final










Fig 2.5


The next step is the most important one as we now want to install of the elements that mininet has to offer. If this step is not carried out mininet may not connect properly with the controller and wireshark will not run. To carry out this step enter the below command you may need to cd ..  to get back first.
mininet/util/install.sh –a
if this doesnt work try 
mininet/util/install.sh -a Ubuntu 14.04 trusty i386 Ubuntu
The final step is to run wireshark and to start mininet to do this we must first open a separate terminal to run wireshark in and enter the following command.
sudo wireshark &
In wireshark select lo as the interface to sniff and type of into the filter box and apply it this tells wireshark to sniff open flow packets. We won’t see anything in wireshark until mininet is started to start mininet type the following command.
sudo mn
In order to get traffic flowing and to see it in wireshark inside mininet type.
h1 ping h2
If you refer to Fig 2.6 below you can now see that mininet is running and wireshark is reading the packets.










Fig 2.6

If you want to follow my video tutorial you can view it below it is just all of the above on a clean install of Ubuntu 14.04 from start to finish.




I hit a few bumps during the installation
which is good as you can see the potential issues that can arise so I have left it unedited.
Please note that unfortunately there is no audio but all of the steps can be followed and you can pause and rewind the video as many times as you need to get it right. Best of luck.
Refer to the mininet walk through to learn more about the functionality of the software http://mininet.org/walkthrough/ .