commit

Use this command to commit the candidate configuration to the running configuration.

 

  • After a successful commit command, you must give the Basic Commands command to save the running configuration to the startup configuration.
  • Multiple configurations cannot be removed with a single commit. You must remove each configuration followed by a commit.

Optionally with “confirmed commit”, you can commit the configuration on a trial basis for a time specified in seconds. If you do not confirm within the specified time, the configuration will be reverted after the timeout.

To revert the configuration before timeout, then give the cancel-commit (WORD|) command.
To retain the configuration before timeout, then give the confirm-commit (WORD|) command.

See RFC 6241 “Confirmed Commit Capability”.

 

  • If a <commit> operation is executed without any parameters, the commit will be treated as permanent, and an explicit confirm-commit (WORD|) operation is not necessary to confirm the commit.
  • Multiple confirmed commits in the same session or different sessions are not supported. The commit command does not support the <persist-id> parameter as specified in RFC 6241.
  • The <confirm-commit> and <cancel-commit> commands can be used from different sessions with the appropriate commit ID.

Command Syntax

Copy
commit (confirmed (timeout <1-86400>|)|) (description LINE|)

Parameters

confirmed

(Optional) Commits the configuration on a trial basis, default time will be of 300 seconds.

<1-86400>

(Optional) Specifies the timeout value in seconds after which the configuration will be reverted if no confirmation is provided.

description LINE

(Optional) Commit description up to 64 valid characters.

Default

None

Command Mode

All configuration modes

Applicability

This command was introduced in OcNOS version 5.0, added the confirmed clause in OcNOS version 6.3.0, and enhanced the parameters in OcNOS version 6.6.0.

Example

Copy
(config)#router ospf 1
(config-router)#exit
(config)#router isis 3
(config-router)#commit
(config-router)#exit
(config)#show running-config ospf
!
router ospf 1
!
(config)#show running-config isis
!
router isis 3
!
(config)#
 
If you try to exit or end, you are prompted to commit or abort first:
(config)#router bgp 10
(config-router)#bgp as-local-count 34
(config-router)#exit
(config)#exit
% Un-committed transactions present. Please do commit or abort before exiting.
(config)#end
% Un-committed transactions present. Please do commit or abort before exiting.
(config)#commit
(config)#show running-config bgp
!
router bgp 10
 bgp as-local-count 34
!
(config)#
This is an example of a “confirmed commit”:
(config)#router ospf 1
(config-router)#router ospf 2
(config-router)#commit confirmed timeout 100 description This is Test for confirmed commit