Software Defined Networking
In this article, we will learn concept of SDN (software defined Network) or controller-based networking.
Before dive into SDN concept, first we will discuss 3 planes of network devices. Understanding of these plane functions will help you to understand the concept of SDN.
Network devices task are categorized in 3 planes-
- Data Plane / Forwarding Plane
- Control Plane
- Management Plane
Data Plane: It deals with messages. It describes the function that a network device performs to forward a message (frame, packet). All the functions start from when message come, then network device process it (encapsulation, de-encapsulation etc) and finally forward the frame, come under data plane.
Here is a list of data plane functions; it will give you more clarity about data plane task.
- De-encapsulation and re-encapsulation a packet.
- Matching destination IP address to the IP routing table.
- Matching an Ethernet frame destination MAC to MAC table.
- Adding or removing an 802.1Q trunking header.
- Discard a message due to a filter.
- Perform NAT.
All these functions are involved in the process of forwarding a message. Here I am explaining with a situation, when a message comes at router interface, first it de -encapsulate the packet, then check the destination IP filed and then look into the routing table to select a best route. In final step, it re-encapsulates the packet and forward to the next hop.
Control Plane: Control plane defines the functions that control the data plane. It is like an instructor for data plane, which controls and instructs the data plane activities.
It creates the routing table, MAC table and ARP table that helps data plane to make forwarding decision. For example routers need routing table to forward the packet. If routing table is blank, data plane can’t forward the packet. Similar way, if there is no entry in ARP table; switch will broadcast all the frames including unicast frames. So, this way you can see to forward messages (packets, frames) data plane rely on control plane.
Here is a list of commonly used control plane protocols.
- All routing protocols OSPF, EIGRP, RIP and BGP.
OSPF – Open Shortest path first.
EIGRP – Enhanced Interior Gateway Routing Protocol
RIP – Routing Information Protocol
BGP – Border Gateway Protocol - IPv4 ARP
- IPv6 Neighbor Discovery Protocol (NDP)
- Switch MAC learning
- STP
Management Plane: The management plane defines protocols that allow network engineers to manage the devices. Telnet Secure Shell (SSH), Syslog and SNMP are management plane protocols. To access the network devices remotely, SSH and Telnet are used.
What is SDN?
SDN stands for software defined Network. Software defined networking is the network framework in which data plane and control plane are separated. SDN architecture has a centralized control plane and distributed data plane.
Why we need SDN? Or How SDN is better than traditional networks?
In traditional networks, control plane and data plane both are distributed. It means each network device has its own data plane and control plane.
But, the problem with traditional networks, if there is a need to make changes in configuration, then network administrator has to make changes in each device as each device has its separated control plane(distributed control plane), that is a time taking process.
So, to solve this SDN came into picture. In SDN architecture, control plane is separated from network devices and placed in a centralized controller. So, in other words, I can say SDN uses a centralized control plane that guides distributed data plane.
As you know control plane is centralized, so whenever there is any update in configuration, network administrator have to make changes in only one place (centralized controller).
There are 2 more problems (inoperability or manageability) that are resolved in SDNs.
In traditional networks, devices are closed bound, it means hardware (data plane), software (control plane) and applications all are inside a network device, (all are provided by vendors). So, when a network has different vendor devices, network administrator has to manage the things separately.
In SDNs, network devices are dumb switches (have no knowledge of routing and switching), vendors only provide hardware part that only supports data forwarding, so you have choice to use your own software (control panel). This way, problem of inoperability and manageability is resolved.
Architecture of Software Defined Network
Control Layer:
The controller is software, running on some server, which can be a VM or a physical server. In above architecture, inside control layer there is a box like structure that is representing a device (server) where the controller software resides. An API is running on the same server, so that 2 programs can communicate.
What is South Bound Interface (SBI)?
South Bound Interface (SBI): SBI is an interface between a controller and network device. SBI uses APIs (application peripheral interfaces) that allows controller and network devices to communicate with each other.
What is an API?
API stands for Application Program interface. API is an interface between two different applications, so that they can communicate.
In simpler words, 2 different applications can’t communicate with each other directly, same like 2 different people who know 2 different languages can’t communicate. To communicate they need a translator who knows both languages. Similar way API performs a job of translator between two applications.
What is North bound interface (NBI)?
A northbound interface is an interface that allows communication between controller and and higher layer control applications.
Or you can also NBI is an interface between application layer and control layer and allow communication between the(you can refer above SDN architecture).
What are REST APIs?
REST stands for Representational State Transfer. REST APIs are special type of APIs that allow 2 application to communicate which are running on 2 different hosts. REST APIs use HTTP messages to transfer data between two application.