107
Format and content of a configuration file
A configuration file is saved as a text file according to these rules:
•
A configuration file contains commands.
•
Only non-default configuration settings are saved.
•
The commands are listed in sections by views, usually in this order: system view, interface view,
routing protocol view, and user interface view.
•
Sections are separated with one or more blank lines or comment lines that start with a pound sign
#
.
•
A configuration file ends with a return.
Coexistence of multiple configuration files
The device can save multiple configuration files on its storage media. You can save the configurations
used in different networking environments as different configuration files. When the device moves
between networking environments, specify the configuration file as the startup configuration file of the
device and then restart the device. Multiple configuration files allow the device adapt to the network
rapidly, saving the configuration workload.
A device starts up using only one configuration file. However, you can specify two startup configuration
files, main startup configuration file and backup startup configuration file of the device as needed when
the device has main and backup configuration files. The device starts up using the main startup
configuration file. If the main startup configuration file is corrupted or lost, the devices starts up using the
backup startup configuration file. Devices supporting main and backup startup configuration files are
more secure and reliable.
At a moment, there are at most one main startup configuration file and one backup startup configuration
file. You can specify neither of the two files (displayed as NULL).
You can specify main and backup startup configuration files in two methods:
•
Specify them when saving the running configuration. For more information, see “
.”
•
Specify them when specifying the startup configuration file. For more information, see “
Startup with the configuration file
The device takes the following steps when it starts up:
1.
If the main startup configuration file you specified exists, the device starts up with this configuration
file.
2.
If the main startup configuration file you specified does not exist but the backup startup
configuration file exists, the device starts up with the backup startup configuration file.
3.
If neither the main nor the backup startup configuration file exists, the device starts up with factory
default configuration.
Saving the running configuration
To make configuration changes take effect at the next startup of the device, you can save the running
configuration to the startup configuration file before the device reboots.