This article explains the spanning tree implementation of MUL SDN Controller.
This feature is used when there are one or more occurrences of loop in the network. Spanning Tree implementation makes sure that there are no loops when there are two or more paths to reach a particular network element. Once a loop is occurred due to a broadcast stream then it can be deadly for the network. So, this makes Loop Detection feature an antidote for any network.
Loop detection module uses LLDP for implementing Spanning Tree. When network element is added to a network, MUL SDN controller sends LLDP packets to every port of the attached network element. By doing this, MUL Controller gets the information about the network topology.
After getting all the information about the neighbours, port states needs to be decided.
Details of the process are :
To start with the spanning tree implementation, MUL selects one of the network elements as Root. (Normally, the one with the lowest cost)
MUL designates three statuses to ports:
- Root Port
- The port which is directly/indirectly reaches the Root.
- Designated Port
- These are ports with the smallest cost to reach Root Port.
- Non-designated Port
- These are the ports which are block by Loop Detection module and hence, not used for forwarding any data packet.
MUL maintains 5 states for ports. State of the port plays an important role in deciding the port behaviour and its role. The states of ports are as:
- INIT – Initial State
- NONE – Learning State
- ACTIVE – Forwarding State
- BLOCKED – Blocked State
- DOWN – Administratively Down State
It may happen if operator administratively activates/de-activates any port, any switch comes up or goes down which may introduce loop in the network. Loop detection module will not allow any loop to occur. It will start all the calculation again to optimally find loop-free paths between all nodes. It will make sure of loop free connectivity of the network.
You can also watch the video demonstration here.