WHAT IS SOFTWARE DEFINED NETWORKING?
Quite simply, Software Defined Networking (SDN) is the single most significant innovation in computer networking in the last 30 years. Seriously it is a game changer. But most people either don't realise it's true potential or they dismiss it as a passing fad. But we are going to explain what SDN is in simple terms, how it works and how you can get started learning about this amazing technology.
Let's start with an analogy -
A network is basically a set of pipes (cables) and data flows through these pipes the same way water does, in one end and out the other. To regulate the flow through these pipes there are a number of valves (switches and routers). Your job as a plumber (network administrator) is to add new pipes when required and upgrade the pipes that become too small with larger ones. But the problem is every time you change the pipes you also have to adjust the valves, individually, by hand. Not only is that time consuming but it is also prone to errors and getting it wrong can be disastrous. Too low and people don't get the amount of water they need, too high and water is wasted or things stop altogether. Now imagine if you could program these valves to adjust themselves, to automatically open and closed based on usage. Add a new pipe and the valves automatically compensates, spring a leak and they automatically close. How cool would that be?
That's basically what SDN is, the ability to program your switches to automatically change based on things that are happening on your network. This goes way beyond things like QoS and ACLs, we are talking about both proactive and reactive changes based on almost any criteria. Not only do you have access to the packet headers but also the actual payload. This means you now have complete control of every single packet on the network, at a byte level. Just think what you could do with this power, the possibilities are endless!
So how does an Ethernet Switch work?
It basically consists of two main components, the switching hardware and some software, or firmware as it is often called. When a packet arrives at one of the ports the hardware asks the firmware what it should do with the packet. The firmware then looks up the destination address on a list (called a MAC table) which contains all the devices that are currently connected to the switch and then tells the hardware which port to send the packet out from. Obviously this is a greatly simplified explanation but from a SDN stand point this is all we really care about. Now the problem was that the way this process works was set in stone, it did what it did and not much else. It was really up to the manufacturer to decide which features they wanted to include in the firmware because they were the only ones who had access to the code. That's when the idea of an programable switch was considered by a group of researchers at Stanford University. They proposed the concept of separating the brains of the switch (firmware), which they called the Control Plane from the switching hardware, or Data Plane. By placing this Control Plane onto a totally seperate server instead of inside the actual switch you can now modify that software to add additional functionality. This new Control Plane software became what is now known as a SDN Controller and the additional functionality is implemented as SDN applications that you write and install on the controller.
To make this separation possible a new communication protocol was required which would allow the switch to talk to the SDN Controller, the first and most widely used of those protocols is called OpenFlow. Originally developed as part of the Stanford SDN research it is now maintained by the the Open Networking Foundation (ONF) and is currently supported by dozens of the hardware and software vendors. The digram below from the ONF website shows the separation between the different layers of an SDN deployment.
OK, so now you know what an SDN is how do you build your own?
To build a Software Defined Network we need to source our two main components, a controller and a switch.