【问题标题】:How to connect Opendaylight to Mininet?如何将 Opendaylight 连接到 Mininet?
【发布时间】:2018-01-17 09:13:10
【问题描述】:

我一直在从事一个简单的 Hello World 项目来学习 Opendaylight 的基础知识(我关注的是 tutorial)。

现在我想将此版本的控制器连接到 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

这很奇怪,因为我下载了 Carbon 版本,我可以将这个发行版与 Mininet 连接起来,并且它工作正常。最初我打算在最新的发行版 Carbon 中构建 hello 项目,但它不起作用,所以我在 Boron 版本中做了 Hello-World。

谁能帮帮我?

这是我的Github repository

【问题讨论】:

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

标签: java maven karaf mininet opendaylight


【解决方案1】:

按照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=opendaylight.snapshot Archetype-Version=1.4.0-SNAPSHOT
  • 对于 Carbon 快照,使用 Snapshot-Type=opendaylight.release Archetype-Version=1.3.0-Carbon
  • 对于 Boron “SR0”,使用 Snapshot-Type=opendaylight.release Archetype-Version=1.2.0-Boron
  • 对于 Boron SR1,使用 Snapshot-Type=opendaylight.release Archetype-Version=1.2.1-Boron-SR1
  • 对于 Boron SR2,使用 Snapshot-Type=opendaylight.release Archetype-Version=1.2.2-Boron-SR2
  • 对于 Boron 快照,使用 Snapshot-Type=opendaylight.snapshot Archetype-Version=1.2.2-SNAPSHOT

您使用的命令使用 1.2.2-Boron-SR2 作为 ,但正如您使用 public 一样,这是不合适的。如以上链接所示,将public 替换为opendaylight.release

【讨论】:

  • 很高兴我能帮上忙!如果可能的话,如果你支持我的回答,我也会很高兴:)
【解决方案2】:

当您运行 ODL 发行版时,您拥有所有可以随时安装的 ODL 项目。要连接 mininet,您必须安装 odl-l2switch-all 功能。

在简单的 Hello 项目中,您不需要安装 l2switch 功能。这就是您无法连接的原因。无论如何,您可以通过在 Features/pom.xml 和 features.xml 中添加 l2switch 依赖项来安装 l2switch 功能。您必须添加相同的 odl 版本的 l2switch。注意这一点。

请检查功能:列表 | grep "l2switch" 是否可用。如果是这样,安装它并启动 mininet !你现在完成了!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多