Mininet - Run Miniedit Home : www.sharetechnote.com
Mininet - Run Miniedit
Theoretically it is possible to create a network and control each component of the network in mininet console (i.e, in command line), but it would be cumbersome to do it when the network structure is complex.
To make the job easier, Mininet provides a GUI in which you can create and control in graphic mode. This tutorial is about how to use the graphical user interface. The GUI is called Miniedit
How to Launch Miniedit
First, go to the mininet/examples directory and you will find a python script named miniedit.py.
Then, run the miniedit.py
NOTE : If this does not work and prints some error as follows :
bash: ./miniedit.py: /usr/bin/python: bad interpreter: No such file or directory
This is likely to be either because python is not installed or the python executable is installed as different name. In this case, first figure out the python executable and make it sure it works. Then use that executable to run miniedit.py. In my case, for example, I ran it as follows.
$ python3 miniedit.py
NOTE : There seems to be some compatibility issue between mininet and python3 as discussed here and here. It seems that different people have different problems with Python3 using Mininet. In my case when I am using the mininet 2.3.0d6 with Ubuntu 20.04.1 on Virtual box, it seems to work with newly created network, but when I tried to open saved network it prints a lot of errors and the saved network didn't open.
If everything goes well, You will get a graphical editor as shown below.
Creating a Simple Network
Now let's create a simple network and play with it.
First, drag and drop the component as below.
Connect the component using Line(NetLink) as shown below.
Open up the Property window for h1 (host PC 1) and specify IP as below.
Open up the Property window for h2 (host PC 2) and specify IP as below.
In similar way, open up the switch option window. In this example, I wouldn't put anything in it and leave everything by default.
In similar way, open up the controller option window. In this example, I wouldn't put anything in it and leave everything by default.
Now the network creation is done. Let's play with it.
First, Hit [Run] button.
Then the network runs in the consol in the background as shown below, but you can control the network on GUI.
Open the terminal for h1 as shown below.
Now open up the terminal for h2 as shown below.
Try ping from h1 to h2.
You see the ping reply from h2 as shown below.
You can capture the ping traffic with Wireshark as shown below.
Running Minedit in CLI mode