[Arista][EOS] Config Sessions

Kevin W Tech Notes
3 min readApr 4, 2020

--

Tech Keypoint Summary

1. Configu session provide a way to simulate JUNOS CLI behavior but less powerful.

2. CLIs configured by Config session are not take effect until the commit command is issued.

3. Multiple Config sessions are support in the same time.

In EOS 4.15.0F release, we have introduced the configuration sessions feature. Configuration sessions allow the user to issue configuration CLIs that do not take effect immediately. Instead, they are saved in a session with the given name. The session can be entered, modified and exited at any time without affecting the running configuration of the system. When the session is committed, the configuration that was modified in the session is copied into running configuration. The session can also be aborted or removed to remove the session completely and free up memory used by the session.

Config Sessions can be used to make a set of changes together, after verifying to make sure that they do not generate any CLI errors. They also allow the administrator to pre-provision a group of CLIs in a named session and commit it at the desired time.

Configuration

1. configure session [name] : 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.
2. no configure session name : delete the specified session.
3. commit : commit the changes made in the session. This has to be issued from within the session configuration mode.
4. abort : abort the session, same as deleting it. This has to be issued from within the session configuration mode.
5. rollback clean-config : Revert configuration in the session to clean, factory-default configuration. This has to be issued from within the session configuration mode.
6. service configuration session max completed num : Set a limit on the maximum number of committed sessions that are saved.
7. service configuration session max pending num : Set a limit on the maximum number of un-committed sessions that can be outstanding.

Show Commands

  1. show configuration sessions [detail] : Displays information about the sessions that exist in the system. The name of each session, its state (completed, pending, aborted, etc.) are displayed. If a user has currently entered the session, the user name and the associated terminal are also shown. With the detail flag, it also displays the process ID of the Cli process that is using the session. An asterisk (*) indicates that the user running the show command is currently in the marked session.
Arista(config-s-s2)#show configuration sessions detail
Maximum number of completed sessions: 1
Maximum number of pending sessions: 5
Name State User Terminal PID
---- ------------- ------------ -------------- ----
s1 completed
* s2 pending skommu vty870 7729

2. show session-config [diff]: This command has to be issued from within a session. It shows the session configuration, including the changes made in the session. The diff flag shows the differences with the running config, which helps highlight the changes made in the session.

Arista(config-s-s2)#show session-config diff

3. show session-config named name : Show the session configuration of the named session.

Syslog Messages

Syslog messages are issued when a session is created, deleted, entered, exited, committed or aborted.

2015-04-28 12:14:07.425075 7729 Log 0 %SYS-5-CONFIG_SESSION_ENTERED: User admin entered configuration session s1 on vty870 (172.22.225.142)
2015-04-28 12:14:54.340844 7729 Log 0 %SYS-5-CONFIG_SESSION_EXITED: User admin exited configuration session s1 on vty870 (172.22.225.142)
2015-04-28 12:15:20.023653 7729 Log 0 %SYS-5-CONFIG_SESSION_ABORTED: User admin aborted configuration session s1 on vty870 (172.22.225.142)
2015-04-28 12:13:59.778364 7729 Log 0 %SYS-5-CONFIG_SESSION_COMMIT_SUCCESS: User admin committed configuration session s2 successfully on vty870 (172.22.225.142)

--

--

No responses yet