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
- 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.
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.
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.