0

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

  • Please add the code right in stack overflow. No need for an image – GRASBOCK Nov 30 '22 at 11:33
  • The code example you provided does not stream any video. Why would you need to stream video in the first place and what are you trying to achieve with the example you gave? It is not intuitive as you ask about one thing and then show a different thing in your example – Misho Janev Feb 07 '23 at 13:01

0 Answers0