MiniNAM

Refer to https://github.com/uccmisl/MiniNAM and https://www.ucc.ie/en/misl/research/software/mininam/

I design a lab for MiniNAM

 

[lab1.py]

from mininet.topo import Topo

 

class MyTopo( Topo ):

    "Simple topology example."

 

    def __init__( self ):

        "Create custom topo."

 

        # Initialize topology

        Topo.__init__( self )

 

        # Add hosts and switches

        h1 = self.addHost( 'h1' )

        h2 = self.addHost( 'h2' )

        h3 = self.addHost( 'h3' )

        s1 = self.addSwitch( 's1' )

        s2 = self.addSwitch( 's2' )

        s3 = self.addSwitch( 's3' )

        s4 = self.addSwitch( 's4' )

 

        # Add links

        self.addLink( h1, s1, bw=10 )

        self.addLink( s1, s2, bw=10, delay='100ms' )

        self.addLink( s1, s3, bw=10, delay='500ms' )

        self.addLink( s2, s4, bw=10) 

        self.addLink( s3, s4, bw=10)  

        self.addLink( s4, h2, bw=10)

        self.addLink( s4, h3, bw=10)

 

topos = { 'mytopo': ( lambda: MyTopo() ) }

 

[Execution] (Here we set the controller to remote controller. But we don’t initial any controller for now. We will set up the rules later)

 

We will set the rules so that the packets from h1 to h2 will go via s1-s2-s4 and packets from h1 to h3 will go via s1-s3-s4.

 

 

 

When h1 ping h2

When h1 ping h3

With MiniNAM, we can easily see how the packets go through the networks.

 

Dr. Chih-Heng Ke (smallko@gmail.com)

Department of Computer Science and Information Engineering,

National Quemoy University, Kinmen, Taiwan.