Changes between Version 11 and Version 12 of Internal/OpenFlow/QuantaSetup
- Timestamp:
- Jan 20, 2011, 11:46:21 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/QuantaSetup
v11 v12 90 90 91 91 === 2.2.4. Using NFS with DHCP. === 92 Reference article: http://www.openflow.org/wk/index.php/IndigoQuickStartLB4G#NFS 92 Reference articles: 93 * http://www.openflow.org/wk/index.php/IndigoQuickStartLB4G#NFS 94 * http://www.openflowswitch.org/wk/index.php/IndigoQuickStart3290 93 95 [[BR]][[BR]] 94 Here, we assume that the switch will be assigned an IP address via DHCP. It will use the assigned IP address for fetching necessary images from an NFS server, and once booted into Linux, the variable DEV_ADDR. 96 Here, we assume that the switch will be assigned an IP address via DHCP. It will use the assigned IP address for 1) booting via NFS, and once booted into Linux, 2) the value assigned to DEV_ADDR and the management interface eth0. It is also assumed that you have a working NFS server with the following line in /etc/exports: 97 98 {{{ 99 /config 10.19.0.0/255.255.0.0(rw,sync,insecure,no_subtree_check) 100 }}} 95 101 96 102 1. DHCP setup in u-boot: … … 101 107 => setenv autoload no 102 108 }}} 103 The fi irst two commands blank out any previously assigned IP addresses and boot arguments. The next two enable DHCP. You can test if DHCP works via the command `dhcp`:109 The first two commands blank out any previously assigned IP addresses and boot arguments. The next two enable DHCP. You can test if DHCP works via the command `dhcp`: 104 110 {{{ 105 111 => dhcp … … 112 118 2. Set the startup script variable: 113 119 {{{ 114 => setenv dn_boot 'dhcp; setenv bootargs root=/dev/nfs ip=$ipaddr:$nfsip::$netmask:$hostname:$netdev\115 console=$consoledev,$baudrate nfsroot=$nfsip:$rootpath rw DEV_ADDR=$ipaddr ETH0_IP=$ipaddr $extra_boot_args; \ 116 bootm ffd00000'120 => setenv dn_boot 'dhcp; nfs ff000000 $nfsip:$rootpath/uInitrd2m; \ 121 setenv bootargs root=/dev/ram console=ttyS0,$baudrate DEV_ADDR=$ipaddr \ 122 ETH0_IP=$ipaddr $extra_boot_args rw; bootm ffd00000 ff000000 ffee0000' 117 123 }}} 118 `dhcp` invokes the DHCP client we configured earlier, which sets $ipaddr. Next, bootargs are set so that u-boot pulls the desired filesystem from a NFS . The next few parameters, `ip`,`console`,`$baudrate`, and `nfsroot` set the networking, standard I/O, and NFS parameters. 'rw' set mount parameters for the root FS. Both DEV_ADDR and ETH0_IP are variables used by Linux once the system boots into it; They are both set to the DHCP assigned IP address. $extra_boot_args can be set to additional variables using "`setenv extra_boot_args '<VARS>'`" (It's essentially a dummy variable). Finally, `bootm` is used to load the linux kernelstored on flash.124 `dhcp` invokes the DHCP client we configured earlier, which sets $ipaddr. Next, the necessary image(s) are loaded via NFS. Then, bootargs are set so that the OS knows where to locate the root FS (in /dev/ram). 'rw' set mount parameters for the root FS. Both DEV_ADDR and ETH0_IP are variables used by Linux once the system boots into it; They are both set to the DHCP assigned IP address. $extra_boot_args can be set to additional variables using "`setenv extra_boot_args '<VARS>'`" (It's essentially a dummy variable). Finally, `bootm` is used to load the linux kernel, filesystem, and device tree stored on flash. 119 125 120 126 3. Set additional variables. Make sure all the variables required by the startup script are defined. You may also want the set the bootcmd to boot using the new script. … … 123 129 => setenv hostname sw-sb9-da 124 130 => setenv netmask 255.255.0.0 125 => setenv rootpath /config /131 => setenv rootpath /config 126 132 }}} 127 133