Multipath-Load-Balancing
Method of managing incoming traffic by distributing and sharing load fairly among multiple routes from source to destination hosts
This network has 4 different paths available from host1 to host8.
Paths: ------ Path1 – {S1-S2-S4-S7} Path2 – {S1-S2-S4-S6-S7} Path3 – {S1-S2-S3-S4-S7} Path4 – {S1-S2-S3-S4-S6-S7}
Usually packets will be transferred from host1 to host8 using any one of these 4 paths.
But in case of this algorithm, we will split the packets into any 2 paths to reduce the transfer time.
How to use this code?
Open a linux/Ubuntu terminal
Install mininet
>> sudo apt-get install git >> git clone git://github.com/mininet/mininet >> git checkout -b 2.2.0b3 >> ~/mininet/util/install.sh -a
>> sudo apt install ryu-bin
Open new command window & load your mininet model in it
>> sudo mn --custom ex_simple.py --topo simple_topo --controller=remote
Open another command window & start the ryu-controller in it
Run ryu-controller using your ryu_multipath.py code
>> ryu-manager --observe-links ryu_multipath.py
Ping from one host to another host in mininet
mininet> h1 ping h2 -c4
Now, see check the packets entering input port & packets leaving output ports
The no. of packets will be splited into 2 ports to balance load
mininet> sh ovs-ofctl dump-ports s1
How this code works?
Algorithm will
- Find all possible path between source & destination hosts using DFS(Depth First Search)
- Find 2 most optimal paths out of all the available paths
- Install the corresponding flow entries from ryu controller to switch's group table using OpenFlow protocol