2017-08-09 77 views
1

我一直在一個簡單的Hello World項目中學習Opendaylight的基礎知識(我正在關注這個tutorial)。如何將Opendaylight連接到Mininet?

現在我想將控制器的這個版本連接到由Mininet定義的網絡拓撲結構,但這不起作用。我讀到這可能是由於我沒有安裝odl-l2switch,但是當我鍵入feature:list --installed時,該捆綁包不會出現,並且當我輸入feature:install odl-l2switch時,它也不會出現。

也許是因爲我的方式創建的項目:

mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=https://nexus.opendaylight.org/content/repositories/public/ -DarchetypeCatalog=remote -DarchetypeVersion=1.2.2-Boron-SR2

這很奇怪,因爲我下載的碳釋放,我可以用Mininet連接這個分佈和它的工作。最初,我打算在最新的發行版Carbon中構建hello項目,但它不起作用,所以我在Boron發行版中做了Hello-World。

任何人都可以幫助我嗎?

這是我Github repository

+0

您需要在features.xml和pom.xml中引用所有必需的功能(如l2-swotch) – rkosegi

回答

3

this link,生成ODL應用程序的命令是:

mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller 
-DarchetypeArtifactId=opendaylight-startup-archetype \ 
-DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/<Snapshot-Type>/ \ 
-DarchetypeCatalog=remote -DarchetypeVersion=<Archetype-Version> 

,你必須替換如下正確和:

  • 對於當前的Master(Carbon)使用Snapshot-Type = opendaylig ht.snapshot原型-版本= 1.4.0-SNAPSHOT
  • 用於碳快照使用快照類型= opendaylight.release原型-版本= 1.3.0 - 碳
  • 硼 「SR0」 使用快照型= opendaylight.release原型-版本= 1.2.0硼
  • 硼SR1使用快照類型= opendaylight.release原型-版本= 1.2.1硼SR1
  • 硼SR2使用快照類型= opendaylight.release原型-版本= 1.2.2硼-SR2
  • 對於硼快照使用快照類型= opendaylight.snapshot原型-版本= 1.2 1,2-快照

使用該命令使用1.2.2硼SR2但你用public,這是不是合適。如上面的鏈接所示,將public替換爲opendaylight.release

+0

很高興我幫忙!如果可能的話,如果你提高了我的答案,也會很高興:) – Marievi

0

當您運行ODL分配時,您可以隨時安裝所有ODL項目。要與mininet連接,您必須安裝odl-l2switch-all功能。

在簡單的Hello項目中,您不需要安裝l2switch功能。這就是爲什麼你無法連接。無論如何,您可以通過在Features/pom.xml和features.xml中添加l2switch依賴項來安裝l2switch功能。您必須添加相同的ods版本的l2switch。請小心。

請檢查功能:列表| grep「l2switch」可用或不可用。如果是這樣,請安裝並啓動mininet!你現在完成了!