Latest Version

This page contains most up-to-date information that describes how to install OFDPA 3.0 with ONL 2.x, please visit the child pages.


In this wiki page, we are going to show you how to setup the hardware switches for CORD Fabric.
Here we focus on QCT QuantaMesh BMS T3048-LY8 (8x10G + 6x40G) switches.
In principle, you could use other switch models (1G, 10G, 40G, 100G) in the fabric as long as they support the OF-DPA and ONL versions listed here.

Wire Up

Connect power cable, console port and management network.

C1. Install Open Networking Linux (ONL)

The switches are shipped with Open Networking Install Environment (ONIE) bootloader. After booting up, we should see the ONIE prompt from console.
Here we assume that the management port on the switch already has Internet access. (via DHCP)

Enter ONIE

Has ONL 2.x installed

It would be much more easier to reboot into ONIE if you have a previously installed ONL 2. Simply run

onl-onie-boot-mode install

Available ONIE modes are: {install,rescue,uninstall,update,embed,diag,none}
This can be helpful when you are in a normal ONL and want to upgrade your system. 

Install ONL

At the ONIE prompt, we need to get and install ONL. Depending on the switch model you are using, we need to use different installers from here:

For x86 based T3048-LY8, use ONL-2.0.0-ONL-OS-DEB8-2017-07-18.1642-40fc82b-AMD64-INSTALLED-INSTALLER

In the console, type

ONIE:/ # wget <installer-url>
ONIE:/ # sh <installer-filename>

to fetch and install the latest ONL.

The switch will automatically reboot into ONL after installation. Default login credential of ONL is: root/onl 

We might want to configure a fixed IP address for the management interface.
First edit /etc/network/interfaces and configure ma1, which is the management interface.

auto ma1
iface ma1 inet static

C2. Install OF-DPA package

Please download the OFDPA 3.0 release Debian package for x86 based LY8 switches from:


Copy the package to /mnt/onl/data

$ scp <QCT ofdpa software package>

Install the OF-DPA package.

# dpkg -i --force-overwrite /mnt/onl/data/<QCT ofdpa software package>

C3. (Optional) Switch Port Speed Config

The command client_drivshell can be used to configure the port speed.

Use the parameter ps <port number> to list the specific port speed or ps to list all port speed.

$ client_drivshell ps 
Calling ofdpaBcmCommand rpc with command = "ps 1 ".
                 ena/    speed/ link auto    STP                  lrn  inter   max  loop
           port  link    duplex scan neg?   state   pause  discrd ops   face frame  back
       xe0(  1)  down   10G  FD   SW  No   Forward         Untag    F    SFI  9412     

Returned from ofdpaBcmCommand rpc with rc = 0.

Then use the parameter port <port numbrt> sp=<port speed> to change the port speed.

# client_drivshell port xe0 sp=1000
Calling ofdpaBcmCommand rpc with command = "port xe0 sp=1000 ".

Returned from ofdpaBcmCommand rpc with rc = 0.
# client_drivshell ps 1
Calling ofdpaBcmCommand rpc with command = "ps 1 ".
                 ena/    speed/ link auto    STP                  lrn  inter   max  loop
           port  link    duplex scan neg?   state   pause  discrd ops   face frame  back
       xe0(  1)  down    1G  FD   SW  No   Forward         Untag    F   GMII  9412     

Returned from ofdpaBcmCommand rpc with rc = 0.

C4. Connect Switch to ONOS


Start OFDPA and OpenFlow agent

To start the OFDPA 3.0 and the Indigo agent, run

launcher ofagentapp -t <controller_ip> -i <dpid>

To run it in debug mode:

launcher ofagentapp -t <controller_ip> -i <dpid> -d4 -c1 -c2 -c3 -c4 -c5 -a1

To stop the agent, simply use "killall ofagentapp"

More ofagentapp options can be found by running "ofagentapp --help"

Start OFDPA and OpenFlow agent with listen option

An optional -l parameter can be added for switch to listen on specific IP:port. The switch will listen on given IP:port and allow us to use tools like ovs-ofctl or dpctl to connect and control the switch. 

launcher ofagentapp -t <controller_ip> -i <dpid> -l <ip>:<port>

To connect to the switch using ovs-ofctl, you can use commands such as 

ovs-ofctl -O OpenFlow13 show tcp:<ip>:<port>
ovs-ofctl -O OpenFlow13 dump-flows tcp:<ip>:<port>
ovs-ofctl -O OpenFlow13 dump-groups tcp:<ip>:<port>
ovs-ofctl -O OpenFlow13 add-flow tcp:<ip>:<port> table=60,priority=40000,eth_type=0x0800,ip_dst=,actions=controller

For more command, please see ovs-ofctl --help or the post OpenvSwitch ovs-ofctl and OF-DPA

C5. Config Network Interface on the Host

We need to configure the IP address and route on the host.

  1. Configure the IP address and subnet mask

    Make sure the IP address and the subnet mask on the fabric network interface of the host is consistent with the information in the Network Configuration host section. 
    For example, you can run

    ip addr add dev ma1

  2. Configure the default route

    Make sure you change the default route of the host to the interface IP of the leaf switch it connects to.
    For example, you can run

    ip route add default via

    In the case that you want to keep default route through the management network, you need to add routes to all other subnets in the network one by one.


After the setup is completed, you should be able to ping from one host to another.

Other Useful Information

ONL Boot Mode

OFDPA 2 offers two boot mode: INSTALLED and SWI.

In INSTALLED mode, ONL mounts the root filesystem from /dev/sdb7 which is a flash drive that persists everything even during a power cycle.
In SWI mode, ONL will load the root filesystem from a read-only image (*.swi) and put the modified files in an copy-on-write overlay filesystem. The change will not be persisted during a power cycle.
The pros and cons are obvious. INSTALLED mode is more convenient while SWI mode is more error-safe.

The boot mode will be determined by which image we used install ONL. We use the installed mode in this instruction for simplicity. But we can still change it after the installation. Here's the instruction:

mount /mnt/onl/boot -o remount,rw
sed -i 's/BOOTMODE=INSTALLED/BOOTMODE=SWI/g' /mnt/onl/boot/boot-config

Persistence mechanism

INSTALLED mode already persists everything for you. This section is mainly for SWI mode.

The mechanism to persist files on the switch is different from ONL 1.x to ONL 2.x. Following are the steps required to persist a file (e.g. OFDPA package) in ONL 2.x.

  1. Files put in /mnt/onl/data will be persisted automatically.
  2. To install a deb package during start-up, put the deb file under /mnt/onl/data/install-debs folder and create a plain text file /mnt/onl/data/install-debs/list with all the filename of the deb (e.g. ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb)
  3. To execute some command during start-up, put the command in /mnt/onl/data/rc.boot
# set static ip and route (dhcp by default)
echo 'ip addr add dev ma1' >> /mnt/onl/data/rc.boot
echo 'ip route add default via' >> /mnt/onl/data/rc.boot
# grant executable permission
chmod a+x /mnt/onl/data/rc.boot

See for more detail.

Build a customized ONL image

Sometimes we need to build our own ONL image from source to include some extra files. (The most common case is a modified /etc/network/interfaces)
The instruction of build process has already been well-documented in ONL repo But you might find it a little bit tricky to inject some extra files.
To do that, you need to put the files under $ONL_ROOT/builds/any/rootfs/jessie/common/overlay/ and then run the make command again.

Useful Commands

There are some useful commands under /usr/bin/