Important
|
To avoid
complications resulting from the failure of an administrator holding an
exclusive lock to exit config mode, it is a best practice to configure
all
administrator accounts with CLI session absolute timeouts and/or idle timeouts.
For additional information on setting these timeouts, see the
Using the
CLI for Initial Configuration section of the
Getting
Started chapter in this guide.
|
You can request an
exclusive-lock on config mode by executing the Exec mode
configure lock
command.
[local]host_name# configure [ <url> ] lock [ force | warn ]
If you specify a
URL, the exclusive lock is associated with the pre-loaded configuration file.
If you do not specify a URL, the exclusive lock is granted for the running
configuration. For additional information see
Effect of Config Lock on URL Scripts.
The
force option
forces all other administrators to exit out of configuration mode, including
anyone currently holding the exclusive-lock.
The
warn option
warns all other administrators to exit out of configuration mode. This
administrator will be taking the exclusive-lock soon. You may want to use this
option before actually forcing administrators out of configuration mode,
If there are no
other administrators in config mode, entering
configure
lock immediately grants you an exclusive-lock.
[local]host_name# configure lock
Info: No one else can access config mode while you have the exclusive lock
[local]host_name#
When the exclusive
lock is granted, no other administrators are allowed to enter into config mode
or load a config file. Any other administrators attempting to enter into config
mode or load a config file will see the following message:
Failure: User <username> has the exclusive lock
- please enter 'show administrators' for more information
If another
administrator attempts to enter config mode with the exclusive-lock when it is
already enabled, the following message appears:
Failure: Another administrator is still in configuration mode
- please enter 'show administrators' for more information
If you do not
obtain an exclusive lock initially, you can use
configure lock
force.
If
configure lock
force is successful, all users who have been forced to exit to Exec mode
will see a warning message indicating that they were forced to exit from config
mode:
[local]host_name(config)#
Warning: Administrator <username> has forced you to exit from configuration mode
[local]host_name#
A
configure lock
force command may not be successful because there is a very small chance
that another administrator may be in the middle of entering a password or
performing a critical system operation that cannot be interrupted. In this case
a failure message will appear:
[local]host_name# configure lock force
Failure: Another administrator could not release the configuration mode lock
- please enter 'show administrators' for more information
The
configure lock
warn command sends a warning message to all config mode users (if any) and
then waits up to 10 seconds to try and acquire the exclusive-lock. If any users
are still in config mode, the config mode remains in a shared-lock state.
[local]host_name# configure lock warn
please wait for this message to be sent to the other administrators......
[local]host_name(config)#
The other
administrators would eventually see this message in their session output:
[local]host_name(config)#
Administrator <username> requires exclusive access to configuration mode
>>> You need to exit from configuration mode as soon as possible <<<
[local]host_name#
The
configure lock
warn command does not usually result in the exclusive-lock being acquired
since the other administrators would typically not anticipate seeing the
message in their session output.
Important
|
StarOS logs all
major config mode lock interactions to the event log and syslog facility (if
configured). You can access a record of what interactions transpired at any
time.
|