Setting up OpenDaylight

Getting Started with Napatech Link-Virtualization™ Software

Platform
Napatech SmartNIC
Content Type
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.4

OpenDaylight (ODL) is a lightweight orchestration system, that can take over control of OVS.

Before you begin

Make sure that you have:
  • A host OS with a desktop environment
  • Java 1.8 installed, for example dnf install openjdk
  • A JAVA_HOME environment path to the Java installation, for example JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.fc29.x86_64/jre/

About this task

Follow these steps to setup the system and verify the ability for ODL to program flows into OVS.

Procedure

  1. Setup OVS offload as described in OVS-DPDK Configuration Examples without starting the VM as described in Booting the VM
  2. Download OpenDaylight version 0.6.4-Carbon from the following link:
    https://nexus.opendaylight.org/content/repositories/public/org/
    opendaylight/integration/distribution-karaf/0.6.4-Carbon/
  3. Unpack the archive to distribution-karaf-0.6.4-Carbon:
  4. Run ODL:
     ./distribution-karaf-0.6.4-Carbon/bin/karaf
  5. In the ODL terminal install the following features:
    feature:install odl-dlux-core
    feature:install odl-dluxapps-nodes
    feature:install odl-dluxapps-applications
    feature:install odl-dluxapps-yangutils
    feature:install odl-restconf odl-l2switch-switch
    feature:install odl-l2switch-switch-rest
    feature:install odl-l2switch-all
  6. Reboot the system:
  7. Ensure that OVS-DPDK is running and create a bridge, br0:
    ovs-vsctrl add-br br0 -- set bridge br0 datapath_type=netdev
  8. Open a controller socket on the br0 bridge:
    ovs-vsctl set-controller br0 tcp:x.x.x.x:6633
    where x.x.x.x is the IP address of the server.
  9. Set the controller socket to utilize OpenFlow13 protocol:
    ovs-vsctl set bridge br0 protocols=OpenFlow13
  10. Add a port to the bridge:
    ovs-vsctl add-port br0 dpdk0 -- set interface dpdk0 type=dpdk options:dpdk-devargs=class=eth,mac=xx:xx:xx:xx:xx
    where mac=xx:xx:xx:xx:xx:xx is the MAC address of the physical port.
  11. Display the current flows:
    ovs-ofctl dump-flows br0 -O Openflow13
    Note: There are no flows related to the test IP 192.168.1.99
  12. Run ODL:
     ./distribution-karaf-0.6.4-Carbon/bin/karaf
  13. Verify the ODL to OVS connection:
    ovs-vsctl show
    
    Bridge "br0"
        Controller "tcp:x.x.x.x:6633"
            is_connected: true
    Note: is_connected: true should show on the bridge.
  14. Login to the web GUI from any browser with the default username admin and password admin:
    http://x.x.x.x:8181/index.html#/login
    where x.x.x.x is the IP address of the server.
    Note: The entire URL must be used.
  15. Go to the Nodes tab and note the Node Id:
    This is an example of a Node ID: openflow:59744028284
  16. Go to the Yang UI tab and click Custom API request:
  17. Insert the following link in the API path:
    http://x.x.x.x:8181/restconf/config/opendaylight-inventory:nodes/node/
    <Node ID>/flow-node-inventory:table/2/flow/1
    where:
    • x.x.x.x is the IP address of the server
    • NODE ID is the node id for example: openflow:59744028284
    For example:
    http://10.10.9.66:8181/restconf/config/opendaylight-inventory:nodes/node/
    openflow:59744028284/flow-node-inventory:table/2/flow/1
  18. Insert the following in the API data textbox:
    {
        "flow": [
            {
                "id": "1",
                "match": {
                    "ethernet-match": {
                        "ethernet-type": {
                            "type": "0x0800"
                        }
                    },
                    "ipv4-source": "192.168.1.99/32",
                    "ipv4-destination": "192.168.1.101/32"
                },
                "instructions": {
                    "instruction": [
                        {
                            "order": "0",
                            "apply-actions": {
                                "action": [
                                    {
                                        "order": "0",
                                        "drop-action": {}
                                    }
                                ]
                            }
                        }
                    ]
                },
                "priority": "25",
                "idle-timeout": "0",
                "hard-timeout": "0",
                "cookie": "10000000",
                "table_id": "2"
            }
        ]
    }
  19. Click Push config:
  20. Select PUT in the dropdown selector and click Send:
  21. Verify that the flow configuration is installed in OVS:
    ovs-ofctl dump-flows br0 -O Openflow13
    Expect the following result showing the programmed flow:
    cookie=0x989680, duration=4.168s, table=2, n_packets=0, n_bytes=0, priority=25,ip,nw_src=192.168.1.99,nw_dst=192.168.1.101 actions=drop
  22. In the web gui select DELETE from the dropdown selector and click send:
  23. Verify that the flow has been deleted:
    ovs-ofctl dump-flows br0 -O Openflow13

Results

The flow relating to nw_src=192.168.1.99 should no longer be found.