|
| string | gateway = '127.0.0.1' |
| |
| | netstat = subprocess.check_output(['netstat', '-rn']).split('\n') |
| |
| | net = Mininet( controller=RemoteController, switch=KildaSwitch, build=False ) |
| |
| | c0 = net.addController( 'c0', ip=gateway, port=6653) |
| |
| | s1 = net.addSwitch( 's1' ) |
| |
| | s2 = net.addSwitch( 's2' ) |
| |
| list | hosts1 = [ net.addHost( 'h%ds1' % n ) for n in ( 1, 2 ) ] |
| |
| list | hosts2 = [ net.addHost( 'h%ds2' % n ) for n in ( 1, 2 ) ] |
| |
| | p |
| |
| list | result = hosts1[0].cmd( 'ping -c1 %s' % (hosts1[1].IP()) ) |
| |
| list | lines = result.split("\n") |
| |