This is an archive of the ONOS 1.4 wiki. For the current ONOS wiki, look here.

We describe how to configure, run, and test the OpenstackSwitching 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 familiar with how to execute ONOS, we strongly recommend to go though ONOS Tutorial page: Tutorials and Walkthroughs

How to run OpenstackSwitching application

  1. Remove br-int bridge on the Contorl node

    $ sudo ovs-vsctl del-br br-int

    The process will be unnecessary very soon.

  2. Configure OpenstackSwitching application: network-cfg.json

    network-cfg.json
    {
        "apps" : {
            "org.onosproject.openstackswitching" : {
                "openstackswitching" : {
                     "do_not_push_flows" : "false",
                     "neutron_server" : "http://OPENSTACK_CONROL_NODE_IP:9696/v2.0/",
                     "keystone_server" : "http://OPENSTACK_CONROL_NODE_IP:5000/v2.0/",
                     "user_name" : "admin",
                     "password" : "nova"
                 }
            },
            "org.onosproject.dhcp" : {
                "dhcp" : {
                "ip": "10.0.0.1",
                "mac": "1a:2b:3c:4e:5e:6f",
                "subnet": "255.0.0.0",
                "broadcast": "10.255.255.255",
                "router": "10.0.0.1",
                "domain": "10.0.0.1",
                "ttl": "63",
                "lease": "300",
                "renew": "150",
                "rebind": "200",
                "delay": "3",
                "timeout": "150",
                "startip": "10.0.0.110",
                "endip": "10.0.0.130"
              }
            },
            "org.onosproject.cordvtn" : {
                "cordvtn" : {
                    "nodes" : [
                        {
                            "hostname" : "compute-01",
                            "ovsdbIp" : "COMPUTE_NODE_IP",
                            "ovsdbPort" : "6640",
                            "bridgeId" : "of:0000000000000001"
                         },
                         {
                            "hostname" : "compute-02",
                            "ovsdbIp" : "COMPUTE_NODE_IP",
                            "ovsdbPort" : "6640",
                            "bridgeId" : "of:0000000000000002"
                         },
                         {
                             "hostname" : "network",
                             "ovsdbIp" : "OPENSTACK_CONTROL_NODE_IP",
                             "ovsdbPort" : "6640",
                             "bridgeId" : "of:0000000000000003"
                         }
                    ]
                }
            }
        },
        "devices" : {
            "of:0000000000000001" : {
                "basic" : {
                    "driver" : "sona"
                }
            },
            "of:0000000000000002" : {
                "basic" : {
                    "driver" : "sona"
                }
            },
            "of:0000000000000003" : {
                "basic" : {
                    "driver" : "sona"
                }
            }
        }
    }

    We need to configure the OpenstackSwitching application using the standard ONOS Network Configuration framework, network-cfg.json file.

    App fieldField nameDescription
    org.onosproject.openstackswitching


    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.
    org.onosproject.cordvtn:cordvtn:nodes



    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
    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 pipeline for OVS switches.
    The specific information of sona driver is defined in onos-drivers.xml.

    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.

  3. 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.

  4. Login to the ONOS CLI and activate OpenstackSwitching application

    onos> app activate org.onosproject.openstackswitching

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

    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 application.

  5. 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.116, protocol=OF_13, channelId=10.40.101.116:60019
    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.176, protocol=OF_13, channelId=10.40.101.176:38230
    id=of:0000000000000003, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.2, serial=None, managementAddress=10.40.101.156, protocol=OF_13, channelId=10.40.101.156:59094

    Also, you should be able to see that br-in 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}
  6. Now it is ready to GO!. Enjoy OpenstackSwitching!!

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

 

  • No labels