Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Mininet: Emulating a network on your laptop (mininet.github.com)
137 points by xtacy on Feb 23, 2013 | hide | past | favorite | 32 comments


GNS3 is another tool for emulating a network. It is a graphical tool where you draw network diagrams, and nodes are emulated with Qemu/VirtualBox , Dynamips (Cisco hardware), or another emulator.


Seems like the major advantage of Mininet (vs GNS3) is that Mininet is based on light-weight virtualization, so that emulating large number of nodes should be more feasible. Of course the downside being that all the nodes are Linux-based


There is also Marionnet, that runs virtual nodes using User-Mode Linux.


Very very interesting. I had somehow not heard about OpenFlow before, which looks very promising (software + hardware based implementations), and network simulation is the easiest way to learn about all the tech. How does Mininet compare to GNS3?

Also, could you run virtualization software like Dynamips inside Mininet?


I have not tried Dynamips so I cannot comment much. But Mininet uses features in Linux: veth pairs, bridge, OpenVSwitch, etc. to glue together a network. If Dynamips works with the above components, it's highly likely to work with Mininet as well.


I read some documentation and I don't think I entirely get the whole "emulate a network" thing. What can be done with that? What exactly is a network? What this project makes me think of is as if one would replace the internet with another substitute internet or intranet, but I don't think thats the case. Something that it makes me think of is the idea of downloading a website with something like sitesucker and then changing your host file so that you can browse the internet via saved pages on your computer. But I don't think that this Mininet project has anything to do with that. I'm interested in trying to "get-it" if anyone has a clearer more non-obscure definition of what this project entails.


It emulates a network. You would use it to, for instance, test if your OpenFlow controller is reacting to appropriate traffic in the correct way, or (using netem and gang) to see what happens when you introduce delay or packet loss over some interface.

An existing use for this sort of thing is as a prototype environment for a software defined network. See 'Live Migration of an Entire Software Defined Network' for an example of use.


It can mean different things to different people.

If you're a distributed systems developer, you can use Mininet to create a topology and emulate the interaction of 100s of, say, bittorrent clients.

If you're a graduate student in networking, you can use Mininet to experiment with your new routing protocol and compare it against existing ones such as OSPF, BGP, etc.

You can also use it to put existing research papers to the test: http://reproducingnetworkresearch.wordpress.com


I really like the example you give and am starting to ge the academic usage. Thanks for this reply!


You're welcome. There's a Mininet AMI too if you want to get started quickly!


Could you also use it to load test a web app?


You wouldn't need a fake network to load test a web app, and you'd end up being CPU bound for a good load test (as in, the load tester would be CPU bound, obviously you want the app to become maxed in CPU usage). AWS is actually great for doing something like this.

The Chicago Tribune actually released a tool to do load testing with AWS instances: http://blog.apps.chicagotribune.com/2010/07/08/bees-with-mac...


When I was studying networking we used a network simulation tool called cnet[0], which has the nice property that it can do network simulation at different protocol layers as well as having different topologies. It can also simulate things like wide-area networks, noisy connections and so on.

Most of the assignments built around cnet were of the form of "Here is a network protocol that is half-completed. Write the transport layer", or "here is a fully completed network protocol that works with this topology. Now we introduce wireless nodes, modify the protocol to support wireless mobility".

[0] http://www.csse.uwa.edu.au/cnet/


At the TU Ilmenau we used OMNeT++ (http://www.omnetpp.org/) which had the benefit of having built-in classes for statistics collection and looking at graphs while the simulation ran - mininet doesn't seem to offer such functionality (yet?). But then it sometimes felt like omnet had too many layers of indirection and C++ was not everybodys language of choice.

Our assignments were similar, I remember doing stuff with link state and distance vector routing, implementing parts of a tcp state machine and others.


It depends what you're doing with networks. These tools are good for calculating statistics on large scale configs.

If you want a "real" network GNS3 is so much better.


It seems to be a good tool for teaching networking. Back in school we used to do that with VDN (which is still maintained http://opale.u-clermont1.fr/vdn/wiki/doku.php).


Yes, Mininet is used for networking courses in Stanford/Princeton. There are a number of programming assignments readily available for Mininet: https://github.com/mininet/mininet/wiki/Assignments


Wow reading through these assignments I'm blown away this is for a first year course. At this time in my first year half of the class couldn't handle an if statement. Wish I could of went to Stanford.


No worries! The Stanford undergraduate networking class was offered online last quarter. The videos are up here: http://networking.class.stanford.edu


Thanks. I'd found those but what I'm really interested in are the course assignments which only seem to be available for the actual course. The first two are the only ones I can't find right now


The first two programming assignments can be found here: http://www.scs.stanford.edu/10au-cs144/lab/reliable/reliable.... The 2012 assignments were the same.


Thanks your awesome :)


I've used this for classes at Stanford. We used it in conjunction with EC2 and it was very handy for creating specific topologies that could be accessed from anywhere.


Is this based on FreeBSD's dummynet? I use to use that a long time ago and it was really cool.

I was kind of sad when Linux didn't really have anything close to it.


No, but Mininet uses dummynet like features in Linux: netem [1], htb [2], etc.

[1] http://www.linuxfoundation.org/collaborate/workgroups/networ...

[2] http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm


I kind of want to use this to build a hacking game. You get to use real world tools to uncover bits of story scattered across a virtual network. You could even write little "agents" that run on the nodes that cause traffic to happen between nodes, or react to things happening on the network.


Uplink with real (virtualized) servers? Count me in!


Another cool project that Mininet uses to do some heavy lifting is this.

http://openvswitch.org/



how does this work under the hood? in particular, how are the hosts emulated? by separate processes?


Yes. Virtual hosts are in isolated containers with their own pid and network namespace. So each host can have its own routing table, IP address, etc. without interfering with one another.


Mininet doesn't actually use PID namespaces yet. They warn that the PID namespace and host filesystem are shared: https://github.com/mininet/mininet/wiki/Introduction-to-Mini...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: