Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Calculating and Validating CRC in Configuration Files

    You can calculate and store CRC data in configuration files to detect any corrupt data in the configuration files. You can implement this feature in two steps:

    1. Run the copy running-configuration command. This command calculates the CRC value for the configuration file and stores the calculated CRC value in the configuration file header. For more information, see Saving the Current System Configuration.
      host1#copy running-configuration system2.cnf
    2. Run the service check-config command. This command unpacks a configuration file and calculates the CRC value on the complete file. It then reads the CRC value stored in the configuration file header. If the stored value is not zero, it is matched with the newly calculated CRC value. If there is a mismatch, the command generates an error which is stored in the system log.

      However, if the stored value is zero, the command ignores the CRC value to provide backward compatibility to configuration files created by JunosE Software versions that were released prior to Release 12.2.x.

      host1#service check--config system2.cnf

    The service check-config command also generates an error if the configuration header file is invalid or if the configuration file has invalid date stored within the file. All of the header errors detected by this command are stored in the system log. For more details, refer to the os event logging category in the JunosE System Event Logging Reference Guide.

    Published: 2014-08-12