How to Use Arista Configure Session?

How to Use Arista Configure Session?
In: Network

Arista's CLI might look a lot like Cisco's, but there's a unique feature I want to talk about in today's blog post called 'configure session'. Unlike the usual configure terminal where changes take effect immediately, using configure session on Arista lets you make changes without immediately applying them.

This gives you the chance to review and verify everything before going live. You can even see what's different from the current running-config and decide if you still want to apply the changes. There is also a commit-timer option that reverts changes automatically after a set time unless you commit the changes before the timer expires. If you've used Juniper Junos devices, this might sound pretty familiar.

Arista Configure Session Example

Let’s look at an example to better understand how to use the configure session command with Arista. Imagine you need to create a new VLAN. Instead of directly entering configure terminal and making changes that affect your device immediately, you can start a session that branches off from your current running-config. This way, any changes you make won’t impact the running config right away.

configure session <SESSION_NAME>
access-01#configure session vlan_15
access-01(config-s-vlan_15)#vlan 15
access-01(config-s-vlan_15-vlan-15)#name dummy
access-01(config-s-vlan_15-vlan-15)#show session-config diff
--- system:/running-config
+++ session:/vlan_15-session-config
+vlan 15
+   name dummy
access-01(config-s-vlan_15-vlan-15)#commit timer 00:01:00
access-01#
access-01#show vlan 
VLAN  Name                             Status    Ports
----- -------------------------------- --------- -------------------------------
1     default                          active    Et1, Et2
10    cctv                             active    
11    voip                             active    
12    apple-tv                         active    
15    dummy                            active    
access-01#configure session vlan_15 commit

Let’s see what happens if the commit timer expires without a final commit. To demonstrate, I'm going to create another VLAN 20.

aggr-01(config)#configure session vlan_20
aggr-01(config-s-vlan_20)#vlan 20
aggr-01(config-s-vlan_20-vlan-20)#name another_dummy

aggr-01(config-s-vlan_20-vlan-20)#commit timer 00:00:20

aggr-01#show vlan 
VLAN  Name                             Status    Ports
----- -------------------------------- --------- -------------------------------
1     default                          active    Et1, Et2, Et5, Et6
10    cctv                             active    
11    voip                             active    
12    apple-tv                         active    
20    another_dummy                    active    

Here is the output after 20 seconds (the new VLAN has disappeared)

aggr-01#show vlan 
VLAN  Name                             Status    Ports
----- -------------------------------- --------- -------------------------------
1     default                          active    Et1, Et2, Et5, Et6
10    cctv                             active    
11    voip                             active    
12    apple-tv                         active  
Written by
Suresh Vina
Tech enthusiast sharing Networking, Cloud & Automation insights. Join me in a welcoming space to learn & grow with simplicity and practicality.
Comments
More from Packetswitch
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Packetswitch.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.