= Mininet - Setup and usage = [http://yuba.stanford.edu/foswiki/bin/view/OpenFlow/Mininet Mininet], a SDN prototyping platform, is a great tool for proof-of-concept SDN experiments where you don't have physical SDN networks to experiment with, or when setup of actual hardware is too cumbersome. The following setup was built with two VMs on external3: 1. Make sure your machine is kvm enabled - e.g. `cpu-checker`'s `kvm-ok` command should return a response like this: {{{ # kvm-ok INFO: /dev/kvm exists KVM acceleration can be used }}} 2. Install kvm/qemu packages. {{{ # apt-get update # apt-get install qemu-kvm unzip }}} Install `kvm-pxe` if you get the following error: {{{ qemu: pci_add_option_rom: failed to find romfile "pxe-virtio.bin" }}} 3. fetch the mininet image. The current one can be downloaded from [http://www.openflow.org/downloads/OpenFlowTutorial-101311.zip here]. Unzipping the package should produce one file, !OpenFlowTutorial-disk1.vdi. 4. Launch qemu: {{{ qemu -m 512 -hda OpenFlowTutorial-disk1.vdi -net nic,model=virtio -net user,net=192.168.101.0/24,hostfwd=tcp::8022-:22 }}} Given that you have X11 forwarding enabled for your SSH session, a window should pop up and you should see the image boot. [[BR]] At this point you have the choice of logging in on that window, or via SSH as follows: {{{ ssh -Y -p 8022 openflow@localhost }}} Alternatively, you can convert the image into a qcow2 before running it via kvm: {{{ kvm-img convert -O qcow2 Mininet-VM.vmdk mininet.qcow2 }}} In either case, both user and password are ''openflow''. The link above does provide a fairly good primer on its usage.