How to use MiniEdit, Mininet’s graphical user interface

April 2, 2015 — 120 Comments

The Mininet network simulator includes MiniEdit, a simple GUI editor for Mininet. MiniEdit is an experimental tool created to demonstrate how Mininet can be extended.


To show how to use MiniEdit to create and run network simulations, we will work through a tutorial that demonstrates how to use MiniEdit to build a network, configure network elements, save the topology, and run the simulation.

Set up Mininet

You should already be familiar with Mininet before trying to use MiniEdit. If you need some basic information about Mininet, please read my Mininet overview.

Before starting this tutorial, you should have already started the Mininet VM and connected to it via SSH with X forwarding enabled. If you need to learn how to do this, please read my post describing how to set up Mininet.

Start MiniEdit

The MiniEdit script is located in Mininet’s examples folder. To run MiniEdit, execute the command:

$ sudo ~/mininet/examples/

Mininet needs to run with root privileges so we started MiniEdit using the sudo command.

MiniEdit user interface

MiniEdit has a simple user interface that presents a canvas with a row of tool icons on the left side of the window, and a menu bar along the top of the window.

MiniEdit canvas

MiniEdit canvas

The icons represent the following tools:

Mininet-selectThe Select tool is used to move nodes around on the canvas. Click and drag any existing node. Interestingly the Select tool is not needed to select a node or link on the canvas. To select an existing node or link, just hover the mouse pointer over it — this works regardless of the tool that is currently active — and then either right-click to reveal a configuration menu for the selected element or press the Delete key to remove the selected element.

Mininet-hostThe Host tool creates nodes on the canvas that will perform the function of host computers. Click on the tool, then click anywhere on the canvas you wish to place a node. As long as the tool remains selected, you can keep adding hosts by clicking anywhere on the canvas. The user may configure each host by right-clicking on it and choosing Properties from the menu.

Mininet-switchThe Switch tool creates OpenFlow-enabled switches on the canvas. These switches are expected to be connected to a controller. The tool operates the same way as the Hosts tool above. The user may configure each switch by right-clicking on it an choosing Properties from the menu.

Mininet-legacy-switchThe Legacy Switch tool creates a learning Ethernet switch with default settings. The switch will operate independently, without a controller. The legacy switch cannot be configured and is set up with Spanning Tree disabled, so do not connect legacy switches in a loop.

Mininet-legacy-routerThe Legacy Router tool creates a basic router that will operate independently, without a controller. It is basically just a host with IP Forwarding enabled. The legacy router cannot be configured from the MiniEdit GUI.

Mininet-netlinkThe NetLink tool creates links between nodes on the canvas. Create links by selecting the NetLink tool, then clicking on one node and dragging the link to the target node. The user may configure the properties of each link by right-clicking on it an choosing Properties from the menu.

Mininet-controllerThe Controller tool creates a controller. Multiple controllers can be added. By default, the MiniEdit creates a mininet openFlow referencecontroller, which implements the behavior of a learning switch. Other controller types can be configured. The user may configure the properties of each controller by right-clicking on it an choosing Properties from the menu.

Mininet-run-stopThe Run starts Mininet simulation scenario currently displayed in the MiniEdit canvas. The Stop button stops it. When MininEdit simulation is in the “Run” state, right-clicking on network elements reveals operational functiosn such as opening a terminal window, viewing switch configuration, or setting the status of a link to “up” or “down”.

Create a custom network topology using MiniEdit

First we will add some hosts to network scenario. Click on the Host icon, then move the pointer to the location on the MiniEdit canvas where you want the host to appear, then click again. A host icon will appear on the canvas.

As long as the Host tool is active, you can add more hosts. Keep clicking at each spot on the canvas where you want a host to appear. In this example, we will add ten hosts.

Add eight switches and three controllers using the same method: Click on the Switch tool and add switches, then click on the Controller tool and add controllers.

Add hosts, switches, and controllers

Add hosts, switches, and controllers

Next, add links between the nodes on the canvas. Click on the NetLink tool, then click on a node and drag the link over to another node. For example: connect a host to a switch, or a switch to another switch. Connect every host to at least one switch. Connect the switches together to create a network. Then, connect each switch to one of the controllers.

Your completed network should be similar to the network show in the screenshot below:

Connect nodes together

Connect nodes together

We were able to create this complex custom network topology in a few minutes using MiniEdit. Manually writing a Mininet custom topology script to create this scenario would have taken a lot longer.

Configure the controllers
Edit each controller so it uses a unique port number

Edit each controller so it uses a unique port number

We have three controllers. In this basic example, we will use the default OpenFlow Reference controller that comes built in to Mininet. However, we need to configure each controller so it uses a different port.

Right-click on each controller and select Properties from the menu that appears. The default port number for each controller is 6633. Change this so the port numbers used by controllers c0, c1, and c2 are 6633, 6634, and 6635, respectively.

Set MiniEdit Preferences

To set MiniEdit preferences, use the MiniEdit menu command, Edit → Preferences. In the dialogue box that appears, make the changes you need.

MiniEdit preferences default settings

MiniEdit preferences default settings

Set the Start CLI option

By default, the MiniEdit console window does not give the user access to the Mininet command line interface. If you want to be able to use the Mininet CLI when a simulation is running, check the Start CLI box. You may also set the version of OpenFlow you will use.

In our scenario, we will use the CLI and will leave all other settings at default values.

Set CLI option

Set CLI option

Saving preferences

The MiniEdit Preferences are saved in the MiniEdit topology file for each scenario so you may have different preferences for each saved scenario.

Save the configuration

Now we have a software-defined network scenario that should allow each host to communicate with any other host in the network.

We will save the MiniEdit topology file so we can load this scenario into MiniEdit in the future. We will also export a Mininet Python script that we can run in a terminal window to execute the scenario.

Save topology file

To save the Mininet Topology (*.mn) file, click on File in the top menu bar and select Save from the drop-down menu. Type in a file name and save the file.

Save custom Mininet script

To save the Mininet Custom Topology (*.py) file, click on File in the top menu bar and select Save Level 2 Script from the drop-down menu. Type in the file name and save the file.

Run the MiniEdit network scenario

To start the simulation scenario, click the Run button on the MiniEdit GUI. In the terminal window from which you started MiniEdit, you will see some messages showing the progress of the simulation startup and then the Miniedit CLI prompt (because we checked Start CLI box in the MiniEdit preferences window).

MiniEdit console shows Mininet prompt

MiniEdit console shows Mininet prompt

Pay attention to the warning message. Before stopping the simulation with the Stop button, ensure you quit from the CLI by typing exit at the Mininet prompt in the MiniEdit console window.

Experiment with the network

After starting the simulation scenario, we will view the status of different elements in the network, open terminal windows, run network traffic, run programs on simulated hosts, and simulate network failures. These activities will demonstrate how to use some of the features of MiniEdit.

View Open vSwitch configurations

First, check the switch configurations in the network simulation to verify that everything is set up correctly. You can run the MiniEdit menu command, Run → Show OVS Summary to see an listing of switch configurations. In this case, we can verify that each switch is listening to the correct controller on the correct port.

OVS Summary window

OVS Summary window

Check switch flow tables

Next, view the flow tables of some of the switches using the ovs-ofctl dump-flows command. You need to run this command on the host computer (or the virtual machine) that is running Mininet. So, you need to use a terminal window connected to the computer (not to one of the nodes in the network simulation). You can use MiniEdit to open an xterm connected to the host computer by using the MiniEdit menu command, Run → Root Terminal

Open a an xterm on the host Mininet VM

Open a an xterm on the host Mininet VM

In the root terminal window, first change the userid from root to mininet, so you can view the switches running in the mininet account. Remember that we logged into the Mininet VM as user mininet so all mininet processes are running in the mininet account.

# su mininet

Then, check the flow table on switch s1 using the commands below. It should be empty.

$ sudo ovs-ofctl dump-flows s1

Run programs to generate and monitor traffic

Open a xterm window on hosts h1 and h8. Right-click on each host in the MiniEdit GUI and select Terminal from the menu that appears.

In the h1 xterm window, start a Wireshark with the command, wireshark &. In the h8 xterm window, start a packet trace with the command tcpdump. We do this just to demonstrate two different methods of monitoring traffic on the virtual Ethernet ports of each host.

Then, run a ping command to send traffic between host h1 and h8. On the MiniEdit console window, enter the following command:

mininet> h1 ping h8

In the MiniEdit console, you see the results of the ping command. In the Wireshark window and in the host h8 xterm window — which is running tcpdump — you will see ICMP packets successfully sent and responses received.

Monitoring traffic generated by the ping command

Monitoring traffic generated by the ping command

Simulate a broken link

To simulate a broken link in the network, move the mouse pointer over one of the blue links in the network and right-click. Choose Link Down from the menu that appears. The link will turm into a dashed blue line, indicating it is down.

Breaking a link

Breaking a link

You should observe that no more traffic is received at host h8 and that the ping command shows packets sent from host h1 are not being responded to.

Now, restore the link operation by right-clicking on the dashed line and choosing Link Up from the menu. The link will again appear as a solid blue line, traffic will again be received at host h8, and the ping command running on h1 will show it is receiving responses from h8.

Check flow tables again

Check the flow table on switch s1 again. You should see flows installed for ICMP packets and ARP packets. On the root terminal window, enter the command:

$ sudo ovs-ofctl dump-flows s1

Stop the simulation

Quit Wireshark and tcpdump on hosts h1 and h8.

Quit the ping command in the MiniEdit console window by pressing Ctrl-C on the keyboard.

Then, quit the Mininet CLI by typing exit at the mininet> prompt.

Now, press the Stop button on the MiniEdit GUI.

Run a saved Mininet custom topology script

An alternative to running a simulation directly in MiniEdit is to run a Mininet custom topology script created by MiniEdit. This is the file with the .py extension previously created when we used the menu command: File → Save Level 2 Script.

The advantage of running a Mininet custom topology script is that you can edit the script originally created by MiniEdit to create more complex scenarios and to use Mininet features not supported by MiniEdit.

To run the custom topology you created in MiniEdit, execute the Mininet custom topology script. First, change the file permissions so it is an executable file, then execute the file. In the example below, the file is named

$ cd ~/mininet/examples/test
$ sudo chmod 777
$ sudo ./

The script sets up the network topology and the mininet> command line prompt appears. Now you can test the scenario by using the ping command to test connectivity between hosts in the network. For example:

mininet> h1 ping -c3 h2
mininet> h1 ping -c3 h8


We used MiniEdit to create and run a simulation of a custom network topology. We showed how to use many of MiniEdit’s features.

MiniEdit seems to be a useful tool for creating custom software-defined network simulation scenarios.

120 responses to How to use MiniEdit, Mininet’s graphical user interface

  1. Hi Brian,

    Do you know how to set up agent with miniedit?

    • What do you mean by “agent”?

      • Hi
        I have run miniedit but there are many buttons doesn’t appear like controllers
        what is the problem ?
        Do I need enable X11 each time I need to run miniedit?
        by using command in terminal to execute putty -x I can’t enable X11 —> Display not set
        but if I double click on putty in its folder I can enable X11 but if I close it, I need to enabled again.
        thanks in advance

        • Hi Nasser,

          The controller configuration should in the toolbar on the left side of the GUI. If it is not, I do not know what the problem would be. I have never experienced that issue.

          Yes, you need X forwarding enabled to display the MiniEdit GUI.

          Yes, that’s how Putty works. You’ll need at least one Putty window with X forwarding enables while using X applications on the Mininet VM. So, leave the Putty window open and connected.


        • Hi Nasser
          i have your problem. do you have one solution for me?
          i want a controller in miniedit but the miniedit has not controller icon

        • hi Nasser
          I had your problem too, but I solve it. I think the version of your mininet should upgrade!!
          at first I remove last version of mininet and then install it from this page

  2. how can i use flow table to draw a graph with networkx library in python

  3. How I can connect two controllers in a miniEdit.

    • Hi Rashid,
      Just create new controllers and then, for each controller, change the port number the controller uses. Then connect each controller to the switches it will control.

  4. Hi Brian,
    Just like Rashid, I was dealing with Multiple controllers. Any idea, as to how I can make those controllers run different scripts? Say, controller1 runs script and controller2 runs and


    • Hi Chaitanya,
      Start each controller as a new process, each running on its own port. You start the controllers separately from the switches so just ensure you connect each switch to the right controller and then you should be able to test your application.

  5. Thanks, for the answer Brian.
    However, I am still facing some issues.
    As soon as I start up another controller instance on another terminal, I get the “Address already in use” error. Therefore, I can’t even get my topology script to connect to the (second) controller, as there isn’t one hosted.
    Could u point out what is it that I am missing?
    (The controller I am using is Ryu, rather than POX, though I have used POX in the past)

    • I am only familiar with POX. But, did you check that both the controllers and switches have the right control ports defined? Each controller must use a unique TCP port number.

      • Well, I think yes, and this is what it looks like:
        c0 = RemoteController(‘c0’, port = 6633)
        c1 = RemoteController(‘c1’, port = 6638)


        So the controllers listen on 6633 and 6638, and switches are connected as above. Anything else, that could be wrong?

  6. Hi Brian!

    As per you mentioned i ran the command to start miniedit but it isnt working for me.
    Here is what i got.

    mininet@mininet-vm:~$ sudo ~/mininet/example/
    sudo: /home/mininet/mininet/example/ command not found

    Any idea what i am missing here?

    • Hi Zafar,
      Just saw this, and couldn’t help but reply, as its a minor issue.
      The command is sudo python ~/mininet/example/

      You missed calling python to invoke the script.

    • Hi Zafar,
      I misspelled the path of the script (the correct directory is named “examples”, not “example”). The correct command should be:
      $ sudo ~/mininet/examples/

      Thanks for pointing this out. I will fix the post.

      • Hi Brian,
        i am new to mininet so i am having some issues with it.i would be grateful if you can help me in this.

        I dont know where to store python scripts which i want to run in my mininet.

        i installed mininet from
        its working fine but i dont know the exact directory to place .py files before calling them here in mininet.

        any idea?

        • Hi Zafar,
          If you are writing a custom topology script, you can specify the path of the script when you run the mn command. See

          • But this is the way if you are going to run a script from mininet/custom or if you are going to use mininet/examples etc.

            i have my own script and i cant run it from these paths or it isn’t available on these paths.

            i wana run it form my local machine.

            where to store/place that script in my local machine in order to run it?

          • The script must be on the same system that Mininet is installed on. If you are running Mininet in a VM, the script needs to be in a directory on the VM.

      • hello sir…i hv gone through your mininet tutorial and they are well written and well explained.Sir, i hv come to miniedit but i m nt able to run the command $ sudo ~/mininet/examples/ or $ sudo python ~/mininet/examples/ it says “_tkinter.TclError:no display name and no display enviroment variable”.I request you to kindly suggest me what modification i have to make to run this command.
        Your kind reply will be highly appreciable.Thnks in advance

        • If you see display errors, first check that you have X forwarding enabled on the SSH connection to the Mininet VM. Start SSH with the following command: ssh -X username@servername. If that does not work, try the -Y option with: ssh -Y username@servername.

          • thnku sir for your reply..i can ssh via command putty.exe -ssh ipaddress bt i am still not able to use miniedit..kindly provide me with more valuable suggestions to solve this problem

          • Do you have X forwarding enabled in Putty?

          • yes sir i have

          • I have seen this error when X forwarding is not enabled or is not working properly. If X forwarding is working than I don’t know what the problem would be. Is it possible that the X server on your Windows PC is not working? Are you running Xming?

          • ohh itz k .Sir u were tellin about x forwarding so i would lyk to inform u dat i use putty.exe -ssh command for x forwarding.The command ssh -X mininet@ used to work earlier in my system bt it doesnt work anymore since a few days and moreover ip address of eth1 in my mininet is not where i see in all the websites..kindly suggest if there is some problem in these

          • Use the IP address assigned. If it is .102, use that IP address in the SSH command.

    • hello…cud u solve ur pblm of running the above prblm u mentioned…i m facing the same prblm lyk urz…plz help

  7. hi Brian,

    for me run doesn’t work
    Any idea ?

  8. Hi Brian,
    Thank you. It is well-organized. I have question. I followed everything you’ve shown as explained but when I want to check flow tables entries using the command ($ sudo ovs-ofctl dump-flows s1) I get only one line:

    root@linux:~mininet# NXST_FLOW reply (xid=0x4):

    Even though pingall and (h1 ping h8) gave correct responses and have no issues!
    Thank you for your response in advance.
    — Ahmad.

    • Hi Ahmed,
      Thank you for your comment. You found an error in my post. You are trying to run the command in the MiniEdit root terminal window but the userid running the command is *root*, while MiniEdit and Mininet are running on the userid *mininet*. Change the user to *mininet* with the command `su mininet`, then enter the *ovs-ofctl* command again: `sudo ovs-ofctl dump-flows s1`. Then you will see the flows on the switch.
      Thanks for finding this for me. I will correct it in the post.
      Best regards,

      • Hi Brian,
        Thank you for quick reply. I apologize for asking you too much but I am kind of new in Linux so bear with me.

        My default Linux user is (Linux) so Ubuntu terminal appears as (linux@linux:~$ ). When using MiniEdit root terminal, I get (root@linux:~mininet# ). Thus, when I change the user by (su mininet) I get:

        no passwd entry for user ‘ mininet ‘

        Would you mind telling me what does this message mean since I’ve searched about it but no answer was satisfying.

        • It means there is no user account called “mininet”. Try switching to user “linux” in the MiniEdit root terminal: su linux. I assume you are running Mininet/MiniEdit in your account with userid=”linux”.

          It looks like you installed Mininet on your own computer. I prefer to use the Mininet VM. If you are new to Linux, and it you still have problems after trying to switch to the linux account in the MiniEdit root terminal, I highly recommend using the Mininet VM, instead.

          First, set up the Mininet VM as described in:
          Next, review the basic functions of Mininet, as described in:
          Next, follow the MiniEdit steps in this post ( and it should work.

          • Brian,
            I solved the problem. The problem was that I use a remote controller (floodlight) that I’ve installed on my system from github and connect it with the c0 controller in Mininet. The flow entries are showing when I use the default controller by mininet but not in remote controller.

            Can you tel me what is the default controller in Mininet and how it differes from floodlight?

            THANK YOU.

          • Hi Ahmad,
            The Mininet default controller is a simple controller that implements a learning switch. That is all it does. It is a simple way to demonstrate how Mininet works but it is not very useful in real-world applications.
            Floodlight is a much more complex controller that supports programming network applications. I am not familiar with Floodlight (I have used POX as a remote controller) but you may have to do some programming or additional configuration to make Floodlight work for you.

  9. Great!
    Thank you very much for being so patient with me questions. Really appreciate it.

  10. Hello;; This is indeed great work and thanks for your information, I have added two trunks ports and two access ports, and configured two vlans,, I am just wondering how to save my configuration on the switch, please Note I am using CLI command line. and accessing the Switch from Mininet> via, xterm s1

  11. I really learned much from that.Thank you very much!

  12. Can we consider two different system as nodes and try to ping them? Is this possible in miniedit ?

    • Hi Venkat,
      Yes. You can ping from one host to another. You can open an xterm on a host and use the Linux ping command to ping another host or you can use the Mininet ping or pingall commands in the Mininet console.

  13. Also, can we integrate miniedit with floodlight ?

  14. Thank you Brain. That was useful

  15. Hi Brian. How do I run a controller created in MiniEdit topology as an external Floodlight controller running in Eclipse IDE? Thanks in advance.

    • I don’t use the Eclipse IDE and I have not used the Floodlight controller so I cannot address that issue. Assuming that the Floodlight controller will still be reachable via an IP address when it is running in the Eclipse IDE, then you can use the same process described in this post to connect to a remote controller.

  16. Hello
    My name is Chris. I have done everything I instructed to do in this lab. I got to the stage where I have to open wireshark on h1 and tcp dump for h8 but when I tried to ping h1 and h8. It doesn’t work. What could be the problem?

    • Hello
      My name is Chris. I have done everyhing you instructed to do in this lab. I got to the stage where I have to open wireshark on h1 and tcp dump for h8 but when I tried to ping h1 and h8. It doesn’t work. What could be the problem?

      • Hi Chris,
        The most common mistake I make is not configuring the controller correctly. I suggest that you double-check that part of the procedure. Make sure the port number is different for each controller.

  17. Hi,
    I have written a script for the topology, can I view it in the miniedit?

    • Hi Anusha,

      Thank you for your question. MiniEdit cannot import custom topology scripts created to run in Mininet. We create Python topology scripts to run in Mininet (and MiniEdit can output scripts in Python). But, MiniEdit uses an JSON format to save a topology in a format it can read. These JSON files end with the “.mn” extension.

      While there appears to be a MiniEdit class (importTopo) that allows MiniEdit to import Mininet Python topology files, it is not documented and I could not get it to work.


  18. Hey Brian.
    Where can I find the python file in mininet that defines the default topology when “sudo mn” is run?
    Can we make changes to the default topology?
    I am running floodlight controller on eclipse IDE, in case I need to integrate the controller created on mininet with the floodlight controller, how do I do this?
    I tried mentioning the IP and port number of the floodlight controller but it shows stop the controller running on that port before running this topology.
    But I need to integrate the floodlight controller with the custom topology that I have created on mininet.
    How do I do this?

  19. Hi Brian,

    I had a doubt regarding the Switch (not legacy) in Miniedit. How can I assign different subnets to a switch. Are these switches Layer 3 switches?

    I actually wanted to implement a fat tree topology in Miniedit for about a 100 hosts and wanted 10 hosts in one subnets, which means that I need 10 different subnets. How do I do it.

    I would really appreciate your inputs.

    Much thanks!!

    • Hi Zenable,
      Switches are not IP devices so you cannot assign different IP subnets to ports on a switch. You would need to implement some code to create a virtual “router” using the SDN controller. Then assign hosts to the different subnets you want to manage. The SDN application you create would install flows on switches between hosts in the same subnet but would require any packets traveling between subnets to be forwarded to the controller, which would inspect the packet and, assuming it is allowed, install a flow between the two hosts in the two different subnets.
      So, you cannot do this with just Mininet. You will need to install a remote controller and write some code to implement this functionality.

      • HI Brian,

        Much Thanks for your previous reply. I have one more doubt.
        1) Below is the snippet while building a small topology in Miniedit. It says no netflow and sflow targets specified. Can you please throw some light on this issue.

        Getting Links.
        *** Configuring hosts
        h7 h6 h8 h2 h1 h3 h5 h4
        **** Starting 1 controllers
        **** Starting 8 switches
        s5 s3 s1 s9 s6 s7 s2 s4
        No NetFlow targets specified.
        No sFlow targets specified.

        2) Also regarding another scenario where we have a 3 layered topology with fanout of 8 at the edge switches. We have connected a controller to the top layer switches and have interconnected each and every switch in the topology. I wanted to know whether it is necessary to connect a controller to each and every switch in this case?

        • Hi Zena,

          1) Unless you performing experiments that include sFlow and NetFlow, you may ignore the lines complaining that “No NetFlow targets specified and No sFlow targets specified”. For more information, see:

          2) When you do not directly connect every switch to a controller, you are attempting to create an *in-band* connection between the other switches and the controller. This cannot be done in MiniEdit but you may create a Python script to do it. I suggest you export your MiniEdit topology as a “Level 2 script” and then modify it. Then you can run it as a program that sets up your Mininet scenario. See the following link to learn how to build an in-band controller into Mininet:


          • Hey Brian,

            Thanks a lot for your quick and apt comments and suggestions. I had another doubt.

            1) This is my current topology (Level 2 Script exported from Miniedit)



            info( ‘*** Add switches\n’)
            s3 = net.addSwitch(‘s3’, cls=OVSKernelSwitch)
            s1 = net.addSwitch(‘s1’, cls=OVSKernelSwitch)
            #s1.cmd(‘ovs-vsctl set bridge s1 stp-enable=true’)
            s4 = net.addSwitch(‘s4’, cls=OVSKernelSwitch)
            s2 = net.addSwitch(‘s2’, cls=OVSKernelSwitch)

            info( ‘*** Add hosts\n’)
            h2 = net.addHost(‘h2′, cls=Host, ip=’’, defaultRoute=None)
            h3 = net.addHost(‘h3′, cls=Host, ip=’’, defaultRoute=None)
            h4 = net.addHost(‘h4′, cls=Host, ip=’’, defaultRoute=None)
            h1 = net.addHost(‘h1′, cls=Host, ip=’’, defaultRoute=None)

            info( ‘*** Add links\n’)
            net.addLink(s1, s2)
            net.addLink(s1, s3)
            net.addLink(s2, s4)
            net.addLink(s3, h1)
            net.addLink(s3, h2)
            net.addLink(s4, h3)
            net.addLink(s4, h4)
            net.addLink(s1, s4)
            net.addLink(s2, s3)

            info( ‘*** Starting network\n’)
            info( ‘*** Starting controllers\n’)
            for controller in net.controllers:

            info( ‘*** Starting switches\n’)

            : Here I am unable to ping hosts. eg. h1 to h2 etc.
            But when I remove the links from s1 to s4 nd s2 to s3 I am able to ping the hosts.

            I assume the problem is due to loop formations. I came across few solutions. A) By running stp
            B) By using Networkx.

            But none of these worked for me. Can you guide me to use STP in such a scenario.

            Thanks again Brian!!


          • To allow loops in an SDN network, you need to have a controller (or a network application) that will check for loops. Please see my post about using POX components for an example of working with loops in the network.

  20. Annynonymous SDN Developer April 6, 2016 at 8:53 pm


    It was an amazing article! I have an existing custom topology that I would like to convert to mn topology – is it possible?

    Annynonymous SDN Developer

    • You may export a MiniEdit topology as a “level 2 script”, which can be run as a Python program.

      But you cannot open a python script in MiniEdit. It only works in one direction.


  21. Hi Brian,

    Which controller do we get in miniedit by default?
    Is it a POX controller or an OVS controller?
    If not POX, how do we make it a POX controller?



  22. Hi Brian
    what is your mininet version?
    i have a problem with miniedit, because my miniedit does not have a controller icon.
    could you help me?

  23. Hi Brian,

    Whenever I run the, I get the “No module named pox.core” error.
    I have tried to find solution online but have failed to do so. Please let me know if you can throw some light on this issue.


  24. Hi
    i want congestion control in mininet and pox controller.
    can you help me ?

  25. Hi Brian,

    Can you please post the command to run the python topology file (L2 script export) exported from MiniEdit.


  26. Jeremiah Kulanda April 25, 2016 at 4:44 am

    I am trying to set up a vpn network (ipsec over GRE tunnel) using ovswitches and a controller. Please can you direct me on how that can be done with mininet. I already know how to set up a regular loop free network using miniedit or mininet and pox controller. An example might be helpful in setting up vpn between two switches in a four switch network with hosts.

  27. I want to use the legacy router in custom topology. So, I take this part

    # Adding routers
    r1 = net.addHost(‘r1′, cls=Node, ip=’’)
    r2 = net.addHost(‘r2′, cls=Node, ip=’’)
    r1 = net.getNodeByName(‘r1’)
    r1.cmd(‘sysctl -w net.ipv4.ip_forward=1’)
    r2 = net.getNodeByName(‘r2’)
    r2.cmd(‘sysctl -w net.ipv4.ip_forward=1’)

    but when I check the connectivity between the sides of the router, it gives me
    mininet> h1 ping h4
    xterm: No absolute path found for shell: h1
    PING ( 56(84) bytes of data.
    From icmp_seq=1 Destination Host Unreachable
    From icmp_seq=2 Destination Host Unreachable

    what could be the problem?

  28. I created topology using MinieEdit and saved it *.py. when I came back and opened it, it gives me this error and didn’t open

    Exception in Tkinter callback
    Traceback (most recent call last):
    File “/usr/lib/python2.7/lib-tk/”, line 1489, in __call__
    return self.func(*args)
    File “./”, line 1431, in loadTopology
    loadedTopology = self.convertJsonUnicode(json.load(f))
    File “/usr/lib/python2.7/json/”, line 290, in load
    File “/usr/lib/python2.7/json/”, line 338, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded

  29. Hi Brain
    Thanks for providing such a nice tutorial.
    Is it possible to reduce the max number of flows in a switch as currently these are 1000000?
    If yes then how?


  30. Hi, anyone who can help me, i am new in this mininet software, i have assignment and i don’t know how to do that please help me, i have to design the network for small organization and plot the parameters like data rate etc using plot in minnet software. please give me the idea how to start and procedure to design that, as i even don’t know A, B, C of mininet.

  31. hello Brian,
    Thnks a lot for the suggestion …finally i cud solve the miniedit problem as i was not able to run it….Sir can v create frames and make it send by the hosts in miniedit…if yes kindly suggest how
    Thnks in advance

  32. Hi Brain,
    I have gone through the about all link and it was very helpful for me so i am able to work with mininet and opendaylight. Just i want to know miniedit of mininet and opendaylight will work together or not.

  33. Hi Brian,
    I tried to implement above Experiment with the network but i got some problem as
    there has been given that
    run a ping command to send traffic between host h1 and h8. On the MiniEdit console window, enter the following command:
    but i didn’t get mininet> i got mininet@mininet-vm:~# how can i resolve this problem , if i try to open new terminal and switch in mininet> using mn command all xterm h1,h2… closed. please help me if possible
    thank you in anticipation

    • Did you check the “start CLI” option box in the MiniEdit Preferences window?

      • Hi brain, thanks for reply. ya i checked start CLI option box in miniedit preferences window


        • Hi Brain , actually i got problem in opening xterm as
          mininet> xterm: cannot load font ‘-misc-fixed-medium-r-semicondensed–13-120-75-75-c-60-iso 10646-1’. If you have any solution then please help me.

  34. Hello Brian,
    How two host say h1 and h2 exchange messages between them without typing any command evrytyime,for example say h1 sent pcket p1 and in response to that h2 sent p2 and so on.Plz help if possible

  35. Hi Brain,

    I am currently using Mininet to create my custom topology,each of the hosts created have a default IP address assigned to them.By connecting mininet to OpenDaylight Controller i am able to see these hosts/switches there.
    My question is : I am trying to change these host IP addresses in ODL.But it does not allow me to do so as its pre-configured in mininet.Is there a way mininedit can help me solve this problem? Or a bash script which would be able to get into mininet and change its IP from the default?
    Please let me know .


  36. Hi Brian,

    I’m trying to set up an scenario only with routers which work with OSPF, Could it be possible? I can’t find the way to do it,

    Thanks in advance,

  37. When I run the mininet
    c0 Cannot find required executable controller.
    Please make sure that it is installed and available in your $PATH:
    What is the problem here

  38. Mudassar Hussain June 16, 2016 at 7:31 am

    Hi Brian,
    Please help me pls to resolve below issues.
    1. How can we set MAC address of switch in miniedit?
    2. How can we automate policy update in POX controller with loops?

    • 1. You cannot set the MAC of switch ports in MiniEdit. You may edit the script generated by MiniEdit and add the commands to set the MAc address.
      2. You will need to write your own POX component to automate policy updates.

      • Mudassar Hussain July 2, 2016 at 3:48 am

        Thanks Brian,
        1. I tried to edit both .mn and .py files but it didn’t work.
        2. I have added and delete flows manually in switch flow table by using below commands and it is working fine.
        Command: sudo ovs-ofctl add-flow s2 dl_type=0x0800,nw_src=,actions=drop
        sudo ovs-ofctl del-flows s2 dl_type=0x0800

        Now I want to automate the above flow addition and removal process via POX controller. Please help.

  39. Hi, Brian!!
    Please help me, I’m doing a network with 2 controllers but as I can see the specific configuration of each controller?

  40. Sonali Sen Baidya July 22, 2016 at 12:40 pm

    I am trying to ping my two hosts,but it is showing destination host not reachable.Whereas i have followed all the steps and all the steps are working properly.Can you tell me why?

  41. Sonali Sen Baidya July 22, 2016 at 4:38 pm

    Hi Brian,

    I found that the hosts under a different switch cannot be pinged by a host under another switch.Why is that so?Can you please help?

  42. Hi,

    i have created 3 switch topology where 3 hosts are connected to each switch ,i want to trunk those switches in python script.i know how to trunk them in CLI but unable to get the syntax in python please let me know the syntax in python …..

  43. Hi Brian, Thanks for this article. It really helped me lot. Actually I am working on DDOS attack prevention and mitigation. My scenario is 64 hosts connected to 4 switches and remote POX controller. But, I am confused. Before i was using two hosts say h1 and h2 from 64 hosts as attackers and h64 as web server in topology as victim. Now my proff. saying do attack from external hosts not from inside topology hosts. My question is:
    1) How do i connect external host as an attacker to switch say s1?
    2) For step 1 how to do i create external interface in openflow switch s1?
    3) On switch s1 using command s1 ifconfig -a showing all interfaces like s1-eth1, s1-eth2 etc. to which hosts are connected. eth0 is interface to which controller is connected i think and eth1 is interface of vm where mininet is running.
    Please help me out in this.I really appreciate.

Trackbacks and Pingbacks:

  1. Mininet Graphical Topology Creation – Mohit Ritolia - March 3, 2016

    […] This post is taken from Original link : […]

Leave a Reply

Text formatting is available via select HTML. <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>