急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗

我使用了ubuntu 18.04 的終端機建立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
急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗
第二個終端機是輸入:
sudo ./MiniNAM --custom topo.py --topo mytopo --controller remote
急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗
這是我的MiniNAM介面
急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗
當我要使用 CLI  `pingall`它沒辦法成功ping
急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗

接著,我也輸入了 xtrem h1 打開 h1 的終端機
我輸入了ping -c 4 10.0.0.2,但2台主機互不相通
急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗

所以,我用了google搜尋相關資訊。然後找到這個網站:
https://ting-kuan.blog/2018/04/04/%E3%80%90sdn-switch-flow-table-%E8%A8%AD%E5%AE%9A-%E4%BD%BF%E7%94%A8mininam-%E3%80%91/
當我使用他們的方法解決時,遇上一些問題,像我輸入了這個指令,則遇上Warning 的問題
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
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: " to save to a file.
急......Ubuntu 18.04 環境使用MIninet 和MiniNAM 執行pingall失敗
我不知道這問題要怎麼解決,希望你們可以幫到我
2019-08-05 13:07 發佈
這是因為你的網路拓樸中, h1 到 h2 的路由有二條,
所以你應該在 switch 上設定 flow entry,
s1 和 s3 各新增 6 筆,
s2 和 s4 各新增 2 筆,
然後, 在 s1 ~ s4 的 switch 設定單向路由, 看是要順時針或逆時針.

若不想一下子搞這麼麻煩, 可以先把 s1 和 s4 的 link 先切斷,
也就是把 self.addLink(s4,s1) 註解掉,
再執行以下指令測試是否會連通?

mn --custom ~/1.py --topo mytopo --test pingall

結果如附圖.

這是因為你的網路拓樸中, h1 到 h2 的路由有二條,
所以你應該在 switch 上設定 flow entry,
s1 和 s3 各新增 6 筆,
s2 和 s2 各新增 2 筆,
然後, 在 s1 ~ s4 的 switch 設定單向路由, 看是要順時針或逆時針.

若不想一下子搞這麼麻煩, 可以先把 s1 和 s4 的 link 先切斷,
也就是把 self.addLink(s4,s1) 註解掉,
再執行以下指令測試是否會連通?

mn --custom ~/1.py --topo mytopo --test pingall

結果如附圖.

fd5556 worte:
我使用了ubuntu...(恕刪)


這是因為你的網路拓樸中, h1 到 h2 的路由有二條,
所以你應該在 switch 上設定 flow entry,
s1 和 s3 各新增 6 筆,
s2 和 s2 各新增 2 筆,
然後, 在 s1 ~ s4 的 switch 設定單向路由, 看是要順時針或逆時針.

若不想一下子搞這麼麻煩, 可以先把 s1 和 s4 的 link 先切斷,
也就是把 self.addLink(s4,s1) 註解掉,
再執行以下指令測試是否會連通?

mn --custom ~/1.py --topo mytopo --test pingall

結果如附圖.
fd5556 worte:
我使用了ubuntu...(恕刪)


這是因為你的網路拓樸中, h1 到 h2 的路由有二條,
所以你應該在 switch 上設定 flow entry,
s1 和 s3 各新增 6 筆,
s2 和 s2 各新增 2 筆,
然後, 在 s1 ~ s4 的 switch 設定單向路由, 看是要順時針或逆時針.

若不想一下子搞這麼麻煩, 可以先把 s1 和 s4 的 link 先切斷,
也就是把 self.addLink(s4,s1) 註解掉,
再執行以下指令測試是否會連通?

mn --custom ~/1.py --topo mytopo --test pingall
pizaforever worte:
這是因為你的網路拓樸...(恕刪)


我想請問在switch 上設定 flow entry 要怎麼設定?因為我想要用這方式解決這問題
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?