Configuring Session Manager

This chapter describes how to configure Session Manager on Cisco NX-OS devices.

This chapter contains the following sections:

About Session Manager

Session Manager allows you to implement your configuration changes in batch mode. Session Manager works in the following phases:

  • Configuration session—Creates a list of commands that you want to implement in Session Manager mode.

  • Validation—Provides a basic semantic check on your configuration. Cisco NX-OS returns an error if the semantic check fails on any part of the configuration.

  • Verification—Verifies the configuration as a whole, based on the existing hardware and software configuration and resources. Cisco NX-OS returns an error if the configuration does not pass this verification phase.

  • Commit—Cisco NX-OS verifies the complete configuration and applies the changes to the device. If a failure occurs, Cisco NX-OS reverts to the original configuration.

  • Abort—Discards the configuration changes before implementation.

You can optionally end a configuration session without committing the changes. You can also save a configuration session.

High Availability

Session Manager sessions remain available after a supervisor switchover. Sessions are not persistent across a software reload.

Prerequisites for Session Manager

Make sure that you have the privilege level required to support the Session Manager commands that you plan to use.

Guidelines and Limitations for Session Manager

Session Manager has the following configuration guidelines and limitations:

  • Configuration for only one service access point (SAP) can be performed using one session.

  • Configuration sessions are not persistent across reloads.

  • Session Manager supports only access control list (ACL) and quality of service (QoS) features.

  • You can create up to 32 configuration sessions.

  • You can configure a maximum of 20,000 commands across all sessions.

  • You cannot simultaneously execute configuration commands in more than one configuration session or configuration terminal mode. Parallel configurations (for example, one configuration session and one configuration terminal) could cause validation or verification failures in the configuration session.

  • If an interface reloads while you are configuring it in a configuration session, Session Manager can accept the commands even if the interface is not present in the device.

Configuring Session Manager


Note


Be aware that the Cisco NX-OS commands might differ from Cisco IOS commands.

Creating a Session

You can create up to 32 configuration sessions.

SUMMARY STEPS

  1. configure session name
  2. (Optional) show configuration session [name]
  3. (Optional) save location

DETAILED STEPS

  Command or Action Purpose

Step 1

configure session name

Example:

switch# configure session myACLs
switch(config-s)#

Creates a configuration session and enters session configuration mode. The name can be any alphanumeric string.

Displays the contents of the session.

Step 2

(Optional) show configuration session [name]

Example:

switch(config-s)# show configuration session myACLs
(Optional)

Displays the contents of the session.

Step 3

(Optional) save location

Example:

switch(config-s)# save bootflash:sessions/myACLs
(Optional)

Saves the session to a file. The location can be in bootflash:, slot0:, or volatile:.

Configuring ACLs in a Session

You can configure ACLs within a configuration session.

SUMMARY STEPS

  1. configure session name
  2. ip access-list name
  3. (Optional) permit protocol source destination
  4. interface interface-type number
  5. ip access-group name {in | out}
  6. (Optional) show configuration session [name]

DETAILED STEPS

  Command or Action Purpose

Step 1

configure session name

Example:

switch# configure session myacls
switch(config-s)#

Creates a configuration session and enters session configuration mode. The name can be any alphanumeric string.

Step 2

ip access-list name

Example:

switch(config-s)# ip access-list acl1
switch(config-s-acl)#

Creates an ACL and enters a configuration mode for that ACL.

Step 3

(Optional) permit protocol source destination

Example:

switch(config-s-acl)# permit tcp any any
(Optional)

Adds a permit statement to the ACL.

Step 4

interface interface-type number

Example:

switch(config-s-acl)# interface ethernet 2/1
switch(config-s-if)#

Enters interface configuration mode.

Step 5

ip access-group name {in | out}

Example:

switch(config-s-if)# ip access-group acl1 in

Specifies the direction of traffic the access group is applied to.

Step 6

(Optional) show configuration session [name]

Example:

switch(config-s-if)# show configuration session myacls
(Optional)

Displays the contents of the session.

Verifying a Session

Use the following command in session mode to verify a session:

Command

Purpose

verify [verbose]

Example:

switch(config-s)# verify

Verifies the configuration as a whole, based on the existing hardware and software configuration and resources. Cisco NX-OS returns an error if the configuration does not pass this verification.

Committing a Session

Use the following command in session mode to commit a session:

Command

Purpose

commit [verbose]

Example:

switch(config-s)# commit

Validates the configuration changes made in the current session and applies valid changes to the device. If the validation fails, Cisco NX-OS reverts to the original configuration.

Saving a Session

Use the following command in session mode to save a session:

Command

Purpose

save location

Example:

switch(config-s)# save bootflash:sessions/myACLs

(Optional) Saves the session to a file. The location can be in bootflash:, slot0:, or volatile:.

Discarding a Session

Use the following command in session mode to discard a session:

Command

Purpose

abort

Example:

switch(config-s)# abort
switch#

Discards the configuration session without applying the changes.

Verifying the Session Manager Configuration

To display the Session Manager configuration information, perform one of the following tasks:

Command

Purpose

show configuration session [name]

Displays the contents of the configuration session.

show configuration session status [name]

Displays the status of the configuration session.

show configuration session summary

Displays a summary of all the configuration sessions.

Configuration Example for Session Manager

This example shows how to create and commit an ACL configuration using Session Manager:

switch# configure session ACL_tcp_in
Config Session started, Session ID is 1
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-s)# ip access-list ACL1
switch(config-s-acl)# permit tcp any any
switch(config)# interface e 7/1
switch(config-if)# ip access-group ACL1 in
switch(config-if)# exit
switch(config)# exit
switch# config session ACL_tcp_in
Config Session started, Session ID is 1
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-s)# verify
Verification Successful
switch(config-s)# commit
Commit Successful
switch#

Additional References

Related Documents

Related Topic Document Title
Configuration files Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide