We describe how to configure, run, and test the OpenstackNetworking application. If you did not set up your environment including openstack and onos, you must set up your environment following the page: How to set up environment from scratch. Also, if you are NOT familiar with how to execute ONOS, we strongly recommend to go though ONOS Tutorial page: Tutorials and Walkthroughs
Configure OpenstackNetworking application: network-cfg.json
{ "apps" : { "org.onosproject.openstackrouting" : { "openstackrouting" : { "physicalRouterMac" : "86:1e:e1:b1:85:bd", "gatewayBridgeId" : "of:0000000000000003", "gatewayExternalInterfaceName" : "veth0", "gatewayExternalInterfaceMac" : "d2:b3:eb:36:bd:ae" } }, "org.onosproject.openstacknode" : { "openstacknode" : { "nodes" : [ { "hostname" : "compute-01", "ovsdbIp" : "10.40.101.208", "ovsdbPort" : "6640", "bridgeId" : "of:0000000000000001", "openstackNodeType" : "COMPUTENODE" }, { "hostname" : "compute-02", "ovsdbIp" : "10.40.101.227", "ovsdbPort" : "6640", "bridgeId" : "of:0000000000000002", "openstackNodeType" : "COMPUTENODE" }, { "hostname" : "network", "ovsdbIp" : "10.40.101.240", "ovsdbPort" : "6640", "bridgeId" : "of:0000000000000003", "openstackNodeType" : "GATEWAYNODE", "gatewayExternalInterfaceName" : "veth0", "gatewayExternalInterfaceMac" : "d2:b3:eb:36:bd:ae" } ] } }, "org.onosproject.openstackinterface" : { "openstackinterface" : { "neutron_server" : "http://10.40.101.209:9696/v2.0/", "keystone_server" : "http://10.40.101.209:5000/v2.0/", "user_name" : "admin", "password" : "nova" } } }, "devices" : { "of:0000000000000001" : { "basic" : { "driver" : "sona" } }, "of:0000000000000002" : { "basic" : { "driver" : "sona" } } } } |
We need to configure the OpenstackSwitching application using the standard ONOS Network Configuration framework, network-cfg.json file.
App field | Field name | Description |
---|---|---|
org.onosproject.openstackrouting | physicalRouterMac | MAC address of the physical router |
gatewayBridgeId | DPID of the gateway node | |
gatewayExternalInterfaceName | interface name of the external network in gateway node | |
gatewayExternalInterfaceMac | MAC address of external network interface in gateway node | |
org.onosproject.openstacknode | openstacknode | node information for setting up OVS : explained in "How to set up environment" page |
org.onosproject.openstackinterface | ||
neutron_server | URL to the neutron server | |
keystone_server | URL to the keystone server for authentication | |
user_name and password | the user name and password for openstack | |
devices | DPID | Driver information to use for the devices. We defined a sona driver which uses Openstack pipeline for OVS switches. The specific information of sona driver is defined in onos-drivers.xml. Please note that we need to use sona driver only for compute nodes NOT the gateway node |
Copy the network-cfg.json file to ~/onos/tools/package/config. If you updated or just copied the file, then you need to compile the onos again to distribute the network-json file.
Compile and install ONOS
~/onos$ mcis ~/onos$ onos-package ~/onos$ onos-install -f $OC1 |
You need to set up you own cell information before you install the ONOS.
Login to the ONOS CLI and activate OpenstackSwitching application
onos> app activate org.onosproject.openstackinterface onos> app activate org.onosproject.openstacknetworking |
If this is the first time to install OpenstackNetworking application and vxlan bridge is not created yet, please follow the How to set up environment before activating OpenstackNetworking application. |
You can see the three devices (control node and two compute nodes) from ONOS CLI, if everything has been configured successfully.
app activate org.onosproject.onos> devices id=of:0000000000000001, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.3.2, serial=None, managementAddress=10.40.101.208, protocol=OF_13, driver=sona, name=of:0000000000000001, channelId=10.40.101.208:51477 id=of:0000000000000002, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.3.2, serial=None, managementAddress=10.40.101.227, protocol=OF_13, driver=sona, name=of:0000000000000002, channelId=10.40.101.227:36684 id=of:0000000000000003, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.3.2, serial=None, managementAddress=10.40.101.240, protocol=OF_13, channelId=10.40.101.240:40002 |
Also, you should be able to see that br-int bridge and vxlan port have been created in all three nodes as below.
$ sudo ovs-vsctl show 1265d109-8a0a-40d5-bfee-f8ee9c7438c1 Manager "ptcp:6640" is_connected: true Bridge br-int Controller "tcp:10.40.101.153:6653" is_connected: true fail_mode: secure Port br-int Interface br-int Port vxlan Interface vxlan type: vxlan options: {key=flow, remote_ip=flow} |