Guest

Cisco IOS Software Releases 12.3 T

Exclusive Configuration Change Access (Config Lock)

Table Of Contents

Exclusive Configuration Change Access

Contents

Information About Exclusive Configuration Change Access and Access Session Locking

Exclusive Configuration Change Access Functionality

Access Session Locking

How to Use Exclusive Configuration Change Access and Access Session Locking

Enabling Exclusive Configuration Change Access and Access Session Locking

Obtaining Exclusive Configuration Change Access

Monitoring and Troubleshooting the Exclusive Configuration Change Access and Access Session Locking Feature

Configuration Examples for Exclusive Configuration Change Access and Access Session Locking

Configuring an Exclusive Lock in Auto Mode: Example

Configuring an Exclusive Lock in Manual Mode: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

configuration mode exclusive

configure terminal

debug configuration lock

show configuration lock

Feature Information for Exclusive Configuration Change Access and Access Session Locking


Exclusive Configuration Change Access


Document Version 21 (June 2007)
First Published: February 28, 2005

Exclusive Configuration Change Access (also called the "Configuration Lock" feature) allows you to have exclusive change access to the Cisco IOS running configuration, preventing multiple users from making concurrent configuration changes.

The Access Session Locking featurette extends the Exclusive Configuration Change Access feature such that show and debug commands entered by the user holding the configuration lock always have execution priority; show and debug commands entered by other users are only allowed to run after the processes initiated by the configuration lock owner have finished.

The Exclusive Configuration Change Access feature ("exposed lock") is complementary with the locking mechanism in the Configuration Replace and Configuration Rollback feature ("rollback lock").

This document applies to software functionality in Cisco IOS Software Releases 12.3T/12.4/12.4T and 12.2S/12.2SR/12.2SX. For updated information, see the latest documentation available for your release.

Contents

Information About Exclusive Configuration Change Access and Access Session Locking

How to Use Exclusive Configuration Change Access and Access Session Locking

Configuration Examples for Exclusive Configuration Change Access and Access Session Locking

Additional References

Command Reference

Feature Information for Exclusive Configuration Change Access and Access Session Locking

Information About Exclusive Configuration Change Access and Access Session Locking

To use the Exclusive Configuration Change Access and Access Session Locking feature, you should understand the following concepts:

Exclusive Configuration Change Access Functionality

Access Session Locking

Exclusive Configuration Change Access Functionality

Devices running Cisco IOS software maintain a running configuration that determines the configuration state of the device. Changes to the running configuration alter the behavior of the device. Because Cisco IOS software allows multiple users to change the running configuration via the device CLI (including the device console and telnet SSH), in some operating environments it would be beneficial to prevent multiple users from making concurrent changes to the Cisco IOS running configuration. Temporarily limiting access to the Cisco IOS running configuration prevents inadvertent conflicts or cases where two users attempt to configure the same portion of the running configuration.

Exclusive configuration change access provides a mechanism to prevent concurrent configuration of Cisco IOS software by multiple users.

This feature provides exclusive change access to the Cisco IOS running configuration from the time you enter global configuration mode by using the configure terminal command. This gives the effect of a "configuration lock," preventing other users from changing the Cisco IOS running configuration. The configuration lock is automatically released when the user exits Cisco IOS configuration mode.

The Exclusive Configuration Change Access feature is enabled using the configuration mode exclusive command in global configuration mode. Exclusive Configuration Change Access can be set to auto, so that the Cisco IOS configuration mode is locked whenever anyone uses the configure terminal command, or it can be set to manual, so that the Cisco IOS configuration mode is locked only when the configure terminal lock command is issued.

The Exclusive Configuration Change Access feature is complementary with the locking mechanism for the Configuration Replace and Configuration Rollback feature introduced in Cisco IOS Release 12.2(25)S and 12.3(7)T.

Access Session Locking

Access Session Locking, in addition to preventing concurrent configuration access, provides an option to prevent simultaneous processes, such as a show command entered by another user, from executing while other configuration commands are being executed. When this feature is enabled, the commands entered by the user with the configuration lock (such as configuration commands) always have priority over commands entered by other users.

How to Use Exclusive Configuration Change Access and Access Session Locking

This section contains the following procedures:

Enabling Exclusive Configuration Change Access and Access Session Locking (required)

Obtaining Exclusive Configuration Change Access (optional)

Monitoring and Troubleshooting the Exclusive Configuration Change Access and Access Session Locking Feature (optional)

Enabling Exclusive Configuration Change Access and Access Session Locking

Perform this task to gain exclusive access to the Cisco IOS configuration mode.

SUMMARY STEPS

1. enable

2. configure terminal

3. configuration mode exclusive {auto | manual}

4. end

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

configuration mode exclusive {auto | manual}

Example:

Router(config)# configuration mode exclusive auto

Enables exclusive configuration change access (configuration lock feature). When enabled, configuration sessions are performed in single-user (exclusive) mode.

The auto keyword automatically locks the configuration session whenever the configure terminal command is used. This is the default.

The manual keyword allows you to choose to lock the configuration session manually or leave it unlocked. If you use the manual keyword, you must perform the task described in the "Obtaining Exclusive Configuration Change Access" section.

Step 4 

end

Example:

Router(config)# end

Ends your configuration session and returns the CLI to privileged EXEC mode.

Obtaining Exclusive Configuration Change Access

Perform this task to obtain exclusive configuration change access for the duration of your configuration session. Use of the lock keyword with the configure terminal command is only necessary if the exclusive configuration mode has been set to manual (see the "Enabling Exclusive Configuration Change Access and Access Session Locking" section).

SUMMARY STEPS

1. enable

2. configure terminal

3. configure terminal lock

4. Configure the system by entering your changes to the running configuration.

5. end
or
exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

configure terminal lock

Example:

Router(config)# configure terminal lock

(Optional) Locks the Cisco IOS software in exclusive (single-user) mode.

This command can only be used if you have previously enabled configuration locking by using the configuration mode exclusive command.

Available only in Cisco IOS Release 12.3(14)T or later.

Step 4 

Configure the system by entering your changes to the running configuration.

Step 5 

end

or

exit

Example:

Router(config)# end

Router#

or

Example:

Router(config)# exit

Router#

Ends your configuration session, automatically releases the session lock obtained in Step 1, and exits to privileged EXEC mode.

Note Either the end command, the exit command, or the Ctrl-Z key combination releases the configuration lock. Use of the end command is recommended.

Monitoring and Troubleshooting the Exclusive Configuration Change Access and Access Session Locking Feature

Perform any or all of the steps in this task to monitor or troubleshoot the Exclusive Configuration Change Access and Access Session Locking feature.

SUMMARY STEPS

1. show configuration lock

2. debug configuration lock

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

show configuration lock

Example:

Router# show configuration lock

Displays the status and details of current configuration locks, including the owner, user, terminal, lock state, and lock class.

Step 3 

debug configuration lock

Example:

Router(config)# debug configuration lock

Enables debugging of Cisco IOS configuration locks (exposed class locks or rollback class locks).

Step 4 

end

or

exit

Example:

Router(config)# end

or

Example:

Router(config)# exit

Returns to privileged EXEC mode.


Step 1 show configuration lock

Use this command to display the status and details of any current configuration locks, including the owner, user, terminal, lock state, and lock class.

If you cannot enter global configuration mode, you can use this command to determine if the configuration session is currently locked by another user, and who that user is.

Router# show configuration lock

Parser Configure Lock
------------------------------------------------------
Owner PID                         : 3
User                              : unknown
TTY                               : 0
Type                              : EXCLUSIVE
State                             : LOCKED
Class                             : EXPOSED
Count                             : 1
Pending Requests                  : 0
User debug info                   : configure terminal 
Session idle state                : TRUE
No of exec cmds getting executed  : 0
No of exec cmds blocked           : 0
Config wait for show completion   : FALSE
Remote ip address                 : Unknown
Lock active time (in Sec)         : 6
Lock Expiration timer (in Sec)    : 593
Router(config)#

Step 2 debug configuration lock

Use this command to enable debugging of Cisco IOS configuration locks (exposed class locks or rollback class locks).

Router# debug configuration lock 

Session1 from console
==========================

Router# configure terminal lock 
Configuration mode locked exclusively. The lock will be cleared once you exit out of 
configuration mode using end/exit
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Parser : LOCK REQUEST in EXCLUSIVE mode
Parser: <configure terminal lock> - Config. Lock requested by process <3> client <PARSER 
Client>
Parser: <configure terminal lock> - Config. Lock acquired successfully !
Router(config)#

Configuration Examples for Exclusive Configuration Change Access and Access Session Locking

This section provides the following configuration examples:

Configuring an Exclusive Lock in Auto Mode: Example

Configuring an Exclusive Lock in Manual Mode: Example

Configuring an Exclusive Lock in Auto Mode: Example

The following example shows how to enable the exclusive lock in auto mode for single-user auto configuration mode using the configuration mode exclusive auto command. Once the Cisco IOS configuration file is locked exclusively, you can verify this configuration by using the show configuration lock command.

Router#
Router# configure terminal 
Router(config)# configuration mode exclusive auto 
Router(config)# exit 

Router#
Router# configure terminal 
! Locks configuration mode exclusively.

Router(config)# show configuration lock

Parser Configure Lock

Owner PID        :  10
User             :  User1
TTY              :  3
Type             :  EXCLUSIVE
State            :  LOCKED
Class            :  Exposed 
Count            :  0 
Pending Requests :  0 
User debug info  :  0 

Configuring an Exclusive Lock in Manual Mode: Example

The following example shows how to enable the exclusive locking feature in manual mode by using the configuration mode exclusive manual command. Once you have configured manual exclusive mode, you can lock the configuration mode by using the configure terminal lock command. In this mode, the configure terminal command will not automatically lock the parser configuration mode.

Router#
Router# configure terminal
Router(config)# configuration mode exclusive manual
Router(config)# exit

Router# configure terminal lock
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#

*Mar 25 17:02:45.928:  Configuration mode locked exclusively. The lock will be cleared 
once you exit out of configuration mode using end/exit

Additional References

The following sections provide references related to the Exclusive Configuration Change Access and Access Session Locking feature.

Related Documents

Related Topic
Document Title

Commands for managing configuration files

Cisco IOS Configuration Fundamentals and Network Management Command Reference, Release 12.3T

Information about managing configuration files

"Managing Configuration Files" chapter in the Cisco IOS Configuration Fundamentals and Network Management Configuration Guide, Release 12.3


Standards

Standard
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIB
MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFC
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

The Cisco Technical Support & Documentation website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, tools, and technical documentation. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/techsupport


Command Reference

This section documents modified commands only.

configuration mode exclusive

configure terminal

debug configuration lock

show configuration lock

configuration mode exclusive

To enable single-user (exclusive) access functionality for the Cisco IOS command-line interface (CLI), use the configuration mode exclusive command in global configuration mode. To disable the single-user access (configuration locking) feature, use the no form of this command.

Syntax for Release 12.3T:

configuration mode exclusive {auto | manual}

no configuration mode exclusive {auto | manual}

Syntax for Release 12.0(31)S, 12.2(33)SRA, and Later Releases:

configuration mode exclusive {auto | manual} [expire seconds] [lock-show] [interleave] [terminate] [config_wait seconds] [retry_wait seconds]

Syntax Description

auto

Automatically limits configuration to single-user mode.

manual

Allows you to manually limit the configuration file to single-user mode.

expire seconds

(Optional) Specifies the number of seconds in which the configuration lock is released after the user stops making configuration changes.

lock-show

(Optional) Gives priority to configuration commands being executed from the exclusive configuration session, and prevents the execution of show commands.

interleave

(Optional) Allows show commands from sessions that are not holding the configuration lock to be executed when the user in the session holding the configuration lock is not making configuration changes.

Note If you entered lock-show, you should enter this keyword.

terminate

(Optional) Causes the configuration command executed from the exclusive configuration session to terminate show and clear commands being executed in other sessions.

config_wait seconds

(Optional) Amount of time, in seconds, that a configuration command entered by a user in single user mode waits for show commands entered by other users to finish being executed. If the show command is still being executed when the timer expires and if the terminate option is set, the configuration command terminates the show command. If the configuration command completes execution before the specified number of seconds, the show command begins execution.

retry_wait seconds

(Optional) Specifies the amount of time, in seconds, that show and clear EXEC commands will wait for a configuration command entered by a user in exclusive configuration mode to complete execution.

If the configuration command is still being executed when the specified amount of time has passed, the EXEC commands generate an error message and are terminated.

If execution of the configuration command is completed before the specified number of seconds, the EXEC commands are executed.


Defaults

Single-user mode is disabled.

Command Modes

Global configuration

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.0(31)S

This command was integrated into Cisco IOS Release 12.0(31)S, and the command syntax was extended. The following keywords were added: expire, lock-show, interleave, terminate, config_wait, and retry_wait. New functionality was added, including Access Session Locking.

12.2(33)SRA

The extended version of this command was made available in Cisco IOS Release 12.2 SR.

12.4(11)T

The extended version of this command was made available in Cisco IOS Release 12.4 T.


For documentation updates beyond the releases listed here, see the latest documentation available for your release.

Usage Guidelines

The configuration mode exclusive command enables the exclusive configuration lock feature. The exclusive configuration lock allows single-user access to configuration modes using single-user configuration mode. While the device configuration is locked, no other users can enter configuration commands.

Users accessing the device using the state-full, session-based transports (telnet, SSH) are able to enter single-user configuration mode. The user enters single-user configuration mode by acquiring the exclusive configuration lock using the configure terminal lock privileged EXEC mode command. The configuration lock is released when the user exits configuration mode by using the end or exit command, or by pressing Ctrl-Z. While a user is in single-user configuration mode, no other users can configure the device. Users accessing CLI options through stateless protocols (that is, the HTTP web-based user interface) cannot access single-user configuration mode. (However, an API allows the stateless transports to lock the configuration mode, complete its operations, and release the lock.)

Examples

The following example shows how to configure the configuration file for single-user autoconfiguration mode by using the configuration mode exclusive auto command. Use the configuration terminal command to enter global configuration mode and lock the configuration mode exclusively. After the Cisco IOS configuration mode is locked exclusively, you can verify this configuration by entering the show configuration lock command.

Router# configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# configuration mode exclusive auto 
Router(config)# end 

Router# show running-configuration | include config 
Building configuration... 
Current configuration : 2296 bytes 
configuration mode exclusive auto <========== auto policy 
Router# 

Router# configure terminal ? <======== lock option not displayed when in auto policy 
 
Router# configure terminal <======= acquires the lock 

The configuration mode is locked exclusively. The lock is cleared after you exit from configuration mode by entering end or exit.

Enter configuration commands, one per line. End with CNTL/Z. 
Router(config)#  

Router(config)# show configuration lock 
Parser Configure Lock 
--------------------- 
Owner PID : 3 
User : unknown 
TTY : 0 
Type : EXCLUSIVE 
State : LOCKED 
Class : EXPOSED 
Count : 1 
Pending Requests : 0 
User debug info : configure terminal  
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 6 
Lock Expiration timer (in Sec) : 593 
Router(config)# 

Router(config)# end <========= releases the lock 
Router# 

Router# show configuration lock 
Parser Configure Lock 
--------------------- 
Owner PID : -1 
User : unknown 
TTY : -1 
Type : NO LOCK 
State : FREE 
Class : unknown 
Count : 0 
Pending Requests : 0 
User debug info :  
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 0 
Lock Expiration timer (in Sec) : 0 
Router# 

The following example shows how to enable the exclusive locking feature in manual mode by using the configuration mode exclusive manual command. Once you have configured manual exclusive mode, you can lock the configuration mode by using the configure terminal lock command. In this mode, the configure terminal command does not automatically lock the parser configuration mode. The lock is cleared after you exit from configuration mode by entering end or exit.

Router#
Router# configure terminal  
Configuration mode locked exclusively. The lock will be cleared once you exit out of 
configuration mode using end/exit 
Enter configuration commands, one per line. End with CNTL/Z. 
Router(config)# 

Router(config)# configuration mode exclusive manual  
Router(config)# end 
Router# 
Router# show running-configuration | include configuration 
Building configuration... 
Current configuration : 2298 bytes 
configuration mode exclusive manual <==== 'manual' policy 

Router# show configuration lock 
Parser Configure Lock 
--------------------- 
Owner PID : -1 
User : unknown 
TTY : -1 
Type : NO LOCK 
State : FREE 
Class : unknown 
Count : 0 
Pending Requests : 0 
User debug info :  
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 0 
Lock Expiration timer (in Sec) : 0 
Router# 

Router# configure terminal ?  
lock Lock configuration mode <========= 'lock' option displayed in 'manual' policy 
 
Router# configure terminal <============ `configure terminal' won't acquire lock 
automatically 
Enter configuration commands, one per line. End with CNTL/Z. 

Router(config)# show configuration lock  
Parser Configure Lock 
--------------------- 
Owner PID : -1 
User : unknown 
TTY : -1 
Type : NO LOCK 
State : FREE 
Class : unknown 
Count : 0 
Pending Requests : 0 
User debug info :  
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 0 
Lock Expiration timer (in Sec) : 0 
Router(config)# end  

Router# show configuration lock  
Parser Configure Lock 
--------------------- 
Owner PID : -1 
User : unknown 
TTY : -1 
Type : NO LOCK 
State : FREE 
Class : unknown 
Count : 0 
Pending Requests : 0 
User debug info :  
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 0 
Lock Expiration timer (in Sec) : 0 
Router# 
Router# configure  
Router# configure terminal  
Router# configure terminal ?  
lock Lock configuration mode <======= 'lock' option displayed when in 'manual' policy 
 
Router# configure terminal lock  
Router# configure terminal lock <============ acquires exclusive configuration lock 

Configuration mode is locked exclusively. The lock is cleared after you exit from 
configuration mode by entering the end or exit command.  
 
Enter configuration commands, one per line. End with CNTL/Z. 
Router(config)# 

Router(config)# show configuration lock  
Parser Configure Lock 
--------------------- 
Owner PID : 3 
User : unknown 
TTY : 0 
Type : EXCLUSIVE 
State : LOCKED 
Class : EXPOSED 
Count : 1 
Pending Requests : 0 
User debug info : configure terminal lock 
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 5 
Lock Expiration timer (in Sec) : 594 

Router(config)# end <================ 'end' releases exclusive configuration lock 
Router# 

Router# show configuration lock 
Parser Configure Lock 
--------------------- 
Owner PID : -1 
User : unknown 
TTY : -1 
Type : NO LOCK 
State : FREE 
Class : unknown 
Count : 0 
Pending Requests : 0 
User debug info :  
Session idle state : TRUE 
No of exec cmds getting executed : 0 
No of exec cmds blocked : 0 
Config wait for show completion : FALSE 
Remote ip address : Unknown 
Lock active time (in Sec) : 0 
Lock Expiration timer (in Sec) : 0 
Router#

Related Commands

Command
Description

configure terminal

Enters global configuration mode.

debug configuration lock

Enables debugging of the Cisco IOS configuration lock.

show configuration lock

Displays information about the lock status of the running configuration file during a configuration replace operation.


configure terminal

To enter global configuration mode, use the configure terminal command in privileged EXEC mode.

configure terminal [lock]

Syntax Description

lock

(Optional) Locks the running configuration into exclusive configuration mode for the duration of your configuration session. This keyword only functions if the configuration mode exclusive command was previously enabled.


Command Modes

Privileged EXEC

Command History

Release
Modification

10.0

This command was introduced.

12.3(14)T

The lock keyword option was added.

12.0(31)S

This command was integrated into Cisco IOS Release 12.0(31)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.


Usage Guidelines

Use this command to enter global configuration mode. Note that commands in this mode are written to the running configuration file as soon as you enter them (using the Enter key/Carriage Return).

After you enter the configure terminal command, the system prompt changes from <router-name># to <router-name>(config)#, indicating that the router is in global configuration mode. To leave global configuration mode and return to privileged EXEC mode, type exit or press Ctrl-Z.

To view the changes to the configuration you have made, use the more system:running-config command or show running-config command in user EXEC or privileged EXEC mode.

Configuration Locking

The first user to enter the configure terminal lock command acquires the configuration lock (exclusive configuration mode).

Examples

In the following example, the user enters global configuration mode and locks the Cisco IOS software in exclusive mode:

Router# configure terminal
Router(config)# configure terminal lock
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

Related Commands

Command
Description

boot config

Specifies the device and filename of the configuration file from which the router configures itself during initialization (startup).

configuration mode exclusive

Enables locking of the configuration file for single user access.

copy running-config startup-config

or

copy system:running-config nvram:startup-config

Saves the running configuration as the startup configuration file.

show running-config

or

more system:running-config

Displays the currently running configuration.


debug configuration lock

To enable debugging of the Cisco IOS configuration lock, use the debug configuration lock command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug configuration lock

no debug command lock

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.0(31)S

This command was integrated into Cisco IOS Release 12.0(31)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.


Examples

The following is sample output with debug configuration lock enabled (assuming that the feature is enabled using the configuration mode exclusive manual command in global configuration mode):

Router# debug configuration lock

Session1 from console
==========================

Router# configure terminal lock
Configuration mode locked exclusively. The lock will be cleared once you exit out of 
configuration mode using end/exit
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Parser : LOCK REQUEST in EXCLUSIVE mode
Parser: <configure terminal lock> - Config. Lock requested by process <3> client <PARSER 
Client>
Parser: <configure terminal lock> - Config. Lock acquired successfully !
Router(config)#


Session2 VTY (User from session2 is trying to enter single user config (exclusive) config 
mode)
=================================

Router# configure terminal lock
Configuration mode locked exclusively by user 'unknown' process '3' from terminal '0'. 
Please try later.
Router#


Session1 from console
=======================
Router(config)#
Parser : LOCK REQUEST in EXCLUSIVE mode
Parser: <configure terminal lock> - Config. Lock requested by process <104> client <PARSER 
Client>
Parser: <configure terminal lock> - NON_BLOCKING : Config mode locked <EXCLUSIVE> owner 
<3>
Router(config)#

Router(config)# end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Parser: <Configure terminal> - Config. EXC UnLock requested by user<3>
Parser: <Configure terminal> - Config UNLOCKED !
Router#

Related Commands

Command
Description

configuration mode exclusive

Enables single-user (exclusive) access functionality for the Cisco IOS CLI.

show configuration lock

Displays information about the lock status of the running configuration file during a configuration replace operation.


show configuration lock

To display information about the lock status of the running configuration file during a configuration replace operation, use the show configuration lock command in privileged EXEC mode.

show configuration lock

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

The output of this command was updated to display the configuration locking class.

12.0(31)S

The command output was enhanced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.


Examples

The following is sample output from the show configuration lock command when the running configuration file is locked by another user.

Cisco IOS Release 12.2(25)S, Release 12.2(28)SB, Release 12.3(14)T, and Later Releases

Router# configure terminal  
Enter configuration commands, one per line. End with CNTL/Z. 

Router(config)# configuration mode exclusive ?  
auto Lock configuration mode automatically 
manual Lock configuration mode on-demand 

Router(config)# configuration mode exclusive auto  
Router# end  

Router# show running-config | include configuration  
configuration mode exclusive auto 
Router# 
 
Router# configure terminal <========= acquires the lock 
Enter configuration commands, one per line. End with CNTL/Z. 
Router# 
Router(config)# show configuration lock 
Parser Configure Lock 
--------------------- 
Owner PID : 3 
User : unknown 
TTY : 0 
Type : EXCLUSIVE 
State : LOCKED 
Class : EXPOSED 
Count : 1 
Pending Requests : 0 
User debug info : configure terminal  
Router(config)# 
Router(config)# end <======== releases the lock 

The following is sample output from the show configuration lock command when the running configuration file is not locked by another user.

Router# show configuration lock
 
Parser Configure Lock 
--------------------- 
Owner PID : -1 
User : unknown 
TTY : -1 
Type : NO LOCK 
State : FREE 
Class : unknown 
Count : 0 
Pending Requests : 0 
User debug info :  
Router#

Cisco IOS Release 12.0(31)S, 12.2(33)SRA, and Later Releases

Router# show configuration lock 

Parser Configure Lock
------------------------------------------------------
Owner PID                         : 3
User                              : unknown
TTY                               : 0
Type                              : EXCLUSIVE
State                             : LOCKED
Class                             : EXPOSED
Count                             : 1
Pending Requests                  : 0
User debug info                   : configure terminal 
Session idle state                : TRUE
No of exec cmds getting executed  : 0
No of exec cmds blocked           : 0
Config wait for show completion   : FALSE
Remote ip address                 : Unknown
Lock active time (in Sec)         : 6
Lock Expiration timer (in Sec)    : 593
Router(config)#

Table 1 describes the significant fields shown in the displays.

Table 1 show configuration lock Field Descriptions

Field
Description

Owner PID

Process identifier (PID) of the process that owns the lock.

User

Owner's username.

TTY

Owner's terminal number.

Type

Lock type (EXCLUSIVE/COUNTER/NO LOCK).

State

State of the lock (FREE/LOCKED).

Class

Classification of users of the lock (EXPOSED/ROLLBACK). Processes other than ROLLBACK belong to the EXPOSED class.

Count

In the case of a counter lock, total number of processes holding the lock.

Pending Requests

Total number of processes blocked by the lock.

User debug info

Any string given by the process (used for debugging only).

Session idle state

Indicates whether the user in an access session locking session is idle. Displays TRUE or FALSE.

No of exec cmds getting executed

Total number of EXEC commands (show and clear) being executed simultaneously from different sessions.

No of exec cmds blocked

Total number of EXEC commands (show and clear) waiting for the configuration command (running from the access session locking session) to complete its execution.

Config wait for show completion

Indicates whether a configuration command executed in an access session locking session is waiting for the completion of the show command being executed simultaneously from a different session. Displays TRUE or FALSE.

Remote ip address

IP address of the terminal from which the user telneted to the router.

Lock active time (in Sec)

Amount of time, in seconds, that elapsed since the lock was acquired.

Lock Expiration timer (in Sec)

The amount of time, in seconds, that expires before the lock is automatically released.


The following example shows how to configure the configuration file for single user auto configuration mode (using the configuration mode exclusive auto command). Use the configure terminal command to enter global configuration mode and lock the configuration mode exclusively. Once the Cisco IOS configuration mode is locked exclusively, you can verify the lock using the show configuration lock command.

Router#
Router# configure terminal 
Router(config)# configuration mode exclusive auto 
Router(config)# end 

Router# configure terminal 
Router(config)#


Router(config)# show configuration lock

Parser Configure Lock

Owner PID        :  10
User             :  User1
TTY              :  3
Type             :  EXCLUSIVE
State            :  LOCKED
Class            :  Exposed
Count            :  0
Pending Requests :  0
User debug info  :  0

Related Commands

Command
Description

configuration mode exclusive

Enables single-user (exclusive) access functionality for the Cisco IOS CLI.

configure replace

Replaces the current running configuration with a saved Cisco IOS configuration file.

debug configuration lock

Enables debugging of the Cisco IOS configuration lock.


Feature Information for Exclusive Configuration Change Access and Access Session Locking

Table 2 contains document revision information.

Feature documentation is updated and republished for major Cisco IOS software releases.

This document may not contain the latest information for your software release. Please use the document publication date and associated release version number to determine if this document applies to your Cisco IOS software environment.

Table 2 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature. Updated feature support information is available from Cisco Feature Navigator at http://www.cisco.com/go/cfn.


Note This document applies to software functionality in Cisco IOS Software Releases 12.3T/12.4/12.4T and 12.2S/12.2SR/12.2SX.
For updated information, including documentation corrections and updates, see the latest documentation available for your release.


Table 2 Document Revision Information for Exclusive Configuration Change Access and Access Session Locking 

Document Version (update or revision)
Published for Release (Version):
Additional Information

First Publication - February 28, 2005

12.3(14)T

The Configuration Lock feature was introduced in Release 12.3 T.

 

12.0(31)S

The Configuration Lock feature was integrated in Cisco IOS Release 12.0 S.

The Access Session Locking feature extension (featurette) was implemented.

The configuration mode exclusive command was extended to include the following keyword options: expire, lock-show, interleave, terminate, config_wait, and retry_wait.

The output of the show configuration lock command was improved.

June 8 2006

12.2(33)SRA

The extended functionality version of this feature was made available in Release 12.2 SR.

October 2006

12.4(11)T

The extended functionality version of this feature was made available in Release 12.4 T.  Release version 12.4(11)T0 was made available on November 17, 2006. 

June 7 2007

12.2(33)SXH

This document was republished to reflect the feature's integration in Cisco IOS Release 12.2 SX.