Performance Evaluation of UDP flow transmission: single path vs. multiple paths.

 

h0 -------s0 ------s1-------s3--------h1

              |                          |

             s2-------------------

 

[Description]

      We want to evaluate the performance of udp flow transmission over single path and multiple paths. So the first experiment is for single path transmission, i.e. h0--s0--s1--s3--h1. The second experiment is for multiple paths transmission. h0 will send the traffic to s0 first. In s0, 50% of traffic will go to h1 via s0-s1-s3 and the other 50% of traffic will go to h1 via s0-s2-s3. The link bandwidth of h0-s0 and h1-s3 is 100Mbps. The other link bandwidth is 25Mbps.

 

[Note]

  When you want to do this experiment, you have to see Lab19 first. Use the provided VM in Lab19. 

 

[script: for topology] simple_topo.py

#!/usr/bin/python

 

"""Topology with 10 switches and 10 hosts

"""

 

from mininet.cli import CLI

from mininet.topo import Topo

from mininet.net import Mininet

from mininet.link import TCLink

from mininet.log import setLogLevel

 

class CSLRTopo( Topo ):

        def __init__( self ):

                "Create Topology"

 

                # Initialize topology

                Topo.__init__( self )

 

                # Add hosts

                h0 = self.addHost( 'h0' )

                h1 = self.addHost( 'h1' )

               

                # Add switches

                s0 = self.addSwitch( 's0', listenPort=6634 )

                s1 = self.addSwitch( 's1', listenPort=6635 )

                s2 = self.addSwitch( 's2', listenPort=6636 )

                s3 = self.addSwitch( 's3', listenPort=6637 )

 

                # Add links between hosts and switches

                self.addLink( h0, s0, bw=100 )

                self.addLink( h1, s3, bw=100 )

           

                # Add links between switches, with bandwidth 25Mbps

                self.addLink( s0, s1, bw=25 )

                self.addLink( s0, s2, bw=25 )

                self.addLink( s1, s3, bw=25 )

                self.addLink( s2, s3, bw=25 )

              

def run():

        "Create and configure network"

        topo = CSLRTopo()

        net = Mininet( topo=topo, link=TCLink, controller=None )

 

        # Set interface IP and MAC addresses for hosts

        h0 = net.get( 'h0' )

        h0.intf( 'h0-eth0' ).setIP( '10.0.0.1', 24 )

        h0.intf( 'h0-eth0' ).setMAC( '0A:00:00:02:00:00' )

 

        h1 = net.get( 'h1' )

        h1.intf( 'h1-eth0' ).setIP( '10.0.0.2', 24 )

        h1.intf( 'h1-eth0' ).setMAC( '0A:00:01:02:00:00' )

 

        # Set interface MAC address for switches (NOTE: IP

        # addresses are not assigned to switch interfaces)

        s0 = net.get( 's0' )

        s0.intf( 's0-eth1' ).setMAC( '0A:00:00:01:00:01' )

        s0.intf( 's0-eth2' ).setMAC( '0A:00:0A:01:00:02' )

        s0.intf( 's0-eth3' ).setMAC( '0A:00:0B:01:00:03' )

 

        s1 = net.get( 's1' )

        s1.intf( 's1-eth1' ).setMAC( '0A:00:01:01:00:01' )

        s1.intf( 's1-eth2' ).setMAC( '0A:00:0A:FE:00:02' )

 

        s2 = net.get( 's2' )

        s2.intf( 's2-eth1' ).setMAC( '0A:00:02:01:00:01' )

        s2.intf( 's2-eth2' ).setMAC( '0A:00:0B:FE:00:02' )

 

        s3 = net.get( 's3' )

        s3.intf( 's3-eth1' ).setMAC( '0A:00:03:01:00:01' )

        s3.intf( 's3-eth2' ).setMAC( '0A:00:0D:FE:00:02' )

        s3.intf( 's3-eth3' ).setMAC( '0A:00:0E:01:00:03' )

      

        net.start()

 

        # Add arp cache entries for hosts

        h0.cmd( 'arp -s 10.0.0.2 0A:00:01:02:00:00 -i h0-eth0' )

        h1.cmd( 'arp -s 10.0.0.1 0A:00:00:02:00:00 -i h1-eth0' )

 

        # Open Mininet Command Line Interface

        CLI(net)

 

        # Teardown and cleanup

        net.stop()

 

if __name__ == '__main__':

    setLogLevel('info')

    run()

 

 

[Script for single path setting] script_simple_topo_singlepath.py

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6634  in_port=1,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=2

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6635  in_port=1,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=2

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6637  in_port=2,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=1

 

 

[script for multiple paths setting] script_simple_topo.py

ovs-ofctl -O OpenFlow13 add-group tcp:127.0.0.1:6634 group_id=0,type=select,bucket=weight:50,output=2,bucket=weight:50,output=3

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6634  in_port=1,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=group=0

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6635  in_port=1,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=2

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6636  in_port=1,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=2

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6637  in_port=2,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=1

ovs-ofctl -O OpenFlow13 add-flow tcp:127.0.0.1:6637  in_port=3,ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output=1

 

[Execution]

single path evaluation

 

From the following figure, we can see that the throughput from h0 to h1 over single path is around 24Mbps.

 

multiple paths evaluation

 

From the following figure, we can see the throughput from h0 to h1 over multiple paths is around 46~47Mpbs. This is better than single path transmission.

 

Dr. Chih-Heng Ke

Department of Computer Science and Information Engineering, National Quemoy University, Kinmen, Taiwan

Email: smallko@gmail.com