Skip to content

Instantly share code, notes, and snippets.

@arwankhoiruddin
Created February 28, 2018 05:41
Show Gist options
  • Save arwankhoiruddin/4c197d9aa7e999dd4a62b41a6b180505 to your computer and use it in GitHub Desktop.
Save arwankhoiruddin/4c197d9aa7e999dd4a62b41a6b180505 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
from mininet.cli import CLI
from mininet.net import Mininet
net = Mininet()
h1 = net.addHost('h1')
h2 = net.addHost('h2')
s1 = net.addSwitch('s1')
c0 = net.addController('c0')
net.addLink(h1, s1)
net.addLink(h2, s1)
net.start()
CLI(net)
net.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment