我正在尝试创建mininet,但遇到了ping问题

时间:2019-08-05 04:34:33

标签: python-2.7 ubuntu-18.04 sdn mininet ryu

我正在尝试做mininet环境和MiniNAM环境

这是我的python代码:

from mininet.topo import Topo

class MyTopo( Topo ):
"Simple topology example."

def __init__( self ):
    "Create custom topo."

    # Initialize topology
    Topo.__init__( self )

    # Add hosts and switches

    s1 = self.addSwitch( 's1' )
    s2 = self.addSwitch( 's2' )
    s3 = self.addSwitch( 's3' )
    s4 = self.addSwitch( 's4' )

    h1 = self.addHost( 'h1' )
    h2 = self.addHost( 'h2' )

    # Add links
    self.addLink(s1,s2)
    self.addLink(s2,s3)
    self.addLink(s3,s4)
    self.addLink(s4,s1)

    self.addLink(s1,h1)
    self.addLink(s3,h2)

topos = { 'mytopo': ( lambda: MyTopo() ) }

然后,我使用2个终端来运行该程序。 输入第一个端子:

ryu-manager ryu.app.simple_switch_13

ryu-manager ryu.app.simple_switch_13

第二个终端输入:

sudo ./MiniNAM --custom topo.py --topo mytopo --controller remote

sudo ./MiniNAM --custom topo.py --topo mytopo --controller remote

这是我的MiniNAM界面 MiniNAM Interface

当我想使用CLI来pingall时,失败了。

pingall failed

然后,我也输入xtrem h1h1终端一样打开。 我输入了ping -c 4 10.0.0.2,但无法访问。

因此,我用google搜索了更多信息。我发现有关MiniNAM的教学网页。当我使用curl -X POST -d '{"dpid":"0000000000000004","priority":"100","actions":[{"type":"OUTPUT","port":2}],"match":{"in_port":1}}' http://127.0.0.1:6653/status/flowentry/add之类的方法时,我收到一些警告,以下警告为:

Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.

Warning code

我不知道该怎么解决。希望您能帮助我解决这个问题。谢谢

0 个答案:

没有答案