Sunday, August 25, 2013

Configuration Mode

When we enter configuration mode, the prompt changes from user@router> to user@router#, and a [edit] line is shown before the prompt. The [edit] line also indicates that you are at the top of the configuration hierarchy, which is similar to being at the top of a Unix file system (/). A synonym for configure command is edit command. edit  is a hidden command, so we won't see it in the possible completions.
The configuration mode has to basic components:
Command: It perform actions within the router's configuration
Statement: Actual keywords that define the configuration
To create or modify the router's configuration, use the commands that are available in configuration mode to add statements to the configuration that define the behavior of the router.

Exclusive Configuration:
In Junos OS, multiple users can enter configuration mode and commit changes, by default. The 'configure exclusive' command is used to allow only a single user to edit the configuration. Uncommitted changes are always discarded when you use the 'configure exclusive' command when users exit. In contrast, uncommitted changes are retained when you use the standard configure command.


Private Configuration:
Entering configuration mode using the 'configure private' command allows multiple users to edit the configuration while committing only their private changes. a 'commit' command is used in the hierarchy to save the configurations. If a private users issues a 'rollback 0' command, the software discards only their changes.

When a user is in private mode, other users must enter private mode or use configure exclusive command to become the master, or they cannot modify the candidate configuration. Exiting private configuration without committing changes results in the loss of any modifications made to the private candidate configuration.
If two users are in private mode and make the same change with different values (Eg. User1 = hostname apple, User2 = hostname orange), the second commit will fail with an error message to avoid configuration conflicts. If the second user issues a second commit command, then the second user's changes into effect.
The 'configure private' command is automatically during chassis clustering is in effect. In some cases, we might want to require users to use only 'configure private' command only. When creating users, we can configure the limit of commands available to the users with the help of assigned properties. If a user is in configuration mode and has altered the candidate configuration, other uses cannot enter configuration mode using the 'exclusive' or 'private' options. The changes made by the first user must be committed or cancelled prior to any other users entering configuration mode with the 'exclusive' or 'private' options.

Statement Hierarchy:
We enter commands in configuration mode, that effect the statement hierarchy. The statement hierarchy stores configuration information and is independent of the CLI operational mode command hierarchy. The commands available in configuration mode are also independent of the commands available in operational mode. Eg. The CLI operational mode includes a 'show' command to display specific operational information, while the CLI configuration mode provides a 'show' command to display the statement hierarchy so, the two commands are independent of each other.
Junos OS organizes the statement hierarchy in a tree structure similar to windows folders or UNIX directories, grouping related information into a particular branch of the tree.

No comments:

Post a Comment