4 This example shows how to create an empty Mininet object
5 (without a topology object) and add nodes to it manually.
8 from mininet.net import Mininet
9 from mininet.node import Controller
10 from mininet.cli import CLI
11 from mininet.log import setLogLevel, info
15 "Create an empty network and add nodes to it."
17 net = Mininet( controller=Controller )
19 info( '*** Adding controller\n' )
20 net.addController( 'c0' )
22 info( '*** Adding hosts\n' )
23 h1 = net.addHost( 'h1', ip='10.0.0.1' )
24 h2 = net.addHost( 'h2', ip='10.0.0.2' )
26 info( '*** Adding switch\n' )
27 s3 = net.addSwitch( 's3' )
29 info( '*** Creating links\n' )
33 info( '*** Starting network\n')
36 info( '*** Running CLI\n' )
39 info( '*** Stopping network' )
42 if __name__ == '__main__':