commit
Use this command to commit the candidate configuration to the running configuration.
Note: After a successful
commit command, you must give the
write command to save the running configuration to the startup configuration.
Note: 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 command.
• To retain the configuration before timeout, then give the
confirm-commit command.
See RFC 6241 “Confirmed Commit Capability”.
Note: A
commit command without any parameters is treated as permanent and an explicit
confirm-commit command is not required to confirm the commit.
Note: 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.
Command Syntax
commit (confirmed (timeout <1-500>|)|) (description LINE|)
Parameters
confirmed
Commits the configuration on a trial basis.
<1-500>
Timeout in seconds after which configuration should be reverted if a confirmation is not given with
confirm-commit. If not specified, the default timeout is 300 seconds.
LINE
Commit description up to 65 characters
Default
The default timeout is 300 seconds.
Mode
All configuration modes
Applicability
This command was introduced in OcNOS version 5.0 and the confirmed clause added in OcNOS version 6.3.0.
Example
(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
Usage
OcNOS validates dependencies when you commit. In this example, bridge 1 must exist before you can create a VLAN on it:
(config)#vlan database
(config-vlan)#vlan 10 bridge 1
(config-vlan)#exit
(config)commit
Because of the unmet dependency, you get an error when you try to commit.
If you also create the bridge, the commit succeeds:
(config)#bridge 1 protocol mstp
(config)#vlan database
(config-vlan)#vlan 10 bridge 1
(config-vlan)#exit
(config)commit
In a single transaction, dependent configurations can be given in any order. Using the same example as before, you can create the bridge after the VLAN:
(config)#vlan database
(config-vlan)#vlan 10 bridge 1
(config-vlan)#exit
(config)#bridge 1 protocol mstp
(config)commit
OcNOS supports “hitless merges” and does not write to the candidate configuration if you make the same configuration in separate transactions. In this example, subinterface xe1.1 is not created the second time because it already exists:
(config)#interface xe1.1
(config-if)#commit
(config)#interface xe1.1
(config-if)#commit
OcNOS does not write to the candidate configuration if you create and delete the same entity in the same transaction. You must create the entity and delete it with separate commits.
Mode changes, action items (such as
clear interface counters), and
show commands are not part of a transaction and are not displayed by the
show transaction current command.
Last modified date: 10/19/2023