Configuration commands
- 1 commit - commit the current set of changes
- 2 commit-confirm - commit the current set of changes; rollback if not confirmed
- 3 compare - compare configuration revisions
- 4 confirm - confirm configuration changes
- 5 delete - delete a configuration element
- 6 discard - discard uncommitted changes
- 7 edit - edit a sub-element
- 8 exit - exit from configuration level
- 9 load - load configuration from a file and replace candidate configuration
- 10 merge - merge configuration from a file into the candidate configuration
- 11 rollback - rollback to a previous configuration
- 12 run - run an operational-mode command
- 13 save - save the configuration to a file
- 14 set - set the value of a parameter or create a new element
- 15 show - show the configuration
- 16 top - set the edit level to the root
- 17 up - set the edit level one level up
- 18 validate - validate the current set of changes
commit - commit the current set of changes
Syntax: commit [ comment <comment-text> ]
Use this command to apply and save uncommitted changes to the configuration.
When you add configuration to, modify the existing configuration, or delete configuration from the system, the changes you make must be committed before they take effect. To commit changes, use the commit
command.
If you try to exit or quit configuration mode while uncommitted configuration changes still exist, the system gives you a warning. You cannot exit configuration mode until you either commit the changes by entering the commit
command or discard the changes by using the discard
command.
Until a configuration change is committed, the system marks the change when displaying the information.
If your login username is not a member of the "secrets" login user group and you either save a configuration through the REST API or use the save command, the encrypted passwords in the configuration file are replaced with the ******** placeholder. If you load this configuration, the replaced password fields trigger validation errors because the placeholder does not match the format for an encrypted password. Do not commit this configuration. If you ignore the error message and perform a commit with this invalid configuration, the passwords are deleted.
Use commit comment <comment-text>
to add a comment that describes the reason for the commit and seen in the output from show system commit
.
commit-confirm - commit the current set of changes; rollback if not confirmed
Syntax: commit-confirm <minutes> [ comment <comment-tex> ]
Use this command to set the system to require confirmation of a configuration commit.
This operation is useful when making configuration changes over a remote connection that could cause you to be unable to reconnect to the system, for example, accidentally changing the IP address of the management port.
A reboot during the commit-confirm timeout window results in the restoration of the previous configuration.
After making a configuration change, enter the commit-confirm
command, specifying the confirmation interval. Commit the change. If the commit is completed, without incident, confirm the commit by entering the command confirm
. If you do not confirm, the changes are rolled back.
If the new commit-confirmed configuration causes a crash before the confirmation window expires, the system reboots and rolls back to avoid an endless cycle of rebooting.
If you attempt to use the GRUB configuration recovery option when rebooting during the commit-confirm timeout window is active, a message to wait for the rollback to be completed is displayed.
If you enter commit, commit-confirm
, or rollback
commands during the commit-confirm timeout, the current commit that is pending confirmation is implicitly confirmed. For example, rollback 1
takes you back to the immediately preceding commit (before the original commit-confirm), and rollback 0
recommits the current configuration.
compare - compare configuration revisions
Syntax: compare [ rev-num1 [ rev-num2 ] ]
When used with no option, the working and active (running) configuration are compared. When only one revision number is specified, the system compares the working configuration to the specified revision. When two revisions are specified, the system compares the two specified revisions.
You can see the list of configuration file revisions by using show system commit
in operational mode (use run show system commit
in configuration mode).
confirm - confirm configuration changes
Syntax: confirm
Use this command to confirm a successful change in configuration after requiring commit confirmation.
For configuration changes that carry some risk of causing loss of access to a system, you can direct the system to require commit confirmation by using the command commit-confirm <minutes>
. This command sets the system to wait for confirmation that a configuration has succeeded.
Entering the confirm command within the specified commit-confirm interval causes the configuration change to be accepted. If confirmation is not provided by entering this command, the system reboots to the previous configuration.
delete - delete a configuration element
Syntax: delete <config-node>
Use this command to delete a part of configuration. To do this, you delete the appropriate subnode of a configuration node.
If you show configuration before it is committed, you see the deleted statement flagged with a minus sign (-); the statement disappears after the configuration change is committed.
Some configuration nodes and statements are mandatory; these nodes or statements cannot be deleted. Some configuration statements are mandatory but have default values; if you delete one of these statements, the default value is restored.
discard - discard uncommitted changes
Syntax: discard
Use this command to discard all uncommitted changes to the configuration.
edit - edit a sub-element
Syntax; edit <path>
Use this command to navigate to a specific configuration subnode for editing. The [edit] prompt changes dynamically to mark your place in the configuration tree.
Once at that location, any actions you take such as showing, creating, or deleting configuration are relative to your location in the tree.
exit - exit from configuration level
Syntax: exit [ discard ]
Use this command from a subnode in the configuration tree to navigate to the top of the configuration tree.
Use this command from the top of the configuration tree to exit from configuration mode to operational mode.
If you try to exit from configuration mode while there are still uncommitted configuration changes, the system gives you a warning. You cannot exit from configuration mode until you either commit the changes by entering the commit
command or discard the changes by using the discard
option. This option applies only to this usage.
load - load configuration from a file and replace candidate configuration
Syntax: load <file-name>
Use this command to load from a file a configuration that was previously saved.
The loaded configuration becomes the working configuration and must be committed before it becomes the active configuration.
Configuration can be loaded from a hard disk (including a Flash disk or USB device), a TFTP server, an FTP server, an SCP server, or an HTTP server. Note that you cannot load an empty configuration file; the configuration file must contain at least one configuration node. In addition, an error is reported if an invalid configuration file is loaded.
The default configuration directory is /config.
merge - merge configuration from a file into the candidate configuration
Syntax: merge <file-name>
Use this command to load from a file a configuration that was previously saved and merge it with the active (running) configuration. The merger adds new configuration entries and applies any modifications to existing active entries to produce a new working configuration. This configuration must be committed before it becomes the active configuration.
Configuration can be loaded from a hard disk (including a Flash disk or USB device), a TFTP server, an FTP server, an SCP server, or an HTTP server. Note that you cannot load an empty configuration file; the configuration file must contain at least one configuration node.
The default configuration directory is /config.
rollback - rollback to a previous configuration
Syntax: rollback <rev-number> [ comment <comment-text> ]
Use this command to roll back to the configuration revision specified.
You can see the list of configuration file revisions using the show system commit
operational mode command (use run show system commit
from configuration mode).
run - run an operational-mode command
Syntax: run
Run one of the operational-mode commands while still in the configuration-mode.
save - save the configuration to a file
Syntax: save <file-name>
Use this command to save the running configuration to a file.
The resulting file can later be loaded into the running system to replace the previous running configuration by using the load
command. A nonabsolute path is interpreted relative to the default configuration directory, which is /config.
If your login username is not a member of the "secrets" login user group and you either save a configuration through the REST API or use the save command, the encrypted passwords in the configuration file are replaced with the ******** placeholder. If you load this configuration, the replaced password fields trigger validation errors because the placeholder does not match the format for an encrypted password. Do not commit this configuration. If you ignore the error message and perform a commit with this invalid configuration, the passwords are deleted.
set - set the value of a parameter or create a new element
Syntax: set config-name attribute [ value ]
Use this command to add a configuration element to the current configuration.
You can also use this command to modify the value of an existing configuration item. When setting configuration values, note that the change does not take effect until the change is committed by using the commit
command.
After a configuration node has been added, you can modify it later by using set
or delete it by using delete
.
show - show the configuration
Syntax: show [ -all ] [ config-name ]
Use this command in configuration mode to display the configured state of the system.
This command displays the specified configuration node and all subnodes. The node specification is interpreted relative to your current location in the configuration tree.
Unless the -all
keyword is used, default information is not included in the displayed information.
In addition to this command, a number of show
commands are available in operational mode.
For example, see the difference between show interfaces
and show -all interfaces
.
vyatta@R1# show interfaces
interfaces {
dataplane dp0p1s1 {
address 10.10.1.1/24
}
dataplane dp0s2 {
address dhcp
}
loopback lo
}
vyatta@R1# show -all interfaces
interfaces {
dataplane dp0p1s1 {
address 10.10.1.1/24
duplex auto
ip {
gratuitous-arp-count 1
rpf-check disable
}
ipv6 {
dup-addr-detect-transmits 1
}
mtu 1500
speed auto
vlan-protocol 0x8100
vrrp {
start-delay 0
}
}
dataplane dp0s2 {
address dhcp
duplex auto
ip {
gratuitous-arp-count 1
rpf-check disable
}
ipv6 {
dup-addr-detect-transmits 1
}
mtu 1500
speed auto
vlan-protocol 0x8100
vrrp {
start-delay 0
}
}
loopback lo
}
vyatta@R1#
top - set the edit level to the root
Syntax: top
Use this command to navigate quickly to the top level of the configuration hierarchy.
up - set the edit level one level up
Syntax: up
This command navigates up one level in the configuration hierarchy. For example:
vyatta@R1# edit protocols ospfv3 timers spf
[edit protocols ospfv3 timers spf]
vyatta@R1# up
[edit protocols ospfv3 timers]
vyatta@R1# up
[edit protocols ospfv3]
vyatta@R1# up
[edit protocols]
vyatta@R1# up
[edit]
vyatta@R1#
validate - validate the current set of changes
Syntax: validate
Perform pre-commit checks to make sure the configuration changes are valid.