WikiMiNET

La documentation technique et administrative

Outils pour utilisateurs

Outils du site


wiki:sdn:mininet:mininet

General

Installation

Le port 6653 est utilisé pour openflow.

You have to find the correct kernel working for your version of mininet. Please, also consider using a Virtual Machine instead of a container as you will use the host kernel which might not be compiled with the right properties or not have the correct version.

Mininet Version Kernel version woking Kernel version not working
2.1.0 3.19 > 4.4 (udev problem for ifconfig)
2.2.0
2.2.1 (version not working)
2.2.2 (version not working) 4.2

Install Mininet on Debian, Fedora, ubuntu, Suse, RHEL

cd /opt
git clone git://github.com/mininet/mininet.git
git tag #get available versions of mininet
git checkout 2.1.0 #go to working branch of mininet 
cd mininet/util
./install.sh -a
apt install openvswitch-switch #may be required

Install mininet on CentOS

  • Do the following:

  • Change the util/install.sh file:

  • Run the following:
./util/install.sh -a

Commandes

-Launch mininet in debug mode to see errors: mn --test pingall -v debug
-Launch the topology with : mn --controller=remote,ip=192.168.103.142 --topo tree,3
-Launch a custom topology: sudo mn --custom custom_example.py --topo mytopo
-Reset mininet : mn -c

Create a customed topology

  • Create a python file in custom/custom-topo.py
class MyTopo( Topo ):
    "Simple topology example."

    def __init__( self ):
        "Create custom topo."

        # Initialize topology
        Topo.__init__( self )

        # Add hosts and switches
        leftHost = self.addHost( 'h1' )
        rightHost = self.addHost( 'h2' )
        leftSwitch = self.addSwitch( 's3' )
        rightSwitch = self.addSwitch( 's4' )

        # Add links
        self.addLink( leftHost, leftSwitch )
        self.addLink( leftSwitch, rightSwitch )
        self.addLink( rightSwitch, rightHost )


topos = { 'mytopo': ( lambda: MyTopo() ) }
wiki/sdn/mininet/mininet.txt · Dernière modification: 2020/06/27 18:16 (modification externe)