- Table of Contents
-
- 01-Fundamentals Configuration Guide
- 00-Preface
- 01-CLI configuration
- 02-RBAC configuration
- 03-Login management configuration
- 04-FTP and TFTP configuration
- 05-File system management configuration
- 06-Configuration file management configuration
- 07-Software upgrade configuration
- 08-Automatic configuration
- 09-Multichassis configuration sync configuration
- 10-GIR configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
06-Configuration file management configuration | 198.69 KB |
About configuration file management
Configuration file types and file selection process at startup
Next-startup configuration file redundancy
Configuration file content organization and format
Enabling configuration encryption
Assigning a user exclusive write access to the configuration
Disabling automatic system-wide next-startup configuration file operations
Saving the running configuration
Comparing configurations for their differences
Archiving the running configuration
About archiving the running configuration
Restrictions and guidelines for running configuration archiving
Configuring automatic configuration archiving
Manually archiving the running configuration
Configuring configuration rollback
Restrictions and guidelines for configuration rollback
Performing a local configuration rollback
Scheduling or performing a remote configuration rollback
Specifying a next-startup configuration file
Backing up and restoring the main next-startup configuration file
About backing up and restoring the main next-startup configuration file
Prerequisites for configuration backup and restoration
Backing up the main next-startup configuration file to a TFTP server
Restoring the main next-startup configuration file from a TFTP server
Deleting a next-startup configuration file
Verifying and maintaining configuration files
Displaying the factory defaults
Displaying startup configuration file information
Displaying the running configuration
Displaying configuration differences
Displaying information about remote configuration rollback
Displaying configuration archive information
Displaying information about user-based configuration locking
Managing configuration files
About configuration file management
You can manage configuration files from the CLI or the BootWare menu. The following information explains how to manage configuration files from the CLI.
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 the configuration can survive a reboot. You can also back up configuration files to a host for future use.
Configuration types
Initial configuration
Initial configuration is the collection of initial default settings for the configuration commands in software.
The device starts up with the initial configuration if you access the BootWare menu and select the Skip Current System Configuration option. In this situation, the device might also be described as starting up with empty configuration.
No commands are available to display the initial configuration. To view the initial default settings for the configuration commands, see the Default sections in the command references.
Factory defaults
Factory defaults are custom basic settings that came with the device. Factory defaults vary by device models and might differ from the initial default settings for the commands.
The device starts up with the factory defaults if no next-startup configuration files are available.
To display the factory defaults, use the display default-configuration command. If no factory defaults came with the device, the output of the display default-configuration command is empty.
Startup configuration
The device uses startup configuration to configure software features during startup. After the device starts up, you can specify the 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.
You can display the startup configuration by using one of the following methods:
· To display the contents of the current startup configuration file, execute the display current-configuration command before changing the configuration after the device reboots.
· To display the contents of the next-startup configuration file, use the display saved-configuration command.
· Use the display startup command to display names of the current startup configuration file and next-startup configuration files. Then, you can use the more command to display the contents of the specified startup configuration file.
Running configuration
The running configuration includes unchanged startup settings and new settings. The running configuration is stored in memory and is cleared at a device reboot or power off. To use the running configuration after a power cycling or reboot, save it to a configuration file.
To display the running configuration, use the display current-configuration command.
Configuration file types and file selection process at startup
When you save the configuration, the system saves the settings to a .cfg configuration file and to an .mdb file.
· A .cfg configuration file is a human-readable text file and its contents can be displayed by using the more command. Configuration files you specify for saving the configuration must use the .cfg extension.
· An .mdb file is a user-inaccessible binary file that has the same name as the .cfg file. The device loads an .mdb file faster than loading a .cfg file.
At startup, the device uses the following procedure to identify the configuration file to load:
1. The device searches for a valid .cfg next-startup configuration file. For more information about the file selection rules, see "Next-startup configuration file redundancy."
2. If a valid .cfg next-startup configuration file is found, the device searches for an .mdb file that has the same name and checksum as the .cfg file.
3. If a matching .mdb file is found, the device starts up with the .mdb file. If none is found, the device starts up with the .cfg file.
If no .cfg next-startup configuration files are available, the device starts up with the factory defaults.
Unless otherwise stated, the term "configuration file" in this document refers to a .cfg configuration file.
Next-startup configuration file redundancy
You can specify one main next-startup configuration file and one backup next-startup configuration file for redundancy.
At startup, the device tries to select the .cfg startup configuration in the following order:
1. The main next-startup configuration file.
2. The backup next-startup configuration file if the main next-startup configuration file does not exist or is corrupt.
If no next-startup configuration files are available, the device starts up with the factory defaults.
Configuration file content organization and format
IMPORTANT: To run on the device, a configuration file must meet the content and format requirements. To ensure a successful configuration load, rollback, or restoration, use a configuration file created on the device. If you edit the configuration file, edit it on the device, and make sure all edits are compliant with the requirements. Do not download the configuration file locally for editing. |
Configuration restoration or rollback might fail for a set of interdependent commands if the operation fails for one of them.
A configuration file must meet the following requirements:
· All commands are saved in their complete form.
· No command lines contain invalid characters.
IMPORTANT: Some command lines (for example, the sysname command) cannot contain question marks (?) or horizontal tabs (\t). If the system loads a configuration file that contains the sysname abc?? command line at startup, the system will ignore the command line and use the default system name. If the system uses that configuration file to roll back or restore the configuration, the system name will not be rolled back or restored. |
· Commands are sorted into sections by different command views, including system view, interface views, protocol views, and user line views.
· Two adjacent sections are separated by a pound sign (#).
· The configuration file starts with a pound sign (#).
· The configuration file ends with the word return.
The following is a sample configuration file excerpt:
#
local-user root class manage
password hash $h$6$Twd73mLrN8O2vvD5$Cz1vgdpR4KoTiRQNE9pg33gU14Br2p1VguczLSVyJLO2huV5Syx/LfDIf8ROLtVErJ/C31oq2rFtmNuyZf4STw==
service-type ssh telnet terminal
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
interface Vlan-interface1
ip address 192.168.1.84 255.255.255.0
#
Configuration rollback
Configuration rollback allows you to replace the running configuration with the configuration in a configuration file without rebooting the device. You can use this feature for the following purposes:
· Reverting to a previous configuration state.
· Adapting the running configuration to different network environments.
Enabling configuration encryption
About this task
Configuration encryption enables the device to use the master key to encrypt a startup configuration file automatically when it saves the running configuration. For more information about the master key, see public key management in Security Configuration Guide.
Restrictions and guidelines
After a configuration file is encrypted by using this feature on the device, only devices that use the same master key as the device can decrypt the encrypted configuration file.
You cannot use the more command to view the contents of an encrypted configuration file.
Procedure
1. Enter system view.
system-view
2. Enable configuration encryption.
configuration encrypt
By default, configuration encryption is disabled.
Assigning a user exclusive write access to the configuration
About this task
In a multiuser environment, configuration conflicts or service exceptions might occur if multiple users are configuring the device.
To make sure only one user can change the running configuration, assign that user exclusive write access to the configuration. This setting locks the configuration. Then, all other users will have only read access to the configuration until the configuration is unlocked.
Restrictions and guidelines
To allow concurrent write accesses to the configuration, you must unlock the configuration by executing the undo configuration exclusive by-user-name user-name command. The user-name argument must be the username used to lock the configuration. To obtain this username, use the display configuration exclusive by-user-name command.
This feature no longer takes effect after the device reboots. To use this feature, you must reconfigure it.
Prerequisites
To perform this task, you must log in to the system through scheme authentication. Scheme authentication requires a username and password.
Procedure
1. Enter system view.
system-view
2. Assign a user exclusive write access to the configuration.
configuration exclusive by-user-name user-name
By default, the configuration is not locked. No users have exclusive write access to the configuration.
Disabling automatic system-wide next-startup configuration file operations
About this task
By default, automatic system-wide next-startup configuration file operations are enabled. The system performs the following operations on all IRF subordinate devices in addition to the master device:
· Saves the running configuration to the next-startup configuration file on each member device when you execute the save [ safely ] [ backup | main ] [ force ] [changed ] command.
· Deletes the next-startup configuration file on each member device when you execute the reset saved-configuration command.
If you disable automatic system-wide next-startup configuration file operations, the system saves the running configuration or deletes the next-startup configuration file only on the master device.
Automatic system-wide operations ensure start-up configuration file consistency between the master and subordinate devices. However, a system-wide operation takes more time than an operation performed only on the master device. In addition, the amount of time required to complete a system-wide configuration operation increases as the amount of configuration data grows.
If you are disabling automatic system-wide operations for faster configuration saving, be aware that the next-startup configuration files will be inconsistent between the master device and the subordinate devices.
Procedure
1. Enter system view.
system-view
2. Disable automatic system-wide next-startup configuration file operations.
undo standby auto-update config
By default, next-startup configuration file operations are automatically synchronized across the entire system.
Saving the running configuration
About this task
When you save the running configuration to a .cfg configuration file, you can specify the file as a next-startup configuration file or not.
The device supports the following methods to save the running configuration:
· Manual configuration saving—You use the save command to save the running configuration to a configuration file or to the main or backup next-startup configuration file.
· Automatic configuration saving—The device automatically saves the running configuration to both the .cfg and .mdb main next-startup configuration files at intervals as configured. At each interval, the device performs an automatic saving operation only if the running configuration contains different settings than the main next-startup configuration files. If no main next-startup configuration files exist, the device automatically creates configuration files startup.cfg and startup.mdb to save the running configuration and specifies the files as the main next-startup configuration files.
Restrictions and guidelines
To prevent the loss of next-startup configuration, make sure no one reboots or power cycles the device while the device is saving the running configuration.
As a best practice, save the running configuration to both the .cfg and .mdb main next-startup configuration files. To reduce the amount of time used for saving the running configuration, use binary-only configuration saving.
When an IRF member device splits from the IRF fabric, its settings are retained in memory but removed from the running configuration on the IRF fabric. Saving the running configuration before the IRF fabric recovers will remove the member device's settings from the next-startup configuration file.
If you have saved the running configuration before the member device rejoins the IRF fabric, perform the following steps to restore the member device settings to the next-startup configuration file:
1. Resolve the split issue.
2. Reboot the member device to rejoin the IRF fabric.
3. After the member device rejoins the IRF fabric, execute the display current-configuration command to verify that the member device's settings have been restored from memory to the running configuration.
4. Save the running configuration to the next-startup configuration file on the IRF fabric.
IMPORTANT: To ensure a successful configuration restoration, make sure the IRF fabric has not rebooted after the member device left. |
By default, the save [ safely ] [ backup | main ] [ force ] [ mdc-all | context-all | changed ] command saves the configuration to all IRF member devices. To save the configuration only to the master device, disable automatic system-wide next-startup configuration file operations. For more information, see "Disabling automatic system-wide next-startup configuration file operations."
When an expansion interface card is removed from the system, its settings are retained in memory but removed from the running configuration on the system. Saving the running configuration before installing the replacement card will remove the card's settings from the next-startup configuration file.
If you have saved the running configuration after removing a card, perform the following steps to restore the card settings to the next-startup configuration file:
1. Install the replacement card.
2. After the replacement card comes online, execute the display current-configuration command to verify that the card's settings have been automatically restored from memory to the running configuration.
3. Save the running configuration to the next-startup configuration file.
IMPORTANT: To ensure a successful configuration restoration, make sure the system has not rebooted after the card was removed. |
Automatic configuration saving saves the running configuration to all member devices.
Manually saving the running configuration
To save the running configuration, perform one of the following tasks in any view:
· Save the running configuration to a configuration file without specifying the file as a next-startup configuration file.
save file-url [ all | slot slot-number ]
· Save the running configuration to a configuration file in the root directory of the storage medium, and specify the file as a next-startup configuration file.
save [ safely ] [ backup | main ] [ force ] [ changed ]
As a best practice, specify the safely keyword for reliable configuration saving.
CAUTION: Use caution when you save the running configuration. This operation will overwrite the settings in the target configuration file. When you perform this operation, carefully read the messages displayed by the system and make sure you fully understand the impact of the operation on services. |
Configuring automatic configuration saving
1. Enter system view.
system-view
2. Enable the device to automatically save the running configuration and set the automatic saving interval. Choose one of the following options:
¡ Enable the automatic configuration saving feature and set the automatic saving interval.
save current-configuration interval { interval | sec seconds-interval }
By default, the automatic configuration saving feature is disabled.
This feature saves the running configuration to both the .cfg and .mdb main next-startup configuration files.
¡ Enable the binary-only automatic configuration saving feature and set the automatic saving interval.
save current-configuration binary-only interval interval
By default, the binary-only automatic configuration saving feature is disabled.
This feature saves the running configuration only to the .mdb binary main next-startup configuration file.
Comparing configurations for their differences
About this task
You can compare configuration files or compare a configuration file with the running configuration for their differences.
If you specify the next-startup configuration for a comparison, the system selects the next-startup configuration file to be compared with in the following order:
1. The main next-startup configuration file.
2. The backup next-startup configuration file if the main next-startup configuration file is unavailable.
If both configuration files are unavailable, the system displays a message indicating that no next-startup configuration files exist.
Procedure
To compare configurations for their differences, perform one of the following tasks in any view:
· Display the differences that a configuration file, the running configuration, or the next-startup configuration has as compared with the specified source configuration file.
display diff configfile file-name-s { configfile file-name-d | current-configuration | startup-configuration }
· Display the differences that a configuration file or next-startup configuration has as compared with the running configuration.
display diff current-configuration { configfile file-name-d | startup-configuration }
· Display the differences that a configuration file has as compared with the next-startup configuration.
display diff startup-configuration configfile file-name-d
· Display the differences that the running configuration has as compared with the next-startup configuration.
¡ Method 1:
display diff startup-configuration current-configuration
¡ Method 2:
display current-configuration diff
Archiving the running configuration
About archiving the running configuration
The following are methods for archiving the running configuration:
· Automatic configuration archiving—The system automatically archives the running configuration at intervals as configured.
· Manual configuration archiving—You can disable automatic configuration archiving and manually archive the running configuration if the configuration will not be changed very often. You can also use this method before performing complicated configuration tasks. If the configuration attempt fails, you can use the archive for configuration recovery.
If you use local archiving, configuration archives are named in the format of prefix_serial number.cfg, for example, archive_1.cfg and archive_2.cfg. The serial number is automatically assigned from 1 to 1000, increasing by 1. After the serial number reaches 1000, it restarts from 1.
If you change the file directory or file name prefix on the local device, the following events occur:
· The old configuration archives change to common configuration files.
· The configuration archive counter is reset. The serial number for new configuration archives starts at 1.
· The display archive configuration command no longer displays the old configuration archives.
The configuration archive counter does not restart when you delete configuration archives from the archive directory. However, if the device reboots after all configuration archives have been deleted, the configuration archive counter restarts. The serial number for new configuration archives starts at 1.
If you archive the running configuration to a remote server, configuration archives are named in the format of prefix_YYYYMMDD_HHMMSS.cfg (for example, archive_20170526_203430.cfg). The YYYYMMDD_HHMMSS string represents the device system date and time when the configuration archive was saved.
Restrictions and guidelines for running configuration archiving
The archive configuration server and archive configuration location commands are mutually exclusive. To execute the archive configuration server command, you must restore the default for the archive configuration location command, and vice versa.
In FIPS mode, the device does not support archiving the running configuration to a remote server.
With local configuration archiving, the system deletes the oldest archive to make room for the new archive after the maximum number of configuration archives is reached.
If you use a remote TFTP, FTP, or SCP server, make sure the device is consistent with that server in, TFTP. FTP, or SCP settings. If a login username and password is configured on the server, you must specify that login username and password on the device.
If the remote server already contains an archive file with the same name as the new configuration archive file being transferred, the new archive file overwrites the existing file. To avoid an undesirable overwrite, back up the configuration archives on the server to a different directory.
For local archiving, the configuration archive feature saves the running configuration only on the master device. To make sure the system can archive the running configuration after a master/subordinate switchover, create the configuration archive directory on the storage media of all IRF members.
After you execute the undo archive configuration server or undo archive configuration server command, the output from the display archive configuration command will be cleared.
Configuring automatic configuration archiving
1. Enter system view.
system-view
2. Enable automatic running-configuration archiving and configure the related parameters. Perform one of the following tasks:
¡ Archive the running configuration to a local directory.
archive configuration location directory filename-prefix filename-prefix [ max file-number ] interval interval
¡ Archive the running configuration to a remote FTP server.
archive configuration server ftp [ user user-name password { cipher | simple } string ] { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix interval interval
¡ Archive the running configuration to a remote TFTP server.
archive configuration server tftp { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix interval interval
¡ Archive the running configuration to a remote SCP server.
archive configuration server scp user user-name password { cipher | simple } string { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix interval interval
By default, automatic running-configuration archiving is disabled.
Manually archiving the running configuration
Restrictions and guidelines
As a best practice, do not edit the parameters for configuration archiving during the manual configuration archiving. If configuration archiving has started based on the existing archive parameters when an archive parameter is changed, the archive will still be retained in the old directory. However, the display archive configuration command will not display the record about this archiving.
When you enable automatic running-configuration archiving, you must also configure the related parameters. During automatic running-configuration archiving, you can also manually archive the running configuration. In addition, manual running configuration archiving uses those parameters for automatic running-configuration archiving. If you have not configured automatic running-configuration archiving, configure running configuration archiving parameters before manual archiving.
Procedure
1. Enter system view.
system-view
2. Configure the parameters for archiving the running configuration. Perform one of the following tasks:
¡ Archive the running configuration to a local directory.
archive configuration location directory filename-prefix filename-prefix [ max file-number ] [ interval interval ]
¡ Archive the running configuration to a remote FTP server.
archive configuration server ftp [ user user-name password { cipher | simple } string ] { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix [ interval interval ]
¡ Archive the running configuration to a remote TFTP server.
archive configuration server tftp { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix [ interval interval ]
¡ Archive the running configuration to a remote SCP server.
archive configuration server scp user user-name password { cipher | simple } string { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix [ interval interval ]
By default, no parameters are configured for running configuration archiving.
3. Return to user view.
quit
4. Manually archive the running configuration.
archive configuration
Configuring configuration rollback
About configuration rollback
Configuration rollback allows you to replace the running configuration with the configuration in a replacement configuration file without rebooting the device. The replacement configuration file can be saved on the local device or on a remote server.
The configuration rollback feature compares the running configuration with the specified replacement configuration file and handles configuration differences as follows:
· If a command in the running configuration is not in the replacement file, the rollback feature executes the undo form of the command.
· If a command in the replacement file is not in the running configuration, the rollback feature adds the command to the running configuration.
· If a command has different settings in the running configuration and the replacement file, the rollback feature replaces the running command setting with the setting in the replacement file.
Restrictions and guidelines for configuration rollback
To ensure a successful rollback, do not install or remove expansion interface cards or perform a master/subordinate switchover while the system is rolling back the configuration.
Make sure the replacement configuration file is created by using the configuration archive feature or the save command on the device. If the configuration file is not created on the device, make sure the command lines in the configuration file are fully compatible with the device.
If configuration rollback fails for some command lines, the system outputs a rollback failure message. To identify those command lines, use the display diff current-configuration configfile file-name-d command, with the replacement file specified for the file-name-d argument. The command lines that have failed to roll back are displayed as configuration differences between the running configuration and the replacement configuration file.
The configuration rollback feature 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 is undo A C, the configuration rollback feature cannot undo the A B C command. This is 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.
Performing a local configuration rollback
Restrictions and guidelines
The replacement configuration file must be stored unencrypted on the local system.
Procedure
1. Enter system view.
system-view
2. Roll the running configuration back to the configuration defined by a configuration file.
configuration replace file filename
CAUTION: This operation will cause settings not in the replacement configuration file to be lost, which might cause service interruption. When you perform configuration rollback, make sure you fully understand its impact on your network. |
The specified configuration file must not be encrypted and must be saved on the local system.
Scheduling or performing a remote configuration rollback
About this task
You can roll back the running configuration by using a configuration file stored on a remote server.
When you perform this task, you can roll back the running configuration immediately or schedule a rollback for a future date and time.
The device performs a remote rollback as follows:
1. Downloads a replacement configuration file from a remote server.
2. Saves the downloaded file as a temporary file.
3. Replaces the running configuration with the configuration in the temporary file.
4. Deletes the temporary file after the configuration rollback finishes.
Restrictions and guidelines
The undo configuration replace server command performs the following operations:
· Disables the running configuration remote rollback feature.
· Restores the default settings for the configuration replace server user and configuration replace server password commands.
· Clears the configuration rollback information displayed by using the display configuration replace server command.
You can cancel a configuration rollback schedule anytime before its scheduled date and time. When you schedule a rollback, you can specify the date and time or specify only the time to execute the rollback.
· If you specify a rollback date with the rollback time, the specified date must be the same or later than the current system date. If the specified date is the same as the current system date, the specified time must be later than the current system time. After you create the rollback schedule, be careful with changing the system clock backward. The rollback schedule will be canceled automatically if it expires before it could be executed because the system date or time is changed backward.
· If you do not specify a rollback date with the rollback time, the device compares the specified rollback time with the current system time.
¡ If the specified rollback time is later than the current system time, the device performs a rollback at the specified time on the current day.
¡ If the specified rollback time is earlier than the current system time, the device performs a rollback at the specified time on the next day.
Procedure
1. Enter system view.
system-view
2. Configure server parameters for remote configuration rollback.
configuration replace server { ftp | tftp } { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] file filename
By default, no server parameters are configured for remote configuration rollback.
The configuration file specified by using this command will be used for rollback if no configuration file is specified when you perform or schedule a remote rollback.
3. If an FTP server is used, configure the username and password for accessing the remote FTP server.
a. Configure the username.
configuration replace server user user-name
By default, no username is configured for accessing the FTP server.
If no username is configured, the username will be anonymous.
b. Configure the password.
configuration replace server password { cipher | simple } string
By default, no password is configured for accessing the FTP server.
Make sure the username and password are the same as the FTP account settings on the FTP server.
4. Roll the running configuration back to the configuration in a replacement configuration file.
configuration replace server file [ filename ] at time [ date ]
If no replacement configuration file is specified, the configuration file specified by using the configuration replace server command is used for rollback.
CAUTION: This operation will cause settings not in the replacement configuration file to be lost, which might cause service interruption. When you perform configuration rollback, make sure you fully understand its impact on your network. |
Specifying a next-startup configuration file
Restrictions and guidelines
CAUTION: Using the undo startup saved-configuration command can cause an IRF split after the IRF fabric or an IRF member reboots. When you execute this command, make sure you understand its impact on your network. |
As a best practice, specify different files as the main and backup next-startup configuration files.
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.
Prerequisites
Make sure the same file is specified as the next-startup configuration file on all member devices in an IRF fabric. Therefore, before configuring this feature, make sure the specified configuration file is saved in the root directory on the same type of storage medium for all member devices. If you fail to do so, the configuration will fail.
Procedure
1. Specify a next-startup configuration file. Choose one of the following methods:
¡ Execute the following command in user view to specify a next-startup configuration file:
startup saved-configuration cfgfile [ backup | main ]
¡ Execute the following command in any view to save the running configuration to a file and specify the file as a next-startup configuration file:
save [ safely ] [ backup | main ] [ force ]
For more information about this command, see "Saving the running configuration."
If you do not specify the backup or main keyword, this command specifies the configuration file as the main next-startup configuration file.
2. (Optional.) Verify the configuration. Use one of the following commands in any view:
¡ Display the names of the configuration files for this startup and the next startup.
display startup
¡ Display the contents of the configuration file for the next system startup.
display saved-configuration
Backing up and restoring the main next-startup configuration file
About backing up and restoring the main next-startup configuration file
You can back up the main next-startup configuration file to a TFTP server or restore the main next-startup configuration file from a TFTP server.
Prerequisites for configuration backup and restoration
Before you back up or restore the main next-startup configuration file, perform the following tasks:
· Make sure the following requirements are met:
¡ The server is reachable.
¡ The server is enabled with TFTP service.
¡ You have read and write permissions to the server.
· For configuration backup, use the display startup command to verify that the main next-startup configuration file has been specified in user view. If no next-startup configuration file has been specified or the specified configuration file does not exist, the backup operation will fail.
Backing up the main next-startup configuration file to a TFTP server
To back up the main next-startup configuration file to a TFTP server, execute the following command in user view:
backup startup-configuration to { ipv4-server | ipv6 ipv6-server } [ dest-filename ] [ vpn-instance vpn-instance-name ]
Restoring the main next-startup configuration file from a TFTP server
1. Restore the main next-startup configuration file from a TFTP server in user view.
restore startup-configuration from { ipv4-server | ipv6 ipv6-server } src-filename [ vpn-instance vpn-instance-name ]
2. (Optional.) Verify that the specified configuration file has been set as the main next-startup configuration file. Use one of the following commands in any view:
¡ Display the names of the configuration files for this startup and the next startup.
display startup
¡ Display the contents of the configuration file for the next system startup.
display saved-configuration
Deleting a next-startup configuration file
About this task
You can perform this task to delete a next-startup configuration file.
If both the main and backup next-startup configuration files are deleted, the device uses the factory defaults at the next startup.
To delete a file that is set as both main and backup next-startup configuration files, you must execute both the reset saved-configuration backup command and the reset saved-configuration main command. Using only one of the commands removes the specified file attribute instead of deleting the file.
For example, if the reset saved-configuration backup command is executed, the backup next-startup configuration file setting is set to NULL. However, the file is still used as the main file. To delete the file, you must also execute the reset saved-configuration main command.
Restrictions and guidelines
CAUTION: This task permanently deletes a next-startup configuration file from the device. |
Procedure
To delete a next-startup configuration file, execute the following command in user view:
reset saved-configuration [ backup | main ]
CAUTION: By default, this task permanently deletes a next-startup configuration file from all IRF member devices. To delete the configuration file only from the master device, disable automatic system-wide next-startup configuration file operations. For more information, see "Disabling automatic system-wide next-startup configuration file operations." |
If you do not specify the backup or main keyword, the main next-startup configuration is deleted.
Verifying and maintaining configuration files
Displaying the factory defaults
To display the factory defaults, execute the following command in any view:
display default-configuration
Displaying startup configuration file information
Perform display tasks in any view.
· Display the contents of the configuration file used at the next system startup.
display saved-configuration
· Display the names of all startup configuration files, including the file that the device started up with and the files for next startup.
display startup
Displaying the running configuration
Perform display tasks in any view.
· Display the running configuration on the device.
display current-configuration [ [ configuration [ module-name ] | exclude-provision | interface [ interface-type [ interface-number ] ] ] [ all ] | slot slot-number ]
· Display the running configuration in the current view.
display this [ all ]
Displaying configuration differences
Perform display tasks in any view.
· Display the differences that the running configuration has as compared with the next-startup configuration.
display current-configuration diff
· Display the differences between configurations.
display diff configfile file-name-s { configfile file-name-d | current-configuration | startup-configuration }
display diff current-configuration { configfile file-name-d | startup-configuration }
display diff startup-configuration { configfile file-name-d | current-configuration }
Displaying information about remote configuration rollback
To display information about remote configuration rollback, execute the following command in any view:
display configuration replace server
Displaying configuration archive information
To display configuration archive information, execute the following command in any view:
display archive configuration
Displaying information about user-based configuration locking
To display information about user-based configuration locking, execute the following command in any view:
display configuration exclusive by-user-name