Upgrading the Flash of the Netgear 73xx for OpenFlow

Table of Contents

Overview

Last updated for 2011.08.06 release. For older releases, refer to documentation included with the specific release.

This document describes how to convert a Netgear GSM7328S or GSM7352S to work with the OpenFlow software.  This document assumes that you have a GSM73xx switch that boots to the Linux prompt.  If you switch does not do this, please contact Netgear for more information.

If you have already upgrade to an OpenFlow image released since ntgr-ui-beta-4 (February, 2011) you may be able to use the web interface to upgrade your switch. Use a web browser to connect to the IP address of the switch and select the top tab labeled Maintenance. The instructions below should still work as well.

?Prerequisites

  • gsm73xxso-of-1.x.y.z.image: The flash image to be copied into flash. Older releases were called mtd0image.
  • Serial port connection:  You need to connect the DB9 serial port on the GSM73xx device to a PC running a serial console program.  The serial port is configured at 115200, 8N1.
  • TFTP server:  You need to have a TFTP server on the network connected to the GSM73xx box.  You might look at http://www.davidsudjiman.info/2006/03/27/installing-and-setting-tftpd-in-ubuntu/ if you need more information.
  • You should know the IP address you intend to use for this switch and the IP address of the controller it should talk to.  In addition, if the TCP port of the controller is not the default, you need to know that.

Procedure

Step 1:  Boot the box to the Linux prompt and configure the network

Typically, the system will ask for a username.  Use "root".  No password should be required.  Configure the network with the command:

# ifconfig eth1 10.0.0.100

You should use the IP address you want for the switch (here, 10.0.0.100).

Make sure the network cable is connected to Port 1 (upper left on the front panel).  Ping the TFTP server (here, 10.0.0.2) to verify connectivity:

# ping 10.0.0.1

If this doesn't work, check the network connections.  You might also try changing the cable connected to the switch to Port 2.

Step 2:  Copy the image to the switch, verify the image and burn into flash

# cd /tmp

This is required as the main file system is not normally mounted read/write.

Assuming the address of the TFTP server is 10.0.0.1:

# tftp -r gsm73xxso-of-1.1.0.2.image -g 10.0.0.1
# md5sum gsm73xxso-of-1.1.0.2.image
a754bf7f600cfde5baee9c81cc34cbc6  gsm73xxso-of-1.1.0.2.image
# flashcp -v gsm73xxso-of-1.1.0.2.image /dev/mtd0

Change the address from 10.0.0.1 to your TFTP server if it is different.  As a sanity check, you can calculate the md5sum of the image as shown above. The number shown here is for gsm73xxso-of-1.1.0.2.image. If you are upgrading to a different image, the number will be different. See the md5sum file that should be included with your release.

Wait until the write and verification have completed.  

Step 3:  Reboot and update the boot parameters

Reboot the system (either with the command "reboot" or a power cycle).  Run printenv and you should see something like:

=> printenv
bootargs=console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs init=/etc/preinit
bootdelay=5
baudrate=115200
loadaddr=1000000
bootcmd=bootm ffc00000
stdin=serial
stdout=serial
stderr=serial

Execute the following commands to update the boot parameters:

=> setenv bootcmd_old 'bootm ffc00000'

This will save the original boot command so you can "run bootcmd_old" to boot to the original image.  Now, you need to know the IP addresses of this switch (say 10.0.0.100 for this example) the controller (10.0.0.2 for this example) and the controller port number (6633 for this example).

=> setenv ofboot 'setenv bootargs console=ttyS0,115200 init=/etc/preinit rw; bootm fe000000 fe180000'
=> setenv bootcmd run ofboot

For previous releases, variables like the IP address of the switch were included here. This is not necessary, though you will need to configure these variables from the CLI.

The last command sets the default boot command to run this OpenFlow boot command.

Important: Save your changes:

=> saveenv

You can verify the settings:

=> printenv
bootargs=console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs init=/etc/preinit
bootdelay=5
baudrate=115200
loadaddr=1000000
bootcmd_old=bootm ffc00000
bootcmd=run ofboot
ofboot=setenv bootargs console=ttyS0,115200 init=/etc/preinit rw; bootm fe000000 fe180000
stdin=serial
stdout=serial
stderr=serial

If you now type "boot" or if the system restarts, it should boot to the OpenFlow image.

Boot and Configure the System

Once you have booted the OpenFlow image, configure the switch from the serial console using the CLI:

cli
config set switch_ip 10.0.0.100
config set controller_ip 10.0.0.2
config set controller_port 6633
config set system_ref some_system_name
quit

Try 'config help' and see the Indigo Configuration and Initialization document for more information.

If you have problems with this image and you need to revert, reboot the switch, interrupt the boot process by typing return and type the command "run bootcmd_old". You can follow the instructions above to load a new image.