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 attempts to boot the EOS flash software image (with the extension .swi) referenced by boot-config if the user does not interrupt the boot process. See Aboot Shell 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. To communicate with the switch, the connected terminal must match the specified rate. 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. If boot-config does not contain a PASSWORD command, the Aboot shell does not require a password.

    Example

    PASSWORD=$1$CdWp5wfe$pzNtE3ujBoFEL8vjcq7jo/
  • NET commands are used by Aboot during switch booting to configure the network interface that will be used for switch configuration. These commands can also be entered manually in Aboot.

    NETDEV indicates which network interface is being configured. 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 contents. The boot commands are not accessible from a console port CLI. Parameters not configurable from a boot command can be modified by directly editing the boot-config file.

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 on USB flash memory as the software image load file.
    switch(config)#boot system usb1:EOS1.swi
    switch(config)#

    The boot system command above adds this line to boot-config.

    SWI=usb1:/EOS1.swi
  • This command designates EOS.swi, on the switch flash, as the EOS software image load file.
    switch(config)#boot system flash:EOS.swi
    switch(config)#

    The boot system command above adds this line to boot-config:

    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 password that has been set.
    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 above 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 was previously generated with xr123 as the clear-text seed.
    switch(config)#boot secret 5 $1$QfbYkVWb$PIXG0udEquW0wOSiZBN3D/
    switch(config)#
  • This command shows the password that has been set.
    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 above 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; subsequent Aboot access is not authenticated.
    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 above adds this line to boot-config:

    CONSOLESPEED=4800

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 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 that the switch loads when booting. During a switch boot, running-config is replaced by startup-config. Changes to running-config that are not copied to startup-config are lost when the system reboots.

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.