Version 8 (modified by 14 years ago) ( diff ) | ,
---|
Setting up the Quanta LB4G
Unlike the IP8800, This is a purely OpenFlow switch, unable to do anything without a controller. The steps can be found documented elsewhere (ref. below), but we repeat the steps just in case things change.
1. Preparation
1.1 References
Flashing the firmware
- http://openflowswitch.org/wk/index.php/LB4GImageSetup
- http://www.openflow.org/wk/index.php/IndigoQuickStartLB4G (possibly more up-to-date)
Configuring the switch
- http://www.openflow.org/wk/index.php/IndigoConfiguration - synopsis of system files, variables
- http://www.openflowswitch.org/wk/index.php/IndigoReleaseNotes - the actual HOWTO for turning the box into an OpenFlow switch
1.2 Prerequisites
- OS on PC: Ubuntu
- packages on PC: ckermit, xinetd, tftpd-hpa
2. Installation
2.1 Connecting to the switch
A serial connection can be set up between the switch and a machine using a RJ-45 to RS-232 cable. Surprisingly, a Cisco cable will work for this. Connect the RJ-45 end to the port labeled "Con" on the switch, and the other end to the PC. Next, start a session from a shell with kermit as root:
kermit -l /dev/ttyS0 set carrier-watch off set baud 115200 connect
Fire up the switch. If you see the U-Boot banner, you can stop the boot process (hit ctrl-c) so you can copy/burn the images onto flash.
2.2 updating u-boot
This step is comprised of the following steps:
- change network settings of switch
- update u-boot
- upload kernel, root filesystem, and device tree to flash
- modify boot parameters
The switch for SB9 will be images via nfs with console.sb9 as the server. This is to prevent users from bricking the switch by playing with u-boot.
2.2.1. change network settings
The network settings are hard-wired into the switch via environment variables. The default settings statically set the switch's IP to a 192.168.X.X address block, which you might want to change depending on your network setup. This can be done using command setenv
. While all environment variables can be viewed with printenv
, the four variables of our interest are:
- ipaddr (switch's static ip, default 192.168.1.2)
- gatewayip (what the switch sees as default gw on its route table)
- serverip (who to talk to for services e.g. tftp)
- netmask (self-explanatory)
These variables should correspond to those for the network you're attaching the switch to. In our case, we set the switch's IP to 10.50.0.40, and cut out the hassle of setting the gateway IP by just directly pointing the switch to think the tftp server is the gateway:
=> setenv gatewayip 10.50.0.42 => setenv ipaddr 10.50.0.40 => setenv netmask 255.255.0.0 => setenv serverip 10.50.0.42 => saveenv
2.2.2. updating u-boot/copying files to flash
Once the networking variables are set, you can start copying the necessary files to the switch using copy
. copy
uses tftp to fetch the images:
=> copy -b tftp://10.50.0.42/u-boot.bin => copy -k tftp://10.50.0.42/uImage => copy -r tftp://10.50.0.42/uInitrd2m => copy -d tftp://10.50.0.42/LB9A.dtb
The first line updates u-boot. The next three fetch the kernel image, root filesystem, and device tree, respectively.
2.2.3. modifying boot parameters
In addition, you want to modify flash_bootcmd
so that it tells the linux kernel to mount the root filesystem read-write:
=> setenv flash_bootcmd 'setenv bootargs root=/dev/ram console=ttyS0,$baudrate rw; bootm ffd00000 ff000000 ffee0000' => saveenv
Also, make sure that the variable bootcmd
is set to run flash_bootcmd
. If not, reset with setenv and save this change as well:
=> setenv bootcmd 'run flash_bootcmd' => setenv bootfile eldk-quanta => saveenv
and load the image by issuing the command boot
. if all goes well, you should be at the Linux shell prompt once the switch starts up.
Note: The bootcmd parameter will be the proper value if the switch is restarted after u-boot is updated (a.k.a. after the 1st copy
command). This, however, resets all of your networking variables, so you'd have to re-do the steps in 2.2.1. Basically, it is up to the tastes of whoever is re-imaging the switches to either manually set the bootcmd variable or reset all of the network parameters after reboot.
3. Configuration
The Quanta is pretty much just a modified, minimal Linux box with a bunch of ports. Upon startup, you will be at the Linux shell as root.
- eth0 and eth1 as given by
ifconfig -a
are eth1 and eth2 on the faceplate, respectively. The interfaces can be manipulated as with any Linux box usingifconfig
. - The ssh server (dropbear) is enabled by default. Telnet can be started by invoking telnetd. In either case the default username is
root
, and password isOpenFlow
.
3.1. Using the OpenFlow CLI (OF-BCM)
OF-BCM is the OpenFlow command line supplied with the image. It can be started manually:
# /sbin/of-bcm-cli Broadcom Command Monitor: Copyright (c) 1998-2008 Broadcom Corporation Release: sdk-xgs-robo-5.6.6 built 20100905 (Sun Sep 5 23:01:38 2010) Stanford OpenFlow Monitor Platform: LB9A_MPC8541 OS: Unix (Posix) PCI unit 0: Dev 0xb538, Rev 0x11, Chip BCM56538_B0, Driver BCM56634_B0 rc: unit 0 ... OF-BCM.0>
3.2. Key files
The OpenFlow components of the switch rely on the following:
/etc/rc.sh
- system startup script: bring uplo
, mounts filesystems, loads kernel modules, ect/etc/system_config
- system initialization scrit/etc/system_config
- system configs unique to each switch/rc.soc
,/etc/config.bcm
- starts OpenFlow components/etc/find-env
- defines many of the system variables
Attachments (1)
-
mHT9200-06-gc.pdf
(59.6 KB
) - added by 14 years ago.
instructions on setting u-boot IP
Download all attachments as: .zip