コード例 #1
0
#		intf.link.intf1 = None

l2 = Link(s2,h0,s2.newPort(),0)

h0.setIP( '10.1.0.1/16' )
h0.setMAC(temp.mac)
h0.intfList()[0].mac = temp.mac
h0.intfList()[0].ip = temp.ip

print s2.cmd('ovs-vsctl add-port s2 s2-eth3')
print '**********'
print h0.cmd('ifconfig')

dumpNodeConnections([s0,s1,s2,s3,h0,h1,h2,h3])
#output('%s\n' % repr(h0))
#makeTerms([s2],'xterm')

string = raw_input()
while string != 'exit':
    string = raw_input()

s0.stop()
s1.stop()
s2.stop()
s3.stop()

c0.stop() 
c1.stop()
c2.stop()
c3.stop()
コード例 #2
0
#		intf.link.intf1 = None

l2 = Link(s2, h0, s2.newPort(), 0)

h0.setIP('10.1.0.1/16')
h0.setMAC(temp.mac)
h0.intfList()[0].mac = temp.mac
h0.intfList()[0].ip = temp.ip

print s2.cmd('ovs-vsctl add-port s2 s2-eth3')
print '**********'
print h0.cmd('ifconfig')

dumpNodeConnections([s0, s1, s2, s3, h0, h1, h2, h3])
#output('%s\n' % repr(h0))
#makeTerms([s2],'xterm')

string = raw_input()
while string != 'exit':
    string = raw_input()

s0.stop()
s1.stop()
s2.stop()
s3.stop()

c0.stop()
c1.stop()
c2.stop()
c3.stop()