Technical Documentation

CLI Editor (Edit Configuration Text)

Using View and Edit, 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.

The configuration is stored as a hierarchy of statements. You create the specific hierarchy of configuration statements that you want to use. After you finish entering the configuration statements, you commit them to activate the configuration on the routing platform.

You can create the hierarchy interactively, or you can create an ASCII text file that is loaded onto the routing platform and then committed. Edit Configuration (J-Web configuration editor) allows you to create the hierarchy interactively, and Edit Configuration Text allows you to create and commit statements as an ASCII text file.

To edit the entire configuration in text format, select Configure>CLI Tools>CLI Editor. The main pane displays the configuration in a text editor (see Figure 1).

Figure 1: Edit Configuration Text Page

Image s041298.gif

For more information about the format of an ASCII configuration file, see CLI Viewer (View Configuration Text).

Caution: We recommend that you use this method to edit and commit the configuration only if you have experience editing configurations through the CLI.

To edit the entire configuration in text format:

  1. Navigate to the hierarchy level you want to edit.
  2. Edit the candidate configuration using standard text editor operations—insert lines (with the Enter key), delete lines, and modify, copy, and paste text.
  3. Click Commit to load and commit the configuration.

    The routing platform checks the configuration for the correct syntax before committing it.

When you edit the ASCII configuration file, you can add comments of one or more lines. Comments must precede the statement they are associated with. If you place the comments in other places in the file, such as on the same line after a statement or on a separate line following a statement, they are removed when you click Commit. Comments must begin and end with special characters. For more information, see the JUNOS CLI User Guide.

Published: 2010-04-29