Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Updating the SRC Configuration

 

You can update an SRC configuration with information stored in a file. Topics include:

SRC Configuration Updates

You can update an SRC configuration to include configuration changes from a file or to revert to the configuration supplied with the product. You can also retain the active configuration and discard changes not yet committed. After you load one of these configurations, you can commit it to activate the configuration on the C Series Controller, or you can edit the configuration interactively using the CLI and commit it at a later time.

Before You Load a Configuration

Before you load a configuration, make a copy of the current configuration. This configuration contains the active configuration plus any configuration changes that have been made at the CLI. For information about the syntax in the configuration files, see:

  • Text format—SRC PE CLI Command Reference

  • XML format—SRC XML API Configuration Reference

You can save the configuration to text, XML, or set format. By default, the configuration is saved to a file in XML format.

To make a backup copy of the configuration:

  • From the [edit] hierarchy level of configuration mode, save the configuration to XML format. For example:

  • From the [edit] hierarchy level of configuration mode, save the configuration to text format. For example:

  • From the [edit] hierarchy level of configuration mode, save the confutations to set format. For example:

Commands to Load a Configuration

Use the load commands to load your configuration from a saved configuration file.

The load merge and load replace commands include options for loading only system bootstrap or none-bootstrap configuration data from the specified configuration file. Bootstrap configuration data is part of the local configuration. It enables an SRC host to be a networked host, and includes parameters like system host-name, system domain-name, interfaces, and routing options.

  • Use the bootstrap-only option when loading the configuration on C Series Controllers that have no bootstrap configuration—for example, a new system or a system that has had the factory default configuration restored.

  • Use the except-bootstrap option when you are loading a configuration from a file and you want to retain the existing bootstrap configuration.

You can automatically enable SRC components when the CLI starts. For example, this allows you to automatically enable the Juniper Networks database community on a system that has only the factory default configuration loaded. To configure the system to automatically enable components, add “Component.auto-enable = component-name” to the CLI backend bootstrap properties file “cli.properties.”

You can use the following commands in configuration mode to make configuration changes:

  • load factory-default—Replaces the existing configuration with the configuration supplied with the SRC software.

  • load merge (filename | terminal) <relative>—Combines the configuration that is currently shown in the CLI and the configuration in the specified file or in the text you type at the terminal. Press Ctrl+D to end terminal input.

    • bootstrap-only—When used with this option, only system bootstrap configuration data is merged.

    • except-bootstrap—When used with this option, all configuration data except the bootstrap configuration is merged.

  • load override (filename | terminal)—Discards the entire configuration that is currently shown in the CLI, and loads the entire configuration in the specified file or in the text you type at the terminal. Press Ctrl+D to end terminal input.

  • load replace (filename | terminal) <relative>—Looks for replace attributes in the specified file, deletes the existing statements of the same name, and replaces them with the configuration in the specified file or in the text you type at the terminal. Press Ctrl+D to end terminal input.

    • bootstrap-only—When used with this option, only system bootstrap configuration data is replaced.

    • except-bootstrap—When used with this option, all configuration data except the bootstrap configuration is replaced.

  • load set (filename | terminal) <relative>—Executes configuration mode commands such as set, edit, exit, and top from a text file or from the text you type at the terminal. Press Ctrl+D to end terminal input.

The relative option for the load merge, load replace, and load set commands lets you load the configuration at a specified hierarchy level.

The load merge, load override, and load replace commands let you update configuration statements in the SRC configuration from a text file or an XML file. The structure of this file must conform to the structure for an SRC configuration file. For this reason, we recommend that you copy the file based on the file format you plan to use:

  • XML format—Save a configuration to an XML file and modify that file.

  • Text format—Save a configuration to a text file, or copy the output from a show command to a file, and modify that file.

    Note

    For a merge, replace, or override operation, you cannot use the file created by using the save filename format set command.

For a merge or replace operation, you can save a copy of the configuration at any level in the configuration hierarchy, then load the updated configuration at the same level.

Use the editor of your choice to modify a saved configuration file. When you edit a file that is to be loaded into the SRC configuration, you can add specified attributes to specify actions to be taken.

SSH Host Keys

You can load SSH host keys into the configuration from the saved configuration file. When you execute commit, the loaded SSH host keys are used to update system key files (those in the /etc/ssh directory). The original files are backed up with the same filename with an additional “~”.

Component State

You can load SRC component states into the configuration from the saved configuration file. When you execute commit, the loaded component state values are used to automatically enable and disable the SRC components.

Attributes in SRC Configuration Files

You can add the following attributes to text files or to XML tags in a configuration file to be loaded through the load merge, load override, and load replace commands. If you do not add any attributes, the software merges all changes.

  • operation=”create”—Create the specified configuration.

    If you try to create a configuration object that already exists, the software does not create the new objects and generates an error message to that effect.

  • operation=”delete”—Delete the specified configuration.

  • operation=”merge”—Merge the specified configuration.

  • operation=”replace”—Replace a specified configuration with another defined configuration.

    If the replace attribute is in the file whose contents are merged, the command disregards the replace attribute.