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

Navigating the Configuration Hierarchy

When you first enter configuration mode, you are at the top level of the configuration command hierarchy, which is indicated by the [edit] banner. To move down through an existing configuration command hierarchy, or to create a hierarchy and move down to that level, use the edit command, specifying the hierarchy level at which you want to be:

user@host# edit <statement-path> <identifier>

Replace statement-path with the hierarchy level and identifier with a string that identifies an instance of a statement. (Not all statements require identifiers.) If the identifier contains a space, you must enclose the identifier in quotation marks (” “).

After you enter an edit command, the banner changes to indicate your current level in the hierarchy:

[edit]
user@host# edit protocols ospf
[edit protocols ospf]
user@host#

To move back up to the previous hierarchy level, enter the exit command. This command is, in effect, the opposite of the edit command. For example:

[edit]
user@host# edit protocols ospf
[edit protocols ospf]
user@host# edit area 0.0.0.0
[edit protocols ospf area 0.0.0.0]
user@host# exit
[edit protocols ospf]
user@host# exit
[edit]
user@host#

To move up one level, enter the up command. For example:

[edit]
user@host# edit protocols ospf area 0.0.0.0
[edit protocols ospf area 0.0.0.0]
user@host# up
[edit protocols ospf]
user@host# up
[edit protocols]
user@host# up
[edit]
user@host#

To move directly to the top level of the hierarchy, enter the top command. For example:

[edit protocols ospf area 0.0.0.0]
user@host# top
[edit]
user@host#

To display the configuration, enter the show command:

show <statement-path>

The configuration at the current hierarchy level, or at the level specified by statement-path, is displayed. For example, entering the show command in each of the following cases displays the same level of the configuration:

[edit]
user@host# show interfaces ge-0/0/0
unit 0 {
family inet {
address 192.168.4.1/30;
}
}
[edit]
user@host# edit interfaces ge-0/0/0
[edit interfaces ge-0/0/0]
user@host# show
unit 0 {
family inet {
address 192.168.4.1/30;
}
}

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