[Contents] [Prev] [Next] [Index] [Report an Error]


CLI Configuration Mode

In configuration mode, you configure the JUNOS software by creating a hierarchy of configuration statements by 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 text configuration file.) You can configure all properties of the JUNOS software, 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 20 explains each CLI configuration mode command. The commands are organized alphabetically.


Table 20: 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 | identifier)

annotate

Add comments to a configuration. You can add comments only at the current hierarchy level.

Syntax: annotate statement "comment-string"

commit

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

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

copy

Make a copy of an existing statement in the configuration.

Syntax: copy existing-statement to new-statement

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 | 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 | topic | reference) <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 (replace | merge | override) (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.

The currently operational JUNOS software configuration is stored in the file juniper.conf, and the last three committed configurations are stored in the files juniper.conf.1, juniper.conf.2, and juniper.conf.3. 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 through juniper.conf.9, are stored in the directory /var/db/config, which is on the router's hard disk.

Syntax: rollback <number>

run

Run a top-level CLI command without exiting from configuration mode.

Syntax: run command

save

Save the configuration to an ASCII file. The contents of the current level of the statement hierarchy (and below) are saved, along with the statement hierarchy containing it. This allows a section of the configuration to be saved, while fully specifying the statement hierarchy.

Syntax: save filename

set

Create a statement hierarchy and set identifier values. This is similar to edit except that your current level in the hierarchy does not change.

Syntax: set <statement-path> identifier

show

Display the current configuration.

Syntax: show <statement-path> <identifier>

status

Display the users currently editing the configuration.

top

Return to the top level of configuration command mode, which is indicated by the [edit] banner.

Syntax: top <configuration-command>

up

Move up one level in the statement hierarchy.

Syntax: up <number> <configuration-command>

update

Update a private database.



[Contents] [Prev] [Next] [Index] [Report an Error]