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

Adding or Modifying a Statement or Identifier

To add or modify statements in a configuration, use the set command:

set <statement-path> statement <identifier>

Replace statement-path with the path to the statement from the current hierarchy level, and statement with the statement itself. Replace 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 (” “).

If the statement or identifier does not exist in the configuration hierarchy, it is added. If the statement or identifier already exists, it is modified (unless multiple occurrences of the same statement or identifier are allowed in the configuration, in which case another instance is added to the configuration). After you enter the set command, you remain at the same level in the hierarchy.

You can enter a single set command from the top level of the hierarchy. Alternatively, you can enter the edit command to move to the target hierarchy level, from which you can enter the set command. In either case, the CLI creates the hierarchy level if it does not exist. For example, to set the OSPF hello interval from the top level of the hierarchy, enter the set command as follows:

[edit]
user@host# set protocols ospf area 0.0.0.0 interface t1-0/0/0 hello-interval 5

Alternatively, use the edit command to create and move to the [edit protocols ospf area 0.0.0.0 interface t1-0/0/0] hierarchy level, then enter a set command to set the value of the hello-interval statement:

[edit]
user@host# edit protocols ospf area 0.0.0.0 interface t1-0/0/0
[edit protocols ospf area 0.0.0.0 interface t1-0/0/0]
user@host# set hello-interval 5

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