Configuration Files

Three files define boot and running configuration parameters.
  • boot-config: contains the location and name of the image to be loaded.
  • running-config: contains the current switch configuration.
  • startup-config: contains the switch configuration that is loaded when the switch boots.

The running-config and startup-config are different from one another when configuration changes have not been saved since the last boot.

boot-config

The boot-config file is an ASCII file that aboot uses to configure console communication settings, locate the eos flash image, and specify initial network configuration settings.

aboot boots the eos flash software image (extension .swi) referenced by boot-config, if the user does not interrupt the boot process. See aboot shell, which describes how aboot uses boot-config.

You can view and edit the boot-config file contents. Viewing and editing options include:
  • View boot-config file contents with the more boot-config command:
    switch(config)#more boot-config
    SWI=flash:/eos.swi
    CONSOLESPEED=2400
    aboot password (encrypted): $1$A8dZ3GLZ$knKrBpTyg5dhmtGdCdwNM.
    switch(config)#
  • View boot-config settings with the show boot-config command:
    switch(config)#show boot-config
    Software image: flash:/eos.swi
    Console speed: 2400
    aboot password (encrypted): $1$A8dZ3GLZ$knKrBpTyg5dhmtGdCdwNM.
    Memory test iterations: (not set)
    switch(config)#
  • Modify file settings from the command line with eos boot commands.

    See Programming boot-config from the Programming boot-config from the CLI for a list of boot commands.

  • Edit the file directly by using vi from the Bash shell.

See boot-config Command Line Content for a list of boot-config parameters.

boot-config File Structure

Each line in the boot-config file specifies a configuration setting and has this format:

NAME=VALUE
  • NAME is the parameter label.
  • VALUE indicates the parameter’s bootup setting.

The NAME and VALUE fields cannot contain spaces.

aboot ignores blank lines and lines that begin with a # character.

boot-config Command Line Content

aboot configuration commands that boot-config files can contain include:
  • SWI specifies the location and file name of the eos image file that aboot loads when booting, using the same format as the boot command to designate a local or network path.

    Example

    
    SWI=flash:eos.swi             <---flash drive location
    SWI=usb1:/eos1.swi            <---USB drive location
    SWI=file:/tmp/eosexp.swi      <---switch directory location
    SWI=/mnt/flash/eos.swi
    SWI=http://foo.com/images/eos.swi
    SWI=ftp://foo.com/images/eos.swi
    SWI=tftp://foo.com/eos.swi
    SWI=nfs://foo.com/images/eos.swi
  • CONSOLESPEED specifies the console baud rate. The connected terminal must match the specified rate to communicate with the switch. Baud rates options include 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200. The default baud rate is 9600.

    Example

    CONSOLESPEED=19200
  • PASSWORD (aboot) specifies the aboot password, as described in Accessing the aboot shell. The aboot shell does not require a password when boot-config does not contain a PASSWORD command.

    Example

    PASSWORD=$1$CdWp5wfe$pzNtE3ujBoFEL8vjcq7jo/
  • aboot uses NET commands during switch booting to configure the network interface for the switch. You can enter this manually in aboot.

    NETDEV indicates the configured network interface. If boot-config does not contain a NETDEV command, the booting process does not attempt to configure a network interface. Other NET commands specify settings that aboot uses to configure the interface.

Examples
  • This NETDEV command specifies management port 1 as the network interface to be configured by boot-config:

    NETDEV=ma1
  • This NETAUTO command instructs the switch to configure the network interface through a DHCP server, ignoring other NET settings:

    NETAUTO=dhcp
  • These NET commands configure the network interface:

    NETIP=10.12.15.10
    NETMASK=255.255.255.0
    NETGW=10.12.15.24
    NETDOMAIN=mycompany.com
    NETDNS=10.12.15.13

Programming boot-config from the CLI

The switch CLI provides boot commands for editing boot-config content. The boot commands are not accessible from a console port CLI. You can modify parameters by directly editing the boot-config file, which is not configurable from a boot command.

Commands that configure boot parameters include boot system, boot secret, and boot console.

boot system

The boot system command provides the eos image file location to aboot.

Examples
  • This command specifies eos1.swi as the software image load file on USB flash memory.
    switch(config)#boot system usb1:eos1.swi
    switch(config)#
  • The boot system command adds this line to boot-config.

    SWI=usb1:/eos1.swi
  • This command designates eos.swi as the eos software image load file on the switch flash.
    switch(config)#boot system flash:eos.swi
    switch(config)#
  • The boot system command adds this line to boot-config respectively:

    SWI=flash:/eos.swi

boot secret

The boot secret command sets the aboot password.

Examples
  • These equivalent commands set the aboot password to xr19v.
    switch(config)#boot secret xr19v
    switch(config)#
    switch(config)#boot secret 0 xr19v
    switch(config)#
  • This command shows the set password.
    switch(config)#show boot-config
    Software image: flash:/eos.swi
    Console speed: (not set)
    aboot password (encrypted): $1$k9YHFW8D$cgM8DSN.e/yY0p3k3RUvk.
    switch(config)#

    The boot secret commands earlier add this line to boot-config:

    PASSWORD=$1$k9YHFW8D$cgM8DSN.e/yY0p3k3RUvk.

    The user must enter xr19v at the login prompt to access the aboot shell.

  • This command sets the aboot password to xr123. The encrypted string generated previously is xr123 as the clear-text seed.
    switch(config)#boot secret 5 $1$QfbYkVWb$PIXG0udEquW0wOSiZBN3D/
    switch(config)#
  • This command shows the set password.
    switch(config)#show boot-config
    Software image: flash:/eos.swi
    Console speed: (not set)
    aboot password (encrypted): $1$QfbYkVWb$PIXG0udEquW0wOSiZBN3D/
    switch(config)#
  • The boot secret command earlier adds this line to boot-config:

    PASSWORD=$1$QfbYkVWb$PIXG0udEquW0wOSiZBN3D/

    The user must enter xr123 at the login prompt to access the aboot shell.

  • This command removes the aboot password; it does not authenticate subsequent aboot access.
    switch(config)#no boot secret
    switch(config)#
  • This command shows that there is now no aboot password.

    switch(config)#show boot-config
    Software image: flash:/eos.swi
    Console speed: (not set)
    aboot password (encrypted): (not set)
    switch(config)#

boot console

The boot console command sets console settings for attaching devices.

Examples
  • This command sets the console speed to 4800 baud:
    switch(config)#boot console speed 4800
    switch(config)#
  • This command shows the console speed.

    switch(config)#show boot-config
    Software image: flash:/eos.swi
    Console speed: 4800
    aboot password (encrypted): (not set)
    switch(config)#
  • The boot console command earlier adds this line to boot-config:

    CONSOLESPEED=4800

install bios source

The install bios source command loads an aboot Update File (AUF) to provide a signed method of upgrading aboot.

Examples
  • This command installs the file update.auf stored in /mnt/flash:
    switch#install bios source flash:/update.auf
    switch(config)#
  • This command performs a reboot directly after the installation:
    switch#install bios source flash:/update.auf reload
    switch(config)#
  • This command skips the prompts and performs the installation automatically:
    switch#install bios source flash:/update.auf now
    switch(config)#
  • This command performs the installation only on the standby supervisor:
    switch#install bios source flash:/update.auf standby
    switch(config)#
    Note: On a modular system with two supervisors, aboot gets upgraded on both by default.

running-config

The running-config is a virtual file that contains the system’s operating configuration, formatted as a command sequence. Commands entered from the CLI modify the running-config, and copying a file to running-config updates the operating configuration by executing the commands in the copied file.

Commands for viewing and copying running-config include:
  • show running-config displays the contents of running-config.
  • copy running-config startup-config copies running-config contents to startup-config.
  • write copies running-config contents to startup-config.

startup-config

The startup-config file is stored in flash memory and contains the configuration the switch loads when booting. During a switch boot, startup-config replaces the running-config. When the system reboots, changes to running-config that are not in startup-config are lost.

Commands affecting startup-config include:
  • show startup-config displays the contents of startup-config.
  • copy file_name startup-config copies contents of the specified file to startup-config.
  • delete startup-config deletes the startup-config file.