Changes between Version 11 and Version 12 of Internal/OpenFlow/QuantaSetup


Ignore:
Timestamp:
Jan 20, 2011, 11:46:21 PM (14 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/QuantaSetup

    v11 v12  
    9090
    9191=== 2.2.4. Using NFS with DHCP. ===
    92 Reference article: http://www.openflow.org/wk/index.php/IndigoQuickStartLB4G#NFS
     92Reference articles:
     93 * http://www.openflow.org/wk/index.php/IndigoQuickStartLB4G#NFS
     94 * http://www.openflowswitch.org/wk/index.php/IndigoQuickStart3290
    9395[[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.
     96Here, 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}}}
    95101
    961021. DHCP setup in u-boot: 
     
    101107=> setenv autoload no
    102108}}}
    103 The fiirst 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`:
     109The 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`:
    104110{{{
    105111=> dhcp
     
    1121182. Set the startup script variable:
    113119{{{
    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; \
     121setenv bootargs root=/dev/ram console=ttyS0,$baudrate DEV_ADDR=$ipaddr \
     122ETH0_IP=$ipaddr $extra_boot_args rw; bootm ffd00000 ff000000 ffee0000'
    117123}}}
    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 kernel stored 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.   
    119125
    1201263. 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.
     
    123129=> setenv hostname sw-sb9-da
    124130=> setenv netmask 255.255.0.0
    125 => setenv rootpath /config/
     131=> setenv rootpath /config
    126132}}}
    127133