Day 32: Implementation of Architecture Phase 1

After committing some mistakes, I have finally conquered a few of them by achieving some functionality in building the proposed architecture today!

So, let's look into how to build a basic SDN netwoek where my Zodiac FX switches are connected to a network of Controllers.

The architecture being built, looks something like this:


There is only one change from the previous proposed architecture, the router functionality is integrated with the load balancer on the same system.

Let's take a look at the IP addresses of the systems:
H1: 192.168.1.10/24
H2: 192.168.2.10/24
H3: 192.168.3.10/24

For easier understanding of the system, I've introduced an extra host on the Subnet 1 connected to my S1 Zodiac FX switch, let's call it H4.

H4: 192.168.1.20/24

S1: 10.0.1.3/24
Controller of S1: 10.0.0.7
Gateway for S1: 10.0.1.2

S2: 10.0.1.4/24
Controller of S2: 10.0.0.8
Gateway for S2: 10.0.1.2

S3: 10.0.1.5/24
Controller of S3: 10.0.0.9
Gateway for S3: 10.0.1.2

Router interface facing towards the Zodiac FX switches: 10.0.1.2/24
Router interface facing Controller architecture/ Load Balancer: 10.0.0.2/24

Master Controller: 10.0.0.6/24
Controller 1: 10.0.0.7/24
Controller 2: 10.0.0.8/24
Controller 3: 10.0.0.9/24

These above address can be configured on all systems by the following command:
> sudo ip addr add <ip-address> dev <interface-name>

If the IP address is being set on the Zodiac FX, follow these steps after establishing a Serial Port connection with the switch on putty:
> config
> set ip-address <ip-address>
> set gateway 10.0.1.2
> set of-controller <controller-ip-address>

Needless to say, make sure all your ethernet cables are in place as seen in the diagram. There are a few more configuration steps involved to achieve the desired!

We need to ensure that no redirected packets are received by the controllers, so we perform the below actions:
> sudo sysctl –w net.ipv4.conf.all.accept_redirects=0
The router on the other hand has to redirect the packets received on one of its interface to the other, thus we perform the below:
> sudo sysctl –w net.ipv4.ip_forward=1

We can be sure that the network is working perfectly fine when our controller can ping the switch and OpenFlow packets can be exchanged. Try doing the same from one of the controllers at this stage, it wont work. Why?

The packets generated from the controllers do not know where to go since the packet is traversing a different subnet. Thus we need to add static routes. To do the same, perform the following actions on all the controllers:
> sudo ip route add 10.0.1.0/24 via 10.0.0.2

Now perform ping from controller to switch, host to host. This should work perfectly fine. Right now, we have built a network where a switch can access or talk to a network of controllers. What if one of the controller fail? Without changing the configured IP address of the controller in the switch, we need to redirect packets to another controller and fool the switch. The switch should never come to know that the controller it was talking to so far, is down. Hence redirection is required. This can be performed by the load balancer. The code is in progress!!! So we shall address this in the next post.

Refer here for the previous and next posts.

Author: Shravanya
Co-Author: Swati

Comments

  1. How are Subnets connected to Zodiac FX. Is it L2 network or L3 network. The IP address of hosts is in subnet 192.168.1.x/24 whereas S1 has a different subnet. Have you used static IP routing host specific or is something missing in the info.

    ReplyDelete
    Replies
    1. Apparently the Zodiac FX switch need not be in the same subnet as the hosts it is connected to. This is just an interesting thing I bumped into through experimentation. I have not done any static routing wrt switches and host communication. I will analyze why it is working though, and get back to this question.

      Delete

Post a Comment

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