ovs-vsctl error while Streaming Video in Mininet

56 views Asked by At

I am recently studying Mininet.And I watched a video about "How to Streaming Video in Mininet" this is its python code

def myNetwork():

    "Create a network."
    net = Mininet( topo=None, build=False )

    info('*** Adding Controller\n')
    net.addController(name='c0')

    print( "*** Add Access Points\n")
    s1=net.addSwitch('s1')
    # Intf('eth0',node=s1) # Some Problem 

    info('*** Add hosts\n')
    h1 = net.addHost('h1',ip='10.0.0.1')
    h2 = net.addHost('h2',ip='10.0.0.2')

    info('*** Add links\n')
    net.addLink(h1,s1,cls=TCLink,bw=10,delay='1ms',loss=0)
    net.addLink(h2,s1,cls=TCLink,bw=10,delay='1ms',loss=50)
    
    print ("*** Starting network")
    net.start()

    os.popen('ovs-vsctl add-port s1 eth0')
    h1.cmdPrint('dhclient '+h1.defaultIntf().name)
    h2.cmdPrint('dhclient '+h2.defaultIntf().name)
    CLI(net)
    net.stop()

if __name__ == '__main__':
    setLogLevel( 'info' )
    myNetwork()

after running this code , the bug ocuurs as below: *** h1 : ('dhclient h1-eth0',) ovs-vsctl: Error detected while setting up 'eth0'. See ovs-vswitchd log for details How can I fix this

Why the error occurs and how can I fix this error to make it works

0

There are 0 answers