Changes between Version 5 and Version 6 of Internal/OpenFlow/QuantaSetup
- Timestamp:
- Jan 6, 2011, 6:55:19 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/QuantaSetup
v5 v6 29 29 30 30 === 2.2 updating u-boot === 31 This step is comprised of t wosteps:31 This step is comprised of the following steps: 32 32 1. change network settings of switch 33 2. update u-boot via tftp 33 2. update u-boot 34 3. upload kernel, root filesystem, and device tree to flash 35 4. modify boot parameters 34 36 37 === 2.2.1. change network settings === 35 38 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: 36 39 … … 40 43 * netmask (self-explanatory) 41 44 42 These variables should correspond to those for the network you're attaching the switch to. In our case, we set the switch's I pto 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:45 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: 43 46 44 47 {{{ … … 47 50 => setenv netmask 255.255.0.0 48 51 => setenv serverip 10.50.0.42 49 => save 52 => saveenv 50 53 }}} 51 54 52 once the variables are set, you can start copying the necessary files to the switch using `copy`: 55 === 2.2.2. updating u-boot/copying files to flash === 56 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: 57 53 58 {{{ 54 59 => copy -b tftp://10.50.0.42/u-boot.bin 60 => copy -k tftp://10.50.0.42/uImage 55 61 => copy -r tftp://10.50.0.42/uInitrd2m 56 62 => copy -d tftp://10.50.0.42/LB9A.dtb 57 => copy -k tftp://10.50.0.42/uImage58 63 }}} 59 and reboot the switch. if all goes well, you should be at the Linux shell prompt once the thing starts up. 64 65 The first line updates u-boot. The next three fetch the kernel image, root filesystem, and device tree, respectively. 66 67 === 2.2.3. modifying boot parameters === 68 in addition, you want to modify `flash_bootcmd` so that it tells the linux kernel to mount the root filesystem read-write: 69 {{{ 70 => setenv flash_bootcmd 'setenv bootargs root=/dev/ram console=ttyS0,$baudrate rw; bootm ffd00000 ff000000 ffee0000' 71 => saveenv 72 }}} 73 74 and reboot the switch. if all goes well, you should be at the Linux shell prompt once the switch starts up. 60 75 61 76 == 3. Configuration == … … 64 79 * 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 is `OpenFlow`. 65 80 66 === 3.1. Key files === 81 === 3.1. Using the !OpenFlow CLI (OF-BCM) === 82 OF-BCM is the !OpenFlow command line supplied with the image. It can be started manually: 83 {{{ 84 # /sbin/of-bcm-cli 85 Broadcom Command Monitor: Copyright (c) 1998-2008 Broadcom Corporation 86 Release: sdk-xgs-robo-5.6.6 built 20100905 (Sun Sep 5 23:01:38 2010) 87 Stanford OpenFlow Monitor 88 Platform: LB9A_MPC8541 89 OS: Unix (Posix) 90 PCI unit 0: Dev 0xb538, Rev 0x11, Chip BCM56538_B0, Driver BCM56634_B0 91 rc: unit 0 92 93 ... 94 95 OF-BCM.0> 96 }}} 97 98 === 3.2. Key files === 67 99 The !OpenFlow components of the switch rely on the following: 68 100 * `/etc/rc.sh` - system startup script: bring up `lo`, mounts filesystems, loads kernel modules, ect