CLI Configuration Mode Top-Level Commands

In configuration mode, you configure the Junos OS by creating a hierarchy of configuration statements. You can do this using the CLI or by creating a text (ASCII) file that contains the statement hierarchy. (The statement hierarchy is identical in both the CLI and the text configuration file.) You can configure all properties of the Junos OS, including interfaces, general routing information, routing protocols, and user access, as well as several system hardware properties. When you have finished entering the configuration statements, you commit them, which activates the configuration on the router.

Table 5 lists each CLI configuration mode command and describes the options available for each command. The commands are organized alphabetically.

Table 5: CLI Configuration Mode Commands

Command

Description

activate

Remove the inactive: tag from a statement, effectively reading the statement or identifier to the configuration. Statements or identifiers that have been activated take effect when you next issue the commit command.

Syntax: activate (statement-path | identifier)

annotate

Add comments to a configuration.

Syntax: annotate < statement-path> comment-string

commit

Commit the set of changes to the database and cause the changes to take operational effect.

Syntax: commit <and-quit> <check> <confirmed < minutes >> <synchronize>

copy

Make a copy of an existing statement in the configuration.

Syntax: copy < statement-path> identifier 1 to identifier 2

deactivate

Add the inactive: tag to a statement, effectively commenting out the statement or identifier from the configuration. Statements or identifiers marked as inactive do not take effect when you issue the commit command.

Syntax: deactivate ( statement-path | identifier ?)

delete

Delete a statement or identifier. All subordinate statements and identifiers contained within the specified statement path are deleted with it.

Syntax: delete ( statement-path | identifier)

edit

Move inside the specified statement hierarchy. If the statement does not exist, it is created.

Syntax: edit < statement-path>

exit

Exit the current level of the statement hierarchy, returning to the level prior to the last edit command, or exit from configuration mode. The quit and exit commands are synonyms.

Syntax: exit <configuration-mode>

help

Display help about available configuration statements.

Syntax: help (apropos | reference | syslog | topic ) < string ??>

insert

Insert an identifier into an existing hierarchy.

Syntax: insert < statement-path> identifier1 (before | after) identifier2

load

Load a configuration from an ASCII configuration file or from terminal input. Your current location in the configuration hierarchy is ignored when the load operation occurs.

Syntax: load (merge | override | replace ) ( filename | terminal)

quit

Exit the current level of the statement hierarchy, returning to the level prior to the last edit command, or exit from configuration mode. The quit and exit commands are synonyms.

Syntax: quit <configuration-mode>

rename

Rename an existing configuration statement or identifier.

Syntax: rename < statement-path> identifier1 to identifier2

rollback

Return to a previously committed configuration. The software saves the last 10 committed configurations, including the rollback number, date, time, and name of the user who issued the commit configuration command. rollback 0 erases any configuration changes made to the current candidate configuration.

The currently operational Junos OS configuration is stored in the file juniper.conf, and the last three committed configurations are stored in the files juniper.conf.1.gz, juniper.conf.2.gz, and juniper.conf.3.gz. These four files are located in the directory /config/, which is on the router’s flash drive. The remaining six previous committed configurations, the files juniper.conf.4.gz through juniper.conf.9.gz, are stored in the directory /var/db/config/, which is on the router’s hard disk.

Syntax: rollback < number>

run

Run an operational mode CLI command without exiting from configuration mode.

Syntax: run < operation-command>

save

Save the configuration to an ASCII file in the user’s home directory (by default) or to the user’s terminal session. The statement hierarchy and the contents of the current level of the statement hierarchy (and below) are saved. This allows a section of the configuration to be saved, while fully specifying the statement hierarchy.

Syntax: save filename | terminal

set

Create a statement hierarchy and set identifier values. This is similar to the edit command except that your current level in the hierarchy does not change, and you can set identifier values, while the edit command only allows access to a statement path.

Syntax: set ( statement-path | identifier )

show

Display the current configuration.

Syntax: show ( statement-path | identifier)

status

Display the users currently editing the configuration.

Syntax: status

top

Return to the top level of configuration command mode, indicated by the [edit] banner, or execute a command from the top level of the configuration.

Syntax: top < configuration-command>

up

Move up one level in the statement hierarchy.

Syntax: up < number>

update

Update a private database. For more information on the update command, see the Junos System Basics and Services Command Reference.

Syntax: update