Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

CLI Operational Mode Overview

In operational mode, you can use Junos OS CLI commands to monitor and troubleshoot a device. The monitor, ping, show, test, and traceroute commands enable you to display information and test network connectivity for the device.

CLI Operational Mode Command Overview

You (the network administrator) can control all network operations using the Junos OS CLI operational mode commands described in this topic.

CLI Operational Mode Command Categories

CLI operational mode commands fall into the following broad categories:

  • Operational mode commands for monitoring and troubleshooting—The following commands perform functions related to information and statistics about the software and to test network connectivity.

    • clear—Clear statistics and protocol database information.

    • file—Perform file operations.

    • mtrace—Trace a multicast path from source to receiver.

    • monitor—Perform real-time debugging of various software components, including the routing protocols and interfaces.

    • ping—Determine the reachability of a remote network host.

    • show—Display the current configuration and information about interfaces, routing protocols, routing tables, routing policy filters, system alarms, and the chassis.

    • test—Test the configuration and application of policy filters and autonomous system (AS) path regular expressions.

    • traceroute—Trace the route to a remote network host.

  • Commands for restarting software processes—The commands in the restart hierarchy restart the various system processes, including the routing protocol, interface, and SNMP.

  • A command—request—Perform system-level operations, including stopping and rebooting the router or switch and loading operating system images.

  • A command—start—Exit the CLI and start a UNIX shell.

  • A command—configure—Enter configuration mode, which provides a series of commands that configure the system, including the routing protocols, interfaces, network management, and user access.

For more information about the CLI operational mode commands, see the CLI Explorer. Alternatively, you can enter ? at the operational mode command prompt to view a list of available commands.

Commonly Used Operational Mode Commands

The following table lists some operational commands you may find useful for monitoring router or switch operation.

Table 1: Commonly Used Operational Mode Commands

Items to Check

Description

Command

Software version

Versions of software running on the router or switch

show version

Log files

Contents of the log files

monitor

Log files and their contents and recent user logins

show log

Remote systems

Host reachability and network connectivity

ping

The route to a network system

traceroute

Configuration

Current system configuration

show configuration

File manipulation

List of files and directories on the router or switch

file list

Contents of a file

file show

Interface information

Detailed information about interfaces

show interfaces

Chassis

Chassis alarm status

show chassis alarms

Information currently on craft display

show chassis craft-interface

Router or switch environment information

show chassis environment

Hardware inventory

show chassis hardware

Routing table information

Information about entries in the routing tables

show route

Forwarding table information

Information about data in the kernel’s forwarding table

show route forwarding-table

Display Options of the show Command—An Overview

The show command can include brief, detail, extensive, or terse options. You can use these and other options to control the amount and type of information to view.

  1. At any point in the CLI, you can enter the ? character to view all the currently available options. For example:

  2. At any point in the CLI, you can use the show command with one of the following options to display the detail you need to view.

    Figure 1: Command Output OptionsCommand Output Options

Interface Naming Conventions Used in Operational Commands

This topic explains the interface naming conventions used in operational commands.

Physical Part of an Interface Name

The physical interface naming conventions for Juniper Networks device platforms is as follows:

  • On SRX Series Firewalls, the unique name of each network interface has the following format to identify the physical device that corresponds to a single physical network connector:

  • On other platforms, when you display information about an interface, you specify the following identifiers: interface type, the slot in which the Flexible PIC Concentrator (FPC) is installed, the slot on the FPC in which the PIC is located, and the configured port number.

    In the physical part of the interface name, a hyphen (-) separates the media type from the FPC number, and a slash (/) separates the FPC, PIC, and port numbers:

Note:

Exceptions to the type-fpc/pic/port physical description include the aggregated Ethernet and aggregated SONET/SDH interfaces, which use the syntax aenumber and asnumber, respectively.

Logical Part of an Interface Name

The logical unit part of the interface name corresponds to the logical unit number, which can be a number from 0 through 16,384. You use logical unit numbers to uniquely identify physical storage systems or virtual storage systems within a network. In the virtual part of the name, a period (.) separates the port and logical unit numbers:

  • SRX Series Firewalls:

  • Other platforms:

Channel Identifier Part of an Interface Name

The channel identifier part of an interface name is required only on channelized interfaces. For channelized interfaces, channel 0 identifies the first channelized interface. For channelized intelligent queuing (IQ) interfaces, channel 1 identifies the first channelized interface.

Note:

Depending on the type of channelized interface, you can specify up to three levels of channelization.

A colon (:) separates the physical and virtual parts of the interface name:

  • SRX Series Firewalls:

  • Other platforms:

About Group Interface Names Using Wildcard Characters

You can use wildcard characters in operational commands to specify groups of interface names without having to type each name individually. The following table lists the available wildcard characters. You must enclose all wildcard characters except the asterisk (*) in quotation marks (“ ”).

Table 2: Wildcard Characters for Specifying Interface Names

Wildcard Character

Description

* (asterisk)

Match any string of characters in that position in the interface name. For example, so* matches all SONET/SDH interfaces.

"[character<character...>]"

Match one or more individual characters in that position in the interface name. For example, so-“[03]”* matches all SONET/SDH interfaces in slots 0 and 3.

"[!character<character...>]"

Match all characters except those included in the brackets. For example, so-“[!03]”* matches all SONET/SDH interfaces except those in slots 0 and 3.

"[character1-character2]"

Match a range of characters. For example, so-“[0-3]” * matches all SONET/SDH interfaces in slots 0, 1, 2, and 3.

"[!character1-character2]"

Match all characters that are not in the specified range of characters. For example, so-”[!0-3]”* matches all SONET/SDH interfaces in slots 4, 5, 6, and 7.