A Beginner's Guide To OpenFlow and SDN
When I started reading about the latest networking trends in the fraternity (of Open Networking enthusiasts like me), I learnt that veterans are terming- something called "SDN"- the next big thing after the "world wide web". The next thing I did is google SDN. And its mere definition was more than enough for me to fall in love (again!). But this tech love was way more convoluted (than the real one) as it was, and still is, full of conundrums, the accuracy is debatable, everyone is an expert and the list goes on. This picture aptly depicts my emotions.
It took me a while to grasp the fundamentals of SDN and the technologies related to it. So, I want you all to have a cornerstone for further exploring this technology. Before going any further, be sure to have a clear concept of Networking Planes, however, if you need a brush-up on your concepts check it out: Types of Planes in Networking. Let's get started.
Contents
OpenFlow
- Concept
- History
- Explanation
- Components of OpenFlow Network
SDN
- Concept
- Explanation
- Need for SDN
- Architecture of SDN
- SDN Layers
- SDN Approach
- Problems while implementing SDN
OpenFlow
Concept
OpenFlow is the protocol through which control plane and forwarding plane (or data plane) communicate.
History
Earlier there used to be only peripheral security in any network infrastructure, i.e. incoming packets were probed at the periphery of the networks and once they were in, they could go to any device connected in that network.
But Martin Casado proposed that there should be a provision in the network security that checks the packets at every crucial point or node within the network. So, he emphasised on creating a central security system within the network.
The first model he proposed was clean-slate security architecture (SANE), which further evolved into Ethane and ultimately became OpenFlow.
Explanation
Generally people new to this concept confuse between OpenFlow and SDN, they think these terms are synonymous.But the reality is OpenFlow is an open API that provides a standard interface for programming the data plane of switches.
It is a protocol for remotely controlling the forwarding table of a switch or router and is one element of SDN. Forwarding table is nothing but the table which contains information about the data and its route in a network.
It is implemented on Ethernet switches to allow the forwarding plane i.e. data plane to be managed by a controller present on control plane in SDN architecture. OpenFlow based controllers will discover and maintain an inventory of all the links in the network and then will create and store all possible paths in entire network.
OpenFlow protocol can instruct switches and routers to direct the traffic by providing software-based access to flow tables that can be used to quickly change the network layout and traffic flows as per users requirements.
Components of OpenFlow Network
Clearly, as per the above figure, an OpenFlow Switch contains:
- One or more Flow Tables that implement packet lookups and forwarding, and
- An OpenFlow channel to link to an external controller .The switch interconnects with the controller and the controller directs the switch using the OpenFlow protocol.
The controller can delete, add or update flow entries in flow tables existing in the switch, both re-actively (i.e. in response to packets) or proactively (i.e. using the OpenFlow protocol). Controller makes this decision based on policies set by administrator or depending on the conditions of the network and the decision it makes is forwarded to flow table entries of all the switches in the network.
SDN
Concept
The separation of Control plane and Data plane.
Explanation
Software Defined Networking: if you go by its literal meaning, it can be perceived as Networking in a software defined environment. Now, let's look at what is a Software Defined Environment?
Any new innovation occurs when the existing technologies fail to satisfy our ever-growing needs. Same is the case with our existing network infrastructures, which lack many features thus creating a Need for SDN:
- SDN facilitates innovation in a network.
- SDN allows Layered architecture with standard Open interfaces.
- Once SDN is implemented, experiments and researches can be carried out using non-bulky, non-expensive equipment, as SDN provides a software approach to emulate large physical networks.
- More accessibility since software can be easily developed by more vendors.
- More flexibility with programmability.
- Ease of customisation and integration with other software applications
- Program a network vs. configure a network.This comparison is an apparent take on open networking vs. vendor-specific networking.
Architecture of SDN
In the SDN architecture:
- the control and data planes are decoupled,
- network intelligence and state centralised, and
- the underlying network infrastructure is abstracted from the applications.
This diagram shows a very basic and simple architecture of SDN, which contains three layers mainly: Application layer, Control layer, and Infrastructure layer.
SDN Layers
- Infrastructure layer: It is the foundation layer which consists of both physical and virtual network devices such as switches and routers. All the network devices will implement OpenFlow protocol to implement traffic forwarding rules.
- Control layer: This layer consists of a centralised control plane that is decoupled from the physical infrastructure to provide a centralised global view of the entire network. This layer will use OpenFlow protocol to communicate with the below layer i.e. infrastructure layer.
- Application layer: It consists of network services, application and orchestration tools that are used to interact with control layer.
SDN Approach
The following graphic, gives a one-to-one mapping of the transformation of legacy network to an SDN network.
Though SDN promises some very amazing infrastructural designs for the future, but there are many problems that one may face while implementing SDN.
Problems while implementing SDN
- Complete removal of control plane from each switch in the network and putting them into a central box may be harmful.
- Exact division of control plane between centralised controller and distributed forwarders is yet to be worked out.
- In contrast to the centralised solution in SDN, Distributed solutions may be required for legacy equipment and for fail-safe operation.
Please remember that this is only a basic introduction to SDN and OpenFlow. Hope this proves to be informative. Please share you valuable feedback in the comments.