ONOS

 

Download the ONOS source code using github.

git clone -b onos-spring ssh://<username>@gerrit.onosproject.org:29418/ONOS

Compile the codes.

cd ~/ONOS
mvn clean
mvn complie

 

Controller-CLI

 

 

 

 

Dell Hardware Switches

How to configure openflow 

  1. Setup CAM

    #configure
    (conf)#cam-acl l2acl 2 ipv4acl 2 ipv6acl 0 ipv4qos 0 l2qos 1 l2pt 0 ipmacacl 0 vman-qos 0 ecfmacl 0 openflow 8
    (conf)#cam-acl-vlan vlanopenflow 1 vlaniscsi 1  vlanaclopt 0
    (conf)#exit
  2. Reboot the switch

    #reload
  3. Create openflow instance

    #configure
    (conf)#openflow of-instance 1
    (conf-of-instance-1)#controller 1 10.11.44.5 tcp [ change to your controller ip ]
    (conf-of-instance-1)#flow-map l2 enable
    (conf-of-instance-1)#flow-map l3 enable
    (conf-of-instance-1)#interface-type any
    (conf-of-instance-1)#multiple-fwd-table enable
    (conf-of-instance-1)#of-version 1.3
    (conf)#exit
  4. Setup interfaces

    (conf)#interface TenGigabitEthernet 0/0 [ change to your network ports]
    (conf-if-te-0/0)#of-instance 1
    (conf-if-te-0/0)#no switch-port
    (conf-if-te-0/0)#no shutdown
    (conf)#exit
  5. Enable the openflow instance

    (conf)#openflow of-instance 1
    (conf-of-instance-1)#not shutdown
    (conf-of-instance-1)#exit

 

CPqD Software Switches

  1. Download the source code

    git clone https://github.com/CPqD/ofsoftswitch13.git
  2. Go back to the specific version of Cpqd

    git checkout f308c28242de57502f06d3dee80ce47ac17b6603
  3. Apply the following patch

    diff --git oflib/oxm-match.c oflib/oxm-match.c
    index e21edaa..d763cf9 100644
    --- oflib/oxm-match.c
    +++ oflib/oxm-match.c
    @@ -202,14 +202,22 @@ oxm_prereqs_ok(const struct oxm_field *field, const struct ofl_match *rule)
                 return false;
         }
     
    +    
         /* Check for eth_type */
         if (!field->dl_type[0])
             return true;
    +    else if (field->dl_type[0] == htons(0x8847))
    +	// quick-fix:ignore check for ethtpe when setting mpls label-id
    +	// needs a cleaner solution which checks for a push-mpls action before the set
    +	return true;
         else {
             HMAP_FOR_EACH_WITH_HASH (omt, struct ofl_match_tlv, hmap_node, hash_int(OXM_OF_ETH_TYPE, 0),
                   &rule->match_fields) {
                   uint16_t eth_type;
                   memcpy(&eth_type, omt->value, sizeof(uint16_t));
    +	      //VLOG_INFO_RL(LOG_MODULE,&rl, "field-dltype %x ethtype %x htons %x", field->dl_type[0],
    +	      //		eth_type, htons(eth_type));
    +
                   if (field->dl_type[0] == htons(eth_type)) {
                     return true;
                   } else if (field->dl_type[1] && field->dl_type[1] ==  htons(eth_type)) {
    @@ -349,7 +357,8 @@ parse_oxm_entry(struct ofl_match *match, const struct oxm_field *f,
             case OFI_OXM_OF_IPV4_SRC_W:
             case OFI_OXM_OF_ARP_SPA_W:
             case OFI_OXM_OF_ARP_TPA_W:
    -             ofl_structs_match_put32m(match, f->header, *((uint32_t*) value), *((uint32_t*) mask));
    +	     // note that the mask is bitwise notted to match 1.3 description of mask
    +             ofl_structs_match_put32m(match, f->header, *((uint32_t*) value), ~(*((uint32_t*) mask)));
                  return 0;
             case OFI_OXM_OF_ARP_SHA:
             case OFI_OXM_OF_ARP_THA:
    
    

    If you save it as a file (patchfile_cpqd), then you can apply the patch as following

    patch -p0 < ../patchfile_cpqd 
  4. Build it following the README.md file in the directory