Configure Session

The command configure session creates a configuration session for CLI commands, which can occur later when the session commits. Each configure session is has a unique name. A session can enter, modify, and exit anytime without impacting the currently running system configuration.

When a session is in the commit stage, running-config has copies of the modified configuration of the session, overwriting any other configuration changes made since it creates the session. A session can be aborted or removed, thereby removing the session completely and freeing up memory used by the session. The user must explicitly request the changes in a deferred session to the router's configuration by entering a commit command and exiting the mode. Alternatively, the user may abandon the changes by entering an abort command. An uncommitted configuration session will be discarded if the switch reboots and will time out after 24 hours.

Configuration sessions use to make changes after verifying that there are no CLI errors. Configuration sessions allow the administrator to pre-provision a group of CLI commands in a named session and execute each configuration session at specified times.

Configuration Session

The configure session command allows users to make a series of configuration changes in a temporary location and commit them to running-config by issuing the commit command.
  • configure session <name of session> and running-config: The user enters a session (versus configure terminal where configuration sessions are not used). It creates a system-named session if a session name is not specified, and it copies a snapshot of the current running-config into the session’s data structure as the basis of further configuration changes.
  • CLI configuration commands: The user can run any commands inside the session.
  • rollback clean-config: The user can run the rollback command to revert the session configuration to the factory-default configuration (or clean configuration).
  • show session-config: The user can run show session-config to show the session configuration, which will be the future running-config after committing.
  • commit: User issues commit to commit the changes, which will replace the current running-config.
  • abort: To abort the session and throw away all changes.
  • exit: The user can exit from the session and return to the same session by running the configure session again.
  • For named session: More than one CLI instance can enter the same session and change the session configuration. After the session commits in any of the CLIs, no other CLI can commit or make any other changes in that session.
Note: committing a configuration session replaces running-config with the session configuration, which consists of the running configuration at the initial session and the commands entered as part of the session. Any changes made to running-config since the initiation of the session overwrite when the session is in the commit stage.

Configure Replace

The command configure replace <URL> replaces the current running-config with the configuration saved in <URL>. By default, configure replace <URL> will replace running-config only if the configuration in <URL> loads without errors. The command configure replace <URL> ignore-errors force the operation even if there are errors.

Note: The command copy <URL> running-config applies a saved configuration file to the system and appends that configuration to the current running-config (instead of replacing it). However, Arista recommends using the CLI command configure replace <URL> to streamline the process of deterministically restoring the system to a known good configuration.

The normal workflow internally uses a configuration session to perform the replace.

Configuration CLI

In the CLI, execute the following configuration steps to create a configuration session.

  1. configure session [name of session]
    Create or enter a session. If a name is not specified, it automatically generates. The user is n the session configuration mode, and the prompt will change to show the first six characters of the session name. Designating the name of a session is optional. When name of session is not specified, a unique name is assigned.
    no configure session  name of session 
    Delete the specified configuration session. Designating the name of a session is required.
  2. commit
    Commit the changes made in the session. Configuration mode issues this command within the session.
    abort
    Abort the session, which is the same as deleting it. Configuration mode issues this command within the session.
  3. rollback clean-config
    Revert the configuration in the session to the clean, factory-default configuration. Configuration mode issues this command within the session.
  4. service configuration session max completed number
    Sets a limit on the maximum number of saved committed sessions.
  5. service configuration session max pending number
    Sets a limit on the maximum number of uncommitted sessions that can be outstanding.