Please Note: This website has been archived and is no longer maintained.
See the Open Networking Foundation for current OpenFlow-related information.

Switch Setup

There are two steps in setting up a switch: 1) Preparation, which involves providing management connectivity and loading the OpenFlow-enabled firmware, 2) Network Configuration, which involves creating the network through CLI and associating with the controller. The following description is divided based on the type of switch. We only provide the most common setup steps. For more information, consult the appropriate manuals.

NEC IP8800

Preparation

  • After procuring the switch, add the firmware (k.img), License file (license.dat) and openflow.conf onto the SD card. Load this SD card in the front left slot of the switch. Ensure that the newlines are CRLF in the openflow.conf file. The OpenFlow commands are specified in the network creation example.
  • Connect to the switch using serial cable (Baud rate: 9600, Data: 8bit, Parity: none, Stop: 1bit, Flow Control: none).
  • At the command login as “operator”. There is no password for that. Then type “en” to become superuser.
  • Enter config mode by typing command “config”
  • Create separate management VLAN and add the port that will be used for management to it.
(config)# vlan 999
(config-vlan)# name "MGMT_VLAN"
(config-vlan)# exit
(config)# interface gigabitethernet 0/48
(config-if)# switchport access vlan 999
(config-if)# exit
(config)# interface vlan 999
(config-if)# ip address <IP address> <mask>
(config-if)# no ip proxy-arp
(config-if)# exit
(config)# ip route 0.0.0.0 0.0.0.0 <gateway ip address>
  • Now telnet to the switch and start creating the network.

Network Creation

Following commands performed on the switch CLI will create the VLANs and OpenFlow switches, and associate the two.

nec1#config
nec1(config)#vlan 10
(config-vlan)# name "legacy_vlan"
(config-vlan)# exit
nec1(config)#vlan 20
(config-vlan)# name "prod_vlan"
(config-vlan)# exit
nec1(config)#vlan 30
(config-vlan)# name "expt_vlan"
(config-vlan)# exit

nec1(config)#interface range gigabitethernet 0/5
nec1(config-if-range)#switchport mode access
nec1(config-if-range)#switchport access vlan 10
nec1(config-if-range)#exit
nec1(config)#interface range gigabitethernet 0/1
nec1(config-if-range)#switchport mode access
nec1(config-if-range)#switchport access vlan 110
nec1(config-if-range)#exit
nec1(config)#interface range gigabitethernet 0/2-3
nec1(config-if-range)#switchport mode access
nec1(config-if-range)#switchport access vlan 120
nec1(config-if-range)#exit
nec1(config)#interface range gigabitethernet 0/48
nec1(config-if-range)#switchport mode trunk
nec1(config-if-range)#switchport trunk allowed vlan 10,999,110,120
nec1(config-if-range)#exit
nec1(config)#write

nec1#setvsi 110 1,48.110 tcp <controller ip>:6633 dpid 0x001234567890 max-backoff 15 wildcardlimit 50
nec1#setvsi 120 2-3,48.120 tcp <controller ip>:7733 dpid 0x001234567891 max-backoff 15 wildcardlimit 50

Pronto (Indigo firmware)

Preparation

  • Connect to the switch using serial cable (Baud rate: 115200, Data: 8bit, Parity: none, Stop: 1bit, Flow Control: none).
  • At the appropriate moment, access the boot menu using Control-B. You will receive a “==>” prompt
  • Check output of “printenv”, and then assign the necessary IP address (gateway, subnet mask) using “setenv” command
  • Store the necessary images in the /tftpboot of the TFTP server
  • Copy image over TFTP
=> copy -k tftp://<tftp server>/uImage
=> copy -r tftp://<tftp server>/uInitrd2m
=> copy -d tftp://<tftp server>/LB9A.dtb (only if Pronto 3290)
=> setenv flash_bootcmd 'setenv bootargs root=/dev/ram console=ttyS0,$baudrate rw \
   ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev DEV_ADDR=$ipaddr; \
   bootm ffd00000 ff000000 ffee0000'
=> setenv cfcard_bootcmd 'setenv bootargs root=/dev/ram console=ttyS0,$baudrate rw \
   ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev DEV_ADDR=$ipaddr; \
   ext2load ide 0:1 0x1000000 /uImage;ext2load ide 0:1 0x2000000 /uInitrd2m; \
   ext2load ide 0:1 0x400000 /LB9A.dtb; bootm 1000000 2000000 400000'
=> setenv bootcmd 'run flash_bootcmd'
=> saveenv
=> reset
  • The boot process continues and stops at “$” prompt of the kernel

Network Creation

  • With Pronto and other pure-OF switches, the whole switch acts as 1 large VLAN.
  • You can edit the configuration files and start the OF protocol on the Pronto switch. For more instructions, click here

HP Procurve

Preparation

  • Connect to the switch using serial cable (Baud rate: 9600, Data: 8bit, Parity: none, Stop: 1bit, Flow Control: none).
  • Enter config mode by typing command “config”
  • Create separate management VLAN and add the port that will be used for management to it.
(config)# vlan 999
(vlan-999)# name MGMT_VLAN
(vlan-999)# ip address  255.255.255.0 
(vlan-999)# tagged A1,A4,A24
(vlan-999)# exit
(config)# ip route 0.0.0.0 0.0.0.0 
(config)# ip ssh filetransfer
(config)# exit
# boot system flash secondary

 

  • After rebooting system into secondary flash, copy over the firmware to the switch using scp. This is the easiest option.
scp /path/to/image root@switch:/os/primary
  • Sometimes the SSH session will not finish cleanly, and the switch will complain. Wait a minute or two and the connection will timeout.
  • After wait time, login to the switch over telnet and issue following command to reset the switch into the OpenFlow firmware.
#boot system flash primary

Network creation

Following command creates the VLAN and enables OpenFlow over that VLAN:

#config
(config)# vlan 10
(vlan-10)# name legacy_vlan
(vlan-10)# tagged A1,A4,A24
(vlan-10)# untagged A8,A9
(vlan-10)# exit
(config)# vlan 110
(vlan-110)# name expt_vlan
(vlan-110)# tagged A1
(vlan-110)# untagged A2,A5
(vlan-110)# exit
(config)# vlan 120
(vlan-120)# name prod_openflow_vlan
(vlan-120)# tagged A1,A24
(vlan-120)# untagged A3,A6,A7
(vlan-120)# exit
(config)# openflow 110 controller tcp:<controller ip>:6633 enable
(config)# openflow 120 controller tcp:<controller ip>:7733 enable
(config)# exit
# write memory