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

Overview

The CLI is the interface to the software that you use whenever you access the router—whether from the console or through a remote network connection. The CLI, which automatically starts after the router finishes booting, provides commands that you use to perform various tasks, including configuring the JUNOSe software and monitoring and troubleshooting the software, network connectivity, and the router hardware.

Managing your router using the CLI gives you access to thousands of commands. The router’s CLI uses an industry de facto standard look and feel, which might be familiar to you. If you are new to this CLI, it is helpful to read this entire chapter, where you can learn about CLI shortcuts and other helpful information.

Command Modes

Command modes set a context for the CLI. Each command in the CLI is available from one or more command modes. From some command modes you can only view router information; from others you can perform configuration tasks. For example, you can access User Exec mode to display information and then access Global Configuration mode to set parameters or enable a particular feature. By recognizing the command-line prompt, you can identify where you are in the CLI at any given point. When you can easily identify where you are, it is easy to get to where you want to be.

Figure 21 illustrates the command mode architecture. Only some of the many configuration modes are shown.

Command modes are discussed in greater detail in the section Accessing Command Modes . See the JUNOSe Command Reference Guide to find related command modes for any command.

Figure 21: Command Mode Architecture

Image g013072.gif

Command-Line Prompts

Within the CLI, the command-line prompt identifies both the hostname and the command mode. The hostname is the name of your router; the command mode indicates your location within the CLI system.

For example:

Image g013659.gif

Keywords and Parameters

CLI commands are made up of two primary elements: keywords and parameters.

Keywords

Every command requires at least one keyword; however, a command can contain other optional keywords. The keyword(s) must be typed into the CLI accurately for it to be recognized. These are examples of keywords:

reload
run
router
map-class
map-list
clear ip isis redistribution
show vlan subinterface
qos-port-type-profile
no rtr reset
radius calling-station-delimiter

You can abbreviate keywords; however, you must enter enough initial characters to unambiguously identify the command. For example, if the keyword you want to specify is map-class and you enter only map-, an error appears. The error indicates that one or more possible keywords begin with map-, thus making your entry ambiguous.

Parameters

Parameters are often required elements of a command; however, for some commands, parameters are not required. A parameter is most often a value that you specify after the keyword. There are different types of parameters, such as strings, integers, or IP addresses.

The CLI indicates the type of parameter that you must enter. When you see a range of numbers or uppercase letters, it indicates that you must specify a value. For example:

CLI Parameter Placeholder or Range

Sample Parameter User Input

ROUTER[:VRF]
charlie:1234
INTERFACE
3/2:20/15
WORD
windtunnel
<0–4294967295>
5600
A.B.C.D
192.56.32.2

Keywords and Parameters Together

By combining keywords and parameters in the correct sequence, you can begin using the CLI to configure and monitor your router. For example, you could specify the command hostname to change the name of your router by entering a keyword and a parameter. You need to type only the portion of the keyword that makes it unambiguous, such as hostn. Here, the value of the parameter, which is the name you assign to the host, is a string of up to 64 characters.

Image g013658.gif

When you enter this command, the new hostname appears in the prompt.

Image g013657.gif

Another example is a command that requires you to enter a number from within a given range. The command ip http port requires that a value be entered for the portNumber parameter. The value of this parameter is a number in the range of 0–65535. For example, you could enter:

juniper(config)#ip http port 56789

Note: You can find detailed information about command syntax, with parameter values defined, in the JUNOSe Command Reference Guide.

Using CLI Commands

This section introduces some useful shortcuts and command-related highlights. These include:

CLI Status Indicators

The E-series software includes two types of indicators to inform you of the status of your CLI operation.

Levels of Access

The CLI has two levels of access: user and privileged.

User Level

User level allows you only to view a router’s status. This level restricts you to User Exec mode.

Privileged Level

Privileged level allows you to view a router configuration, change a configuration, and run debugging commands. You need a password to access this level. This level gives you full CLI privileges. Passwords are covered in more detail in Managing the System .

Initialization Sequence

Each line module in a router is initialized independently. As a result, the CLI on the SRP module can become available before the line modules have completed initialization. Commands relating to a line module can fail if the module has not completed initialization. The show version command can be used to display line module status. Do not enter commands for a line module until its state is online.


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