Escolar Documentos
Profissional Documentos
Cultura Documentos
Restoring the main next-startup configuration file from a TFTP server ········································································· 9
18H 39H
i
Managing configuration files
You can use the CLI or the Boot menu to manage configuration files. This chapter describes the CLI
approach to configuration file management.
Overview
A configuration file saves a set of commands for configuring software features on the device. You can
save any configuration to a configuration file so they can survive a reboot. You can also back up
configuration files to a host for future use.
Configuration types
The device has the following types of configurations: factory defaults, startup configuration, and running
configuration.
Factory defaults
The device is shipped with some basic settings called "factory defaults." These default settings make sure
the device can start up and run normally when it has no configuration file or the configuration file is
corrupted.
Factory defaults vary with device models and might differ from the default settings of commands.
To view factory defaults, use the display default-configuration command.
Startup configuration
The device uses startup configuration to configure software features during startup. After the device starts
up, you can specify a different configuration file to be loaded at the next startup. This configuration file
is called the "next-startup configuration file." The configuration file that has been loaded is called the
"current startup configuration file."
If no next-startup configuration file exists, the device boots with the factory defaults.
You can view the startup configuration in either of the following ways:
• Execute the display startup command. To view detailed file contents, use the more command.
• After the device reboots, execute the display current-configuration command before making any
configuration.
Running configuration
Running configuration includes startup settings that have not been changed and new settings you have
made. It is stored in a volatile storage medium and takes effect while the device is operating.
New settings take effect immediately, but they must be saved to a configuration file to survive a reboot.
To view the running configuration, use the display current-configuration command.
1
At startup, the device tries to start up with the main configuration file. If the main configuration file is
corrupted or unavailable, the device tries the backup configuration file. If the backup configuration file is
corrupted or unavailable, the device starts up with the factory defaults.
For reliability, do not specify one configuration file as both the main and backup configuration files.
2
Enabling configuration encryption
Configuration encryption enables the device to automatically encrypt a startup configuration file when
saving the running configuration. This function has the following approaches:
• Private key approach—Only the encrypting MPU can decrypt the encrypted configuration file.
• Public key approach—Any H3C device running the same software version as the encrypting device
can decrypt the encrypted configuration file.
IMPORTANT:
Do not move or copy a private-key-encrypted configuration file between MPUs. Doing so can cause a
decryption failure because the MPUs use different private keys.
By default, configuration
2. Enable configuration configuration encrypt { private-key | encryption is disabled.
encryption. public-key } Configuration is saved
unencrypted.
3
Task Command Remarks
Task Command
4
Configuration task list
Tasks at a glance
Configuration guidelines
In standalone mode, the configuration archive function saves the running configuration only on the active
MPU. In IRF mode, the function saves the running configuration only on the active MPU in the master
device.
To make sure the system can archive the running configuration after an active/standby or
master/subordinate switchover, create the configuration archive directory on all MPUs.
Configuration procedure
To configure configuration archive parameters:
5
Step Command Remarks
6
Step Command Remarks
Task Command
The configuration rollback function might fail to reconfigure some commands in the running configuration
for one of the following reasons:
• A command cannot be undone because prefixing the undo keyword to the command does not
result in a valid undo command. For example, if the undo form designed for the A [B] C command
7
is undo A C, the configuration rollback function cannot undo the A B C command, because the
system does not recognize the undo A B C command.
• A command (for example, a hardware-dependent command) cannot be deleted, overwritten, or
undone due to system restrictions.
• The commands in different views are dependent on each other.
• Commands or command settings that the device does not support cannot be added to the running
configuration.
You can specify a .cfg configuration file as a main or backup next-startup configuration file when using
the save [ safely ] [ backup | main ] [ force ] command to save the running configuration.
Alternatively, you can execute the startup saved-configuration cfgfile [ backup | main ] command to
specify a configuration file as the main or backup next-startup configuration file. When performing this
task, follow these guidelines:
• In standalone mode, make sure the specified configuration file is valid and saved to the root
directory of both the active and standby MPUs' storage media.
• In IRF mode, make sure the specified configuration file is valid and saved to the root directory of all
MPUs' storage media in the IRF fabric.
• If neither backup nor main is specified, this command sets the configuration file as the main
next-startup configuration file.
• Even though the main and backup next-startup configuration files can be the same one, specify
them as separate files for high availability.
• The undo startup saved-configuration command changes the attribute of the main or backup
next-startup configuration file to NULL instead of deleting the file.
To specify a next-startup configuration file, perform the following task in user view:
8
To back up the main next-startup configuration file to a TFTP server:
Step Command
1. Restore the main next-startup configuration
restore startup-configuration from src-addr src-filename
file from a TFTP server in user view.
2. (Optional.) Verify that the specified
display startup
configuration file has been set as the main
next-startup configuration file. display saved-configuration
9
• After you upgrade system software, the file no longer matches the new system software.
• The file has been corrupted or is not fully compatible with the device.
After the file is deleted, the device uses factory defaults at the next startup.
Perform the following task in user view:
Task Command
10