Config Management

Config Management

1. Function Overview

This product uses the following config information to maintain the value of settings.

Config type Description User operations possible

Running config (running-config)

The currently-running setting values. Managed in RAM.

View / Save to startup config

Startup config (startup-config)

Saved setting values. Five config files are maintained in ROM, and one on the SD card.
When the system starts up, either the config from ROM that is selected by the startup-config select command or the config from the SD card is loaded.
One configuration on the SD card is controlled in the “/swx2310p/startup-config” folder.

View / Delete / Copy

Default config (default-config)

The default setting values. Managed in ROM.

No operations possible

3. Function Details

3.1. Running config

running-config is the settings that are currently operating; since it is maintained in RAM, it is destroyed at reboot.
On this product, commands executed in configuration mode are immediately applied to running-config, and the unit operates according to these settings.
The contents of running-config can be viewed by using the show running-config command.

3.2. Startup config

startup-config is settings that are saved in flash ROM or on the SD card, and the contents are preserved through reboot.
When this product is started, the settings of startup-config are applied as the initial settings of running-config.

This product can maintain five startup configs in flash ROM and one startup config on the SD card.
The startup-config in the unit’s flash ROM is managed with an ID of 0 to 4, and the config on the SD card is managed with the keyword “sd”.

To specify which of the five types of config in the unit’s flash ROM are used, use the startup-config select command.

  • By default, sd is used.

  • When executing the startup-config select command, the user selects whether to restart. If you don’t restart, no change occurs in the command setting.
    If you choose to restart, the unit restarts with the startup-config of the ID specified by the user’s command.

When updating from firmware Rev.2.02.09 or earlier to firmware Rev.2.02.10 or later, if startup-config select 0 is specified, the setting value will automatically be changed to startup-config select sd.
Therefore, if you are using the system with a microSD card containing CONFIG inserted, be aware that the system will boot from the SD card.
This does not apply if you execute the startup-config select command with firmware Rev.2.02.10 or later and then downgrade to firmware Rev.2.02.09 or earlier.

For easier management, you can use the startup-config description command to give each config a Description (explanatory text).

If you attempt to start up in a state where startup-config does not exist, such as after executing the cold start command, the default-config is automatically applied.

The running-config settings can be saved in startup-config by the copy running-config startup-config command or the write command.
The contents of startup-config can be erased by the erase startup-config command, viewed by the show startup-config command, and copied by the copy startup-config command.

3.3. Default config

default-config contains settings saved in internal flash ROM that are needed for this product to operate minimally as a switch. Like startup-config, the contents are preserved even after a restart.
The factory settings are maintained as default-config.
If startup-config does not exist when the system starts, default-config is copied to startup-config, and applied to running-config.
The contents of default-config cannot be viewed.

3.4. Deciding the config file at startup

The following describes the flow for deciding the config file used when this product starts up.

  1. The startup-config select command setting value is referenced to determine the startup-config that will be used.
    If the startup-config select command has specified sd, and an SD card on which startup-config is saved is not inserted, then startup-config #0 is selected.

  2. If the startup-config that is determined exists, the corresponding data is applied as running-config in RAM.
    If the startup-config determined according to the value of the startup-config select command does not exist in ROM, then default-config is applied to RAM.

If startup using the config in the SD card fails, the following message is shown in the console and in SYSLOG.

Loading config0 because can't read config in SD card.

3.5. Controlling the config file via TFTP

If this product’s TFTP server function is enabled, a TFTP client installed on a PC or other remote terminal can be used to perform the following.

  1. Acquire the currently running running-config and startup-config

  2. Apply a previously prepared settings file as startup-config

In order for the TFTP server to function correctly, an IP address must be specified for the VLAN.
The settings files can be acquired/set from a remote terminal in binary mode. Specify the following as the remote path of the acquisition source/transmission destination of the settings files.
Also, specify the administrative password in the form “/PASSWORD” appended to the end of the remote path.
However, the config file cannot be obtained or specified if the default administrative password is still specified. The administrative password setting must be changed in advance.
The startup-config settings are applied as running-config after the system is restarted.

Target CONFIG Target file Remote path Get (GET) Setting (PUT) Automatic restart

running-config

CONFIG file (.txt)

config

Yes

Yes

-

startup-config # 0

CONFIG file (.txt)

config0

Yes

Yes

-

All settings (.zip)

config0-all

Yes

Yes

-

startup-config # 1

CONFIG file (.txt)

config1

Yes

Yes

-

All settings (.zip)

config1-all

Yes

Yes

-

startup-config # 2

CONFIG file (.txt)

config2

Yes

Yes

-

All settings (.zip)

config2-all

Yes

Yes

-

startup-config # 3

CONFIG file (.txt)

config3

Yes

Yes

-

All settings (.zip)

config3-all

Yes

Yes

-

startup-config # 4

CONFIG file (.txt)

config4

Yes

Yes

-

All settings (.zip)

config4-all

Yes

Yes

-

startup-config # SD

CONFIG file (.txt)

configsd

Yes

Yes

-

All settings (.zip)

configsd-all

Yes

Yes

-

If you want to restart the system automatically after applying the settings file, specify the following remote path.
The currently running configuration is applicable.

Target CONFIG Target file Remote path Get (GET) Setting (PUT) Automatic restart

Currently running startup-config

CONFIG file (.txt)

reconfig

-

Yes

Yes

When applying (PUT) a settings file, make sure that the target CONFIG and the target file type are correct.
If an incorrect file is specified, the contents cannot be reflected correctly.
For running-config, you need to add the following to the beginning of the settings file.

!
! Switch Configuration
!

4. Related Commands

Related commands are indicated below.
For details, refer to the Command Reference.

Operations Operating commands

Save running config

copy running-config startup-config

Save running config

write

Copy startup config

copy startup-config

Erase startup config

erase startup-config

Show startup config

show startup-config

Select startup config

startup-config select

Set description for startup config

startup-config description

5. Examples of Command Execution

5.1. Select startup config

Select startup-config #1 and restart the system.

Yamaha#startup-config description 1 TEST (1)
Yamaha#startup-config select 1 (2)
reboot system? (y/n): y (3)
1 Set the description “TEST” to startup-config #1
2 Select startup-config #1
3 Restart the system

5.2. Save running config

Save running-config.

Yamaha#copy running-config startup-config
Suceeded to write configuration
Yamaha#

5.3. Copy startup config

Copy startup-config #2 to the SD card.

Yamaha#copy startup-config 2 sd (1)
Suceeded to copy configuration
Yamaha#show startup-config sd (2)
!
!  Last Modified: Tue Mar 13 17:34:02 JST 2018
!
dns-client enable
!
interface port1.1
 switchport
 switchport mode access
 no shutdown
!
...
1 Copy startup-config #2 to the SD card
2 Show startup-config on the SD card

5.4. Erase startup config

Erase startup-config from the SD card.

Yamaha#erase startup-config sd (1)
Suceeded to erase configuration
Yamaha#
1 Erase startup-config in the SD card