Configure Session

The command configure session creates a configuration session in which CLI commands can be issued that do not take effect until the session is committed . Each configure session is saved with a unique name. A session can be entered, modified and exited at any time without impacting the currently running system configuration.

When a session is committed, the configuration that was modified during the session is copied into running-config, overwriting any other configuration changes made since the session was created. 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 that the changes in a deferred session be applied to the configuration of the router by entering a commit command and exiting the mode. Alternately, 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 are used to make sets of 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, then 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 at once by issuing the commit command.
  • configure session <name of session> and running-config: The user enters a session (versus configure terminal in the case where configuration sessions are not used). If a session name is not specified, a system named session is created. A snapshot of the current running-config is copied into the session’s data structure as the basis of further configuration changes.
  • CLI configuration commands: User can run any configuration commands inside the session.
  • rollback clean-config: User can run rollback command to revert the sessions configuration to the factory-default configuration (or clean configuration).
  • show session-config: User can run show session-config to show the sessions configuration, which will be the future running-config once committed.
  • 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: User can exit from the session, and later return to the same session by running configure session again.
  • For named session: More than one CLI instance can enter the same session and make changes to the session configuration. Once the session is committed 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 time the session was initiated plus the commands that were entered as part of the session. Any changes that were made to running-config since the session was initiated will be overwritten when the session is committed.

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 forces the operation even if there are errors.

Note: The command copy <URL> running-config was typically used to apply a saved configuration file to the system, and append that configuration to the current running-config (in lieu of replacing it). However, Arista recommends using the CLI command configure replace <URL> to streamline the process of deterministically restoring the system back 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 is automatically generated. The user is put in 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. This command must be issued from within the session configuration mode.
    abort
    Abort the session, which is the same as deleting it. This command must be issued from within the session configuration mode.
  3. rollback clean-config
    Revert configuration in the session to the clean, factory-default configuration. This command must be issued from within the session configuration mode.
  4. service configuration session max completed number
    Sets a limit on the maximum number of committed sessions that are saved.
  5. service configuration session max pending number
    Sets a limit on the maximum number of uncommitted sessions that can be outstanding.