繁体   English   中英

找不到所需的可执行文件ovs-controller:Mininet

[英]Cannot find required executable ovs-controller : Mininet

sudo python Topology.py 
N = 6
*** Creating network
*** Adding controller
*** Adding hosts:
a b c d e u 
*** Adding switches:
s1 s2 
*** Adding links:
(5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(a, s1) (5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(b, s1) (5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(c, s2) (5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(d, s2) (5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(5.00Mbit 3ms delay 2% loss) *** Error: RTNETLINK answers: No such file or directory
(e, s1) Traceback (most recent call last):
  File "Topology.py", line 45, in <module>
    perfTest()
  File "Topology.py", line 33, in perfTest
    net = Mininet(topo=topo,host=CPULimitedHost,link=TCLink,controller=OVSController)
  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 429, in buildFromTopo
    self.addLink( **params )
  File "/usr/lib/python2.7/dist-packages/mininet/net.py", line 364, in addLink
    link = cls( node1, node2, **options )
  File "/usr/lib/python2.7/dist-packages/mininet/link.py", line 534, in __init__
    params2=params )
  File "/usr/lib/python2.7/dist-packages/mininet/link.py", line 424, in __init__
    node1, node2, deleteIntfs=False )
  File "/usr/lib/python2.7/dist-packages/mininet/link.py", line 468, in makeIntfPair
    deleteIntfs=deleteIntfs )
  File "/usr/lib/python2.7/dist-packages/mininet/util.py", line 194, in makeIntfPair
    ( intf1, intf2, cmdOutput ) )
Exception: Error creating interface pair (s1-eth4,s2-eth4): RTNETLINK answers: File exists

这是我运行实现mininet的python程序时得到的错误。 我发现了一个关于同一问题的话题,但是没有一种方法适合我。

这是我的代码:

#! /usr/bin/python

from mininet.topo import Topo
from mininet.net import Mininet
from mininet.util import dumpNodeConnections
from mininet.log import setLogLevel
from mininet.node import OVSController,CPULimitedHost
from mininet.link import TCLink
from mininet.cli import CLI

class SingleSwitchTopo(Topo):
    "Single switch connected to n hosts"
    def build(self,n=2):
        print('N = %s' %(n))
        switch_1 = self.addSwitch('s1')
        switch_2 = self.addSwitch('s2')
        host=self.addHost('a')
        self.addLink(host,switch_1,bw=5,delay='3ms',loss=2,max_queue_size=300)
        host=self.addHost('b')
        self.addLink(host,switch_1,bw=5,delay='3ms',loss=2,max_queue_size=300)
        host=self.addHost('e')
        self.addLink(host,switch_1,bw=5,delay='3ms',loss=2,max_queue_size=300)
        host=self.addHost('c')
        self.addLink(host,switch_2,bw=5,delay='3ms',loss=2,max_queue_size=300)
        host=self.addHost('d')
        self.addLink(host,switch_2,bw=5,delay='3ms',loss=2,max_queue_size=300)
        host=self.addHost('u')
        self.addLink(host,switch_2,bw=5,delay='3ms',loss=2,max_queue_size=300)
        self.addLink(switch_1,switch_2,bw=15,delay='2ms')

def perfTest():
    topo = SingleSwitchTopo(6)
    net = Mininet(topo=topo,host=CPULimitedHost,link=TCLink,controller=OVSController)
    net.start()
    print "Dumping the Node Information"
    dumpNodeConnections(net.hosts)
    print "Testing the network connectivity"
    net.pingAll()
    CLI(net)
    net.stop()

if __name__ == '__main__':
    #Start mininet using perfTest Function
    setLogLevel('info')
    perfTest()

我正在尝试通过2台交换机添加6台主机。 为此有什么工作吗?

与该问题相关的类似线程: Mininet无法找到所需的可执行控制器

尝试一切都是上述线程。 什么都没有为我工作。

您的问题取决于单开关拓扑。

当您通过perfTest调用函数时,尝试传递6

class SingleSwitchTopo(Topo):
  "Single switch connected to n hosts."
  def __init__(self, n=2, **opts):
    Topo.__init__(self, **opts)
    switch = self.addSwitch('s1')
    for h in range(n):
      host = self.addHost('h%s' % (h + 1))
      self.addLink(host, switch) 

如果问题仍然存在,请尝试使用像pox( pox )这样的控制器来配置代码

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM