Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We describe how to configure, run, and test the OpenstackSwitching 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

How to run OpenstackNetworking application

  1. Configure OpenstackSwitching OpenstackNetworking application: network-cfg.json

    Code Block
    languagetext
    titlenetwork-cfg.json
    collapsetrue
    {
        "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.

    openstackswitching
    org.onosproject.cordvtn:cordvtn:nodes
    App fieldField nameDescription
    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


      
    do_not_push_flows

    "true": it does not push any flow rules to OVS and works as just the Openstack interface.

    "false": it pushes all flow rules to OVS
    neutron_server

    URL to the neutron server

    keystone_server
    URL to the keystone server for authentication
    org.onosproject.dhcp
    <all>Sample DHCP domain information. You do not touch it. They are just samples and not really used,  but we need at least one.
    cordvtn:nodes
    Descriptions of hosts. We need to setup information of all hosts we have setup, which are control node and two compute nodes.
    hostname
    description of the host
    ovsdbIpIP address of the host
    ovsdbPort
    OVSDB Port: 6640, which is set via "ovs-vsctl set-manager" command
    user_name and passwordthe user name and password for openstack
    bridgeId
    Datapath ID of the OVS switch in the host
    devicesDPIDDriver information to use for the devices. We defined a sona driver which uses OpenstackSwitching 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.

     

  2. Compile and install ONOS

    Code Block
    languagebash
    ~/onos$ mcis
    ~/onos$ onos-package
    ~/onos$ onos-install -f $OC1

    You need to set up you own cell information before you install the ONOS.

  3. Login to the ONOS CLI and activate OpenstackSwitching application

    Code Block
    languagetext
    onos> app activate org.onosproject.openstackswitchingopenstacknetworking
    Note

    If this is the first time to install OpenstackSwitching OpenstackNetworking application and vxlan bridge is not created yet, please follow the steps below before activating OpenstackSwitching application.

    Code Block
    languagetext
    onos> app activate org.onosproject.cordvtn
    onos> app deactivate org.onosproject.cordvtn

    The cordvtn application has the feature to detect the node configurations in network-cfg.json file and create vxlan and br-int bridges. For now, the feature is not integrated into OpenstackSwitching app yet and we need the cordvtn app until then. Once vxlan and br-int bridges are created, we do not need cordvtn application any more and please deactivate or even uninstall the app before activating the OpenstackSwitching How to set up environment before activating OpenstackNetworking application.

  4. You can see the three devices (control node and two compute nodes) from ONOS CLI, if everything has been configured successfully.

    Code Block
    languagetext
    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.116208, protocol=OF_13, driver=sona, name=of:0000000000000001, channelId=10.40.101.116208:6001951477
    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.176227, protocol=OF_13, driver=sona, name=of:0000000000000002, channelId=10.40.101.176227:3823036684
    id=of:0000000000000003, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.03.2, serial=None, managementAddress=10.40.101.156240, protocol=OF_13, channelId=10.40.101.156240:5909440002

    Also, you should be able to see that br-in int bridge and vxlan port have been created in all three nodes as below.

    Code Block
    languagebash
    $ 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}
  5. Now it is ready to GO!. Enjoy OpenstackSwitchingOpenstackNetworking!!

Tutorials

  1. Walkthrough 1: Basics

  2. Walkthrough 2: L3 ping test with a router

  3. Walkthrough 3: SSH to VMs using SSH key

  4. HA Test
  5. Security Group