OpenFlow Data Plane Abstraction (OF-DPA) API Guide and Reference Manual
OF-DPA Configuration

CPqD dpctl Configuration

dpctl is a command line utility from CPqD that mimics a Controller and installs flows in an OpenFlow aware switch.

Scenario A

Add VLAN Flow Table entries

The above configuration will add ports 1, 2 and 5 in VLAN 10.

Note: dpctl does not support VLAN mask. VLAN mask should be passed as 0x1fff by the Ryu Controller if configuring VLAN Id.

Create two L2 Interface Groups

Create an L2 interface group on interface 3 and VLAN 11

Create an L2 interface group on interface 4 and VLAN 11

Create a Termination MAC Flow table entry to route the ingress traffic

Create two L3 Unicast Groups with reference to the above created L2 Interface groups

This creates an L3 Unicast group with group Id 0x20000001. This group defines an action which sends a tagged packet out on port 3 with VLAN 11 and the configured destination and source MAC.

This creates an L3 Unicast group with group Id 0x20000002. This group defines an action which sends a tagged packet out on port 4 with VLAN 11 and the configured destination and source MAC.

Create an ECMP Group and add the above created Unicast Groups into it

This creates an ECMP group with group Id 0x70000001 with two next hops in the group.

Create a Unicast Routing Flow table entry

This creates a Unicast Routing Flow entry that matches IPv4 packets (ether type 0x800) with destination IP subnet 192.168.5.0 and routes the packets to the ECMP next hop group 0x70000001.

Scenario B

All the configuration of scenario A is required.

On top of it create a ACL Policy Flow table entry

This creates an ACL Policy Flow table entry that matches incoming traffic on the given parameters and routes it to the next hop implemented by the L3 Unicast group Id 0x20000001. This routes the packets destined to IP 192.168.5.1 out of port 3.

Ryu Configuration

Scenario A

cd <ofdpa-te.py directory>
Open file conf/ofdpa-te.json
Ensure that it contains:

{
"config_directory":"conf"
"#working_directory":"scenarioA.json"
"#working_directory":"scenarioB.json"
"#working_directory":"AddACL.json"
"#working_directory":"DelACL.json"
}

Remove leading hash symbol from string which contains scenarioA.json.
Save changes and close file.
Open file conf/scenarioA.json
Ensure that it contains:

{
[
"te_add_vlan_1.json",
"te_add_vlan_2.json",
"te_add_vlan_5.json",
"te_add_group_l2_0xb003.json",
"te_add_group_l2_0xb003.json",
"te_add_termination_mac.json"
"te_add_group_l3_0x20000001_.json",
"te_add_group_l3_0x20000001.json",
"te_add_ecmp.json",
"te_add_ucast_routing.json"
]
}

Examples of JSON files are located in Appendix A
Close file.
Run OF-DPA agent:
ofagentapp --controller=<IP>:6633 [-a 0|1|2|3] &
( -a is a loglevel)
Run RC
ryu-manager ofdpa-te.py [–verbose]
To stop RC press Ctrl-C

Scenario B

The same as ScenarioA, but in conf/ofdpa-te.json should uncomment line which contains scenarioB.json
Content of scenarioB.json the same as scenarioA.json except additional line at the end:
te_add_acl.json

Add ACL

Adds the ACL rule.
This allows to perform scenario B without cleaning ScenarioA configuration.

{
[
"te_add_acl.json"
]
}

Del ACL

Deletes the ACL rule.
This allows to return to scenarioB from scenarioA configuration.

{
[
"te_del_acl.json"
]
}

OpenDaylight Configuration

Scenario A

Scenario B

Add ACL

Adds the ACL rule.
This allows to perform scenario B without cleaning ScenarioA configuration.

Del ACL

Deletes the ACL rule.
This allows to return to scenarioB from scenarioA configuration.