mininet报错解决:Exception: Could not find a default OpenFlow controller和Cannot find required executable

早上在使用mininet的时候报错如下:

Traceback (most recent call last):
  File "simple.py", line 63, in myTest
    net=Mininet(MyTopo())
  File "/usr/lib/python2.7/dist-packages/mininet/net.py", line 172, in __init__
    self.build()
  File "/usr/lib/python2.7/dist-packages/mininet/net.py", line 442, in build
    self.buildFromTopo( self.topo )
  File "/usr/lib/python2.7/dist-packages/mininet/net.py", line 409, in buildFromTopo
    self.addController( 'c%d' % i, cls )
  File "/usr/lib/python2.7/dist-packages/mininet/net.py", line 261, in addController
    controller_new = controller( name, **params )
  File "/usr/lib/python2.7/dist-packages/mininet/node.py", line 1518, in DefaultController
    raise Exception( 'Could not find a default OpenFlow controller' )
Exception: Could not find a default OpenFlow controller

这个报错已经存在很久了,需要2步进行解决:

from mininet.node import OVSController
net = Mininet(topo = topo, controller = OVSController)

注意:如果你想另起一个控制器,那么只需要把OVSController换成RemoteController即可

然后会报错如下:

c0 Cannot find required executable ovs-controller.
Please make sure that it is installed and available in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games)

然后使用ln进行解决:

sudo apt-get install openvswitch-testcontroller
sudo ln /usr/bin/ovs-testcontroller /usr/bin/controller 

你可能感兴趣的:(行走的问题解决机,SDN)