CLI Tools

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.

Using Point and Click CLI, 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.

This section contains the following topics:

Point and Click CLI

Using Point and Click CLI, 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.

Use the following tasks in Point and Click CLI to configure your device:

View Configuration Text

To view the entire configuration in text format, select Configure>CLI Tools>Point and Click CLI. The main pane displays the configuration in text format. The displayed configuration is the same as the configuration displayed when you enter the JUNOS CLI command show configuration.

The configuration statements appear in a fixed order, irrespective of the order in which you configured the routing platform. The top of the configuration displays a timestamp indicating when the configuration was last changed and the current version.

Each level in the hierarchy is indented to indicate each statement's relative position in the hierarchy. Each level is generally set off with braces, using an open brace ({) at the beginning of each hierarchy level and a closing brace (}) at the end. If the statement at a hierarchy level is empty, the braces are not displayed. Each leaf statement ends with a semicolon (;), as does the last statement in the hierarchy.

This indented representation is used when the configuration is displayed or saved as an ASCII file. However, when you load an ASCII configuration file, the format of the file is not so strict. The braces and semicolons are required, but the indention and use of new lines are not required in ASCII configuration files.

Click OK to return to the Point and Click CLI page.

Edit Configuration (J-Web Configuration Editor)

To access Edit Configuration, also called the J-Web configuration editor, select Configure>CLI Tools>CLI Editor. This page allows you to configure all routing platform services that you can configure from the JUNOS CLI. Each field in the J-Web configuration editor has the same name as the corresponding configuration statement at the same hierarchy level in the CLI. For example, the Policy Options field corresponds to the policy-options statement in the CLI. As a result, you can easily switch from one interface to the other or follow a CLI configuration example using the J-Web configuration editor.

Table 125 lists key J-Web configuration editor tasks and their functions.

Table 125: J-Web Configuration Editor Tasks Summary

J-Web Configuration Editor Task

Function

Access

Configure access to the router and user authentication methods. For configuration instructions, see the JUNOS Enhanced Services Security Configuration Guide.

Accounting options

Collect and log data about basic system operations and services on the router. For configuration instructions, see the JUNOS Enhanced Services Administration Guide.

Applications

Configure applications functions of the JUNOS Enhanced Services software and their properties on the router. For configuration instructions, see the JUNOS Enhanced Services Security Configuration Guide.

Chassis

Configure alarms and other chassis properties. For configuration instructions, see the JUNOS Enhanced Services J-series Services Router Getting Started Guide and the JUNOS Enhanced Services Administration Guide.

Class of service

Configure class-of-services (CoS) features. For configuration instructions, see the JUNOS Enhanced Services Interfaces and Routing Configuration Guide.

Event options

Configure diagnostic event policies and actions associated with each policy. For configuration instructions, see the JUNOS Enhanced Services Administration Guide.

Firewall

Configure stateless firewall filters—also known as access control lists (ACLs)—on the router. Stateless firewall filters allow you to filter packets based on their components and to perform an action on packets that match the filter. For configuration instructions, see the JUNOS Enhanced Services Interfaces and Routing Configuration Guide.

Forwarding options

Configure forwarding options protocols, including flow monitoring. accounting properties, and packet capture. For configuration instructions, see the JUNOS Enhanced Services Administration Guide.

Groups

Configure information that can be dynamically updated in different parts of the router configuration. For information about groups statements that are shared with the JUNOS software, see the JUNOS CLI User Guide.

Interfaces

Configure interfaces on the router. For configuration instructions, see the JUNOS Enhanced Services Interfaces and Routing Configuration Guide and the JUNOS Enhanced Services Administration Guide.

Policy options

Configure routing policies that control the information from routing protocols that the router imports into its routing table and exports to its neighbors. For configuration instructions, see the JUNOS Enhanced Services Interfaces and Routing Configuration Guide.

Protocols

Configure routing protocols, including Intermediate System-to-Intermediate System (IS-IS), Open Shortest Path First (OSPF), Routing Information Protocol (RIP), Routing Information Protocol Next Generation (RIPng), and Border Gateway Protocol (BGP). For configuration instructions, see the JUNOS Enhanced Services Interfaces and Routing Configuration Guide.

Routing instances

Configuration hierarchy to configure routing instances. For configuration instructions, see the JUNOS Enhanced Services Design and Implementation Guide.

Routing options

Configure protocol-independent routing properties. For configuration instructions, see the JUNOS Enhanced Services Design and Implementation Guide and the JUNOS Enhanced Services Interfaces and Routing Configuration Guide.

Schedulers

Determine the day and time when security policies are in effect. For configuration instructions, see the JUNOS Enhanced Services Security Configuration Guide.

Security

Configure the rules for the transit traffic and the actions that need to take place on the traffic as it passes through the firewall and to monitor the traffic attempting to cross from one security zone to another. For configuration instructions, see the JUNOS Enhanced Services Security Configuration Guide.

Services

Configure real-time performance monitoring (RPM) on the router. For configuration instructions, see the JUNOS Enhanced Services Administration Guide.

Snmp

Configure the Simple Network Management Protocol (SNMP) for monitoring router operation and performance. For configuration instructions, see the JUNOS Enhanced Services Administration Guide.

System

Configure system management functions, including the router’s hostname, address, and domain name; the addresses of the Domain Name System (DNS) servers; user login accounts, including user authentication and the root-level user account; time zones and Network Time Protocol (NTP) properties; and properties of the router’s auxiliary and console ports. For configuration instructions, see the JUNOS Enhanced Services Security Configuration Guide and the JUNOS Enhanced Services Administration Guide.

Editing a Configuration

To edit the configuration on a series of pages of clickable options that step you through the hierarchy, select Configuration>View and Edit>Edit Configuration.

To expand or hide the hierarchy of all the statements in the side pane, click Expand all or Hide all. To expand or hide an individual statement in the hierarchy, click the expand (+) or collapse () icon to the left of the statement.

Note: Only those statements included in the committed configuration are displayed in the hierarchy.

The configuration information in the main pane consists of configuration options that correspond to configuration statements. Configuration options that contain subordinate statements are identified by the term Nested configuration.

To include, edit, or delete statements in the candidate configuration, click one of the links described in Table 126 in the main pane. Then specify configuration information by typing into a field, selecting a value from a list, or clicking a check box (toggle).

Link

Function

Add new entry

Displays fields and lists for a statement identifier, allowing you to add a new identifier to a statement.

Configure

Displays information for a configuration option that has not been configured, allowing you to include a statement.

Delete

Deletes the corresponding statement or identifier from the configuration. All subordinate statements and identifiers contained within a deleted statement are also discarded.

Edit

Displays information for a configuration option that has already been configured, allowing you to edit a statement.

identifier

Displays fields and lists for an existing statement identifier, allowing you to edit the identifier.

As you navigate through the configuration, the hierarchy level is displayed at the upper right of the main pane. You can click a statement or identifier in the hierarchy to return to the corresponding configuration options in the main pane.

The main pane includes icons that display information about statements and identifiers when you place your cursor over them. Table 127 describes the meaning of these icons.

Table 127: J-Web Edit Configuration Icons

Icon

Meaning

C

Displays a comment about a statement.

I

Indicates that a statement is inactive.

M

Indicates that a statement has been added or modified, but has not been committed.

*

Indicates that the statement or identifier is required in the configuration.

?

Provides help information.

Note: You can annotate statements with comments or make them inactive only through the CLI. For more information, see the Junos OS CLI User Guide.

After typing or selecting your configuration edits, click a button in the main pane (described in Table 128) to apply your changes or cancel them, refresh the display, or discard parts of the candidate configuration. An updated configuration does not take effect until you commit it.

Table 128: J-Web Edit Configuration Buttons

Button

Function

OK

Applies edits to the candidate configuration, and returns you to the previous level in the configuration hierarchy.

Cancel

Clears the entries you have not yet applied to the candidate configuration, and returns you to the previous level in the configuration hierarchy.

Refresh

Updates the display with any changes to the configuration made by other users.

Commit

Verifies edits and applies them to the current configuration file running on the device.

Discard

Removes edits applied to, or deletes existing statements or identifiers from, the candidate configuration.

Discarding Parts of a Candidate Configuration

Before committing a candidate configuration, you can discard changes you applied or delete existing statements or identifiers.

To discard parts of a candidate configuration:

  1. Navigate to the level of the hierarchy you want to edit, and click Discard.

    The main pane displays a list of target statements based on the hierarchy level and the changes you have made.

  2. Select an option button (also known as a radio button) to specify the appropriate discard operation or deletion. (Not all buttons appear in all situations.)
    • Discard Changes Below This Point—Discards changes made to the candidate configuration at the displayed hierarchy level and below. All subordinate statements and identifiers contained within a discarded statement are also discarded.
    • Discard All Changes—Discards all changes made to the candidate configuration.
    • Delete Configuration Below This Point—Deletes all changes and statements in the candidate configuration at the displayed hierarchy level and below. All subordinate statements and identifiers contained within a deleted statement are also deleted.
  3. To confirm the discard operation or deletion, click OK.

    To cancel a discard operation or deletion, click Cancel.

The updated candidate configuration does not take effect on the device until you commit it.

Committing a Configuration

When you finish making changes to a candidate configuration with the J-Web configuration editor, you must commit the changes to use them in the current operational software running on the device.

If another user is editing an exclusive candidate configuration with the CLI, you cannot commit a configuration until the user has committed the configuration. To display a list of users, select Configuration>History. The list is displayed as Database Information in the main pane. For more information about editing an exclusive candidate configuration, see the Junos OS CLI User Guide.

To commit a candidate configuration:

  1. In the J-Web configuration editor, click Commit.

    The main pane displays a summary of your changes in statement form.

  2. To confirm the commit operation, click OK.

    To cancel a commit operation, click Cancel.

    If multiple users are editing the configuration when you commit the candidate configuration, all changes made by all users take effect.

  3. To display all the edits applied to the running configuration, click Refresh.

Sample Task—Configuring Accounting Options

This page displays the different settings that you can configure at the accounting options hierarchy level. Because each field in the J-Web configuration editor has the same name as the corresponding configuration statement at the same hierarchy level in the CLI, the options on this page match the options displayed when you enter edit accounting options in the CLI:


user@router# edit accounting-options ?
Possible completions:
  <[Enter]>            Execute this command
> class-usage-profile  Class usage profile for accounting data
> file                 Accounting data file configuration
> filter-profile       Filter profile for accounting data
> interface-profile    Interface profile for accounting data
> mib-profile          MIB profile for accounting data
> routing-engine-profile  Routing Engine profile for accounting data
  |                    Pipe through a command
[edit]

Edit Configuration Text

To edit the entire configuration in text format, select Configure>CLI Tools>CLI Editor.

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 device 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 OS CLI User Guide.