通过ONOSFW项目让Neutron使用ONOS作为SDN控制器(by quqi99)

版权声明:本文为博主原创文章,如需转载,请注明出处! https://blog.csdn.net/quqi99/article/details/78577156

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明 (http://blog.csdn.net/quqi99)

安装ONOS

axel http://archive.apache.org/dist/karaf/3.0.2/apache-karaf-3.0.2.tar.gz
axel http://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz

export JAVA_HOME=/bak/java/jdk1.8.0_20
export KARAF_ROOT=/bak/java/apache-karaf-3.0.2
export PATH=$JAVA_HOME/bin:/bak/java/apache-maven-3.2.2/bin:$KARAF_ROOT/bin:/$PATH
export ONOS_ROOT=/bak/java/onos
export ONOS_USER=hua
export ONOS_GROUP=hua
source /bak/java/onos/tools/dev/bash_profile

git clone https://github.com/opennetworkinglab/onos.git
git checkout -b 1.0.0 1.0.0
cd onos && mvn clean install

配置ONOS

编辑文件$KARAF_ROOT/etc/org.apache.karaf.features.cfg
追加如下的内容到featuresRepositories:

mvn:org.onosproject/onos-features/1.0.0/xml/features

同时追加如下的内容到featuresBoot:

onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-gui

运行ONOS

cp ./tools/package/branding/target/onos-branding-1.0.0.jar ${KARAF_ROOT}/lib/
karaf clean

hua@node1:/bak/java/onos$ karaf clean
Welcome to Open Network Operating System (ONOS)!
     ____  _  ______  ____   
    / __ \/ |/ / __ \/ __/    
   / /_/ /    / /_/ /\ \       
   \____/_/|_/\____/___/      
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.
onos> feature:install onos-openflow

使用onos-package和onos-install远程运行ONOS

ONOS编译时产生的二进制jar包可以通过onos-package命令打包一个可发布的tar包,然后使用onos-install命令安装到远程机器上。但需要:

  • 一是确保在编译ONOS的机器上运行:
export
   ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-gui"
  • 二是在目标机器上也安装Java8和Maven,用于创建sdn用户并设置无密码使用sudo。

运行ONOSFW

ONOSFW项目使ONOS作为SDN控制器集成进OPNFV框架中,实现OpenStack利用ONOS进行虚拟网络资源管理。ONOSFW北向使用neutron驱动对接openstack,南向使用OVSDB对接openvswitch,VTN Resource Manager用于监听Neutron事件, VTN Manager然后下发配置和流表。ONOSFW支持L2,L3和SFC功能。
运行步骤为:
- 停掉网络节点和计算节点上所有的neutron-openvswitch-agent与neutron-l3-agent

ovs-vsctl del-manager
ovs-vsctl del-br br-int
ovs-vsctl del-br br-tun
  • 启动onos并交onos管理,加载feature及设置外部网卡
feature:install onos-openflow
feature:install onos-openflow-base
feature:install onos-app-vtn-onosfw
feature:install onos-ovsdatabase
feature:install onos-ovsdb-base
feature:install onos-drivers-ovsdb
feature:install onos-ovsdb-provider-host
externalportname-set -n eth1
  • 控制节点及计算节点设置onos作为ovs的SDN控制器
ovs-vsctl set-manager tcp:onos节点ip:6640

Reference

[1] https://wiki.onosproject.org/display/ONOS/Installing+and+Running+ONOS
[2] http://sdnhub.cn/index.php/installing-and-running-onos/
[3] http://www.sdnlab.com/17241.html
[4] http://www.sdnlab.com/17006.html
[5] http://www.sdnlab.com/17066.html
[6] https://github.com/openstack/networking-onos

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页