= Flashing NEC Switches = NEC provides two models of switch that supports !OpenFlow, the IP8800/S3640-24T2XW and the IP8800/S3640-48T2XW. The switches must be manually flashed with !OpenFlow capable firmware to make them !OpenFlow capable. This page explains how to flash the switch to make it !OpenFlow capable. == Overview == This article is part summary of the !OpenFlow manual NEC provides with the switches, and a documentation of some details that might be worth mentioning. == Materials Needed == The SD card must contain the following for the switch to be able to boot off of it: * !OpenFlow capable firmware (k.img) * Software license for !OpenFlow capable firmware (license.dat) * Configuration file for !OpenFlow specific features (openflow.conf) == General steps == These are the general steps required to get the switch up and running as an !OpenFlow device: 1. Log into switch (this assumes you have already configured everything so you can talk to your switch) 1. Create VLANs 1. Create openflow.conf 1. Save k.img, license.dat, and openflow.conf onto SD card 1. Cold boot switch off of SD card (the manual says a reboot is sufficient, but this was not the case) 1. Enjoy The VLANs and virtual switches can also be configured after the switch has been booted off of the !OpenFlow firmware. More info on this can be found on the article about [wiki:Documentation/OpenFlow/VirtualSwitch virtual switches]. = The Caveats = Although the manual does a pretty good job at explaining how to do things, some things might be worth mentioning. The following are a summary of things that might be sort of important. == The SD card == NEC provides a certified SD card with the switch. They recommend that you only use this card. == The License == Each license is specific to a certain switch; a switch will not boot properly if the license is missing, misnamed, or if the license for the wrong switch is used. Sometimes the license is labeled with a specific switch's serial number instead of being labeled "license.dat." In that case, the serial number can be found on a silver sticker on the front of the switch, or by typing `show version` at the terminal: {{{ # show ver Date 2000/01/09 01:20:34 UTC Model: AX3640S-48T2XW S/W: OS-L3L Ver. 10.7 H/W: Main board AX-3640-48T2XW-L [WA03CL48T2XWS0E0693K007:80330300:111:1B514-1B512] Module slot1 PS-M(AC) AX-F2430-PSA01 [WA0PSA010000C110093D006] Module slot2 FAN-M AX-F2430-FAN01 [WA1FAN010000C140093D004] }}} In this case, "WA03CL48T2XWS0E0693K007" (in the first entry under "H/W: Main board) is the serial number and matches the name of the correct license for this specific switch. '''Note: ''' If the license is named after the switch's serial number, the license must be renamed to "license.dat" before saving onto the SD card . == openflow.conf == openflow.conf is a text file that contains configurations specific to !OpenFlow switching, or [wiki:Documentation/OpenFlow/VirtualSwitch virtual switching]. The details about the commands that can be used in the file are on pages 12-13 of the NEC manual. Following are a few notes about the commands. === `no-save` === Specifying this parameter in openflow.conf will prevent you from configuring virtual switches through the CLI (i.e, create new virtual switches). Because the firmware does not include text editors, once you have this parameter on your .conf file you will have to edit your file on a PC if you want to change anything. Basically, if you are planning to change things around after the switch has been booted into !OpenFlow, it is better not to specify this command. === `double-wide-mode` === When specified, all ten !OpenFlow specific header fields will be matched. === `setvsi` === Creates an instance of a [wiki:Documentation/OpenFlow/VirtualSwitch virtual switch] on a VLAN. `setvsi` is followed by several parameters: `setvsi [ ] [dpid ] [hwlimit ] [max-backoff ] [echo-interval ]` not all parameters need to be used with `setvsi`. The following are the minimal parameters you need to get a virtual switch going: `setvsi [dpid ]` == Example openflow.conf file == openflow.conf resides in /mnt/ . Just `cat /mnt/openflow.conf` to see the file. {{{ double-wide-mode setvsi 1 1,2,3,4,9.1 tcp 172.16.4.180 dpid 0x0123456789ab setvsi 2 5-8,9.2 tcp 172.16.4.64 dpid 0x01234567abcd setvsi 3 15-18,19.2 tcp 172.16.4.64 dpid 0x01234567abcd }}}