Day 26 part 1: "Redirecting" back in the right direction

Welcome back!!!
Sorry for not updating for the past few days. Days 23, 24 and 25 were spent in introspection, reading up on how to build Ryu applications and how to achieve the proposed architecture.

To summarize the mistakes done so far, and where we should rectify ourselves:
  1. The proposed architecture in the previous post was wrong in one place. There is a D-Link switch that connected all the switches to the controller. This is catastrophic. I shall explain why. Although my switches are designed to act as routers, they still exchange ARP, ICMP and few other packets with the each other and the controller. When ARP packets are sent, they get stuck in a loop. Thus discovering MAC addresses of the neighboring switch also leads to an infinite loop. The loop is formed by Zodiac FX switches being connected to a common D-Link switch. I had committed a similar mistake previously when my Zodiac FX switches were acting as layer-2 switches. I assumed that since they are layer-3 now, the loop wouldn't affect the network. But since Zodiac FX switches are responsible for ARP, ICMP and other traffic in both layer-2 and layer-3 functionality, the problem persists.
  2. Assuming that the load balancer should be a controller to capture and redirect the OpenFlow messages. This is not the case, since all OpenFlow messages are also encapsulated in a TCP stream. Any load balancer that can take care of TCP loads, can also take care of the OpenFlow messages flowing between the controller and the switch. Little more about OpenFlow will be discussed in today's article.
  3. Since I had assumed that load balancer = controller, I was going through Ryu application tutorials to build a load balancer using Python. I did find two useful libraries in case anyone is looking for the same - PumpkinLB and DPKT libraries. This was obviously a wrong approach since any normal LBs can also do the job and I need not code from scratch for a load balancing application. HAProxy is one tool I am looking at right now to achieve the same.
 Enough about the past! Let's talk what's cooking. So today I built the network as shown in the below architectural block diagram. The only thing changed from the previous architecture to now, is the elimination of the D-Link switch in between switches and load balancers. I shall upload a video of how to set-up the network, once the design of the load balancer is ready.


Requirement:
  • 8 Linux based systems - atleast one of which has more than or equal to 6 USB/Ethernet ports
  • 1 D-Link switch
  • 3 NICs (Network Interface Cards)
  • 3 Zodiac FX switches
  • 3 USB cables
  • 13 ethernet cables.
 I have recommended 3 NIC cards since all my systems have 6 ports. But each of my systems have only 1 ethernet port and 5 USB ports. Since I needed to convert atleast 3 other USB ports to ethernet, I have used 3 NICs. Right now, the systems are just connected, IP addresses are set. So the functionality possible is:
  • Switches can talk to the load balancer since that is the single point of contact to the controller
  • Controllers can talk to each other since all my controllers are present in the same subnet. I could change this, but for now I am planning to work with it since in my previous experiments a switch and controller in different subnets couldn't talk to each other.
What we need to know about OpenFlow to design the Load Balancer?

OpenFlow comes in two contexts - When someone says OpenFLow Controllers, they just mean that the controller communicates with the SDN enabled switch through the OpenFlow protocol. Here OpenFlow Controller or OpenFlow communication constitutes the layer 2 of the OSI model - the data link layer. The SDN switches and controllers also lie in the data-link layer. That is the reason OpenFlow communication is termed as a layer 2 activity.

This is not to be confused with OpenFlow protocol. OpenFlow protocol is the a protocol that is used in OpenFlow communication. Since our control plane layer runs the application layer on top of it, the controller needs to communicate with some application layer protocol that is encapsulated in other protocols. This application layer protocol is the OpenFlow protocol. This is further encapsulated in TCP, IPv4 and Ethernet formats. Since I had this confusion of how can OpenFlow be addressed as both layer 2 and application layer protocol, I've addressed this issue to clarify the same for anyone else who had the same doubt.

To look at an OpenFlow packet, you could refer to the below diagram that I've borrowed from the link: https://www.slideshare.net/openflow/openflow-tutorial



From now on, our focus is completely implementation of the above architecture. In tomorrow's post, I shall be discussing how to build the Load Balancer in our architecture. I shall be referring to this link for the same.

Refer to previous and next articles here.

Author: Shravanya
Co-Author: Swati

Comments

Popular posts from this blog

Day 12: Master Slave SDN Controller Architecture

Day 50: Tcpreplay and tcpliveplay approach

Day 10: Mininet Simulation of a basic distributed SDN controller architeture