ON THIS PAGE
CLI Operational Mode Overview
In the operational mode, you use the CLI to monitor and troubleshoot the device. The monitor, ping, show, test, and traceroute commands let you display information and test network connectivity for the device. For more information, see the following topics:
Overview of Junos OS CLI Operational Mode Commands
This topic provides an overview of Junos OS CLI operational mode commands and contains the following sections:
CLI Command Categories
When you log in to a device running Junos OS and the CLI starts, there are several broad groups of CLI commands:
Commands for controlling the CLI environment—Some set commands in the set hierarchy configure the CLI display screen. For information about these commands, see Understanding the Junos OS CLI Modes, Commands, and Statement Hierarchies.
Commands for monitoring and troubleshooting—The following commands display information and statistics about the software and test network connectivity. Detailed command descriptions are provided in the Junos OS Interfaces Command Reference.
clear—Clear statistics and protocol database information.
mtrace—Trace mtrace packets 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 connecting to other network systems—The ssh command opens Secure Shell connections, and the telnet command opens telnet sessions to other hosts on the network. For information about these commands, see the CLI Explorer.
Commands for copying files—The copy command copies files from one location on the router or switch to another, from the router or switch to a remote system, or from a remote system to the router or switch. For information about these commands, see the CLI Explorer.
Commands for restarting software processes—The commands in the restart hierarchy restart the various Junos OS processes, including the routing protocol, interface, and SNMP. For information about these commands, see the CLI Explorer.
A command—request—for performing system-level operations, including stopping and rebooting the router or switch and loading Junos OS images. For information about this command, see the CLI Explorer.
A command—start—to exit the CLI and start a UNIX shell. For information about this command, see the CLI Explorer.
A command—configure—for entering configuration mode, which provides a series of commands that configure Junos OS, including the routing protocols, interfaces, network management, and user access. For information about the CLI configuration commands, see Understanding Junos OS CLI Configuration Mode.
A command—quit—to exit the CLI. For information about this command, see the CLI Explorer.
For more information about the CLI operational mode commands, see the CLI Explorer. .
Commonly Used Operational Mode Commands
Table 1 lists some operational commands you may find useful for monitoring router or switch operation. For a complete description of operational commands, see the Junos OS command references.
The QFX3500 switch does not support the IS-IS, OSPF, BGP, MPLS, and RSVP protocols.
Table 1: Commonly Used Operational Mode Commands
Items to Check
Versions of software running on the router or switch
Contents of the log files
Log files and their contents and recent user logins
Host reachability and network connectivity
Route to a network system
Current system configuration
List of files and directories on the router or switch
Contents of a file
Detailed information about interfaces
Chassis alarm status
show chassis alarms
Information currently on craft display
show chassis craft-interface
Router or switch environment information
show chassis environment
show chassis hardware
Routing table information
Information about entries in the routing tables
Forwarding table information
Information about data in the kernel’s forwarding table
show route forwarding-table
Adjacent routers or switches
show isis adjacency
Display standard information about OSPF neighbors
show ospf neighbor
Display information about BGP neighbors
show bgp neighbor
Status of interfaces on which MPLS is running
show mpls interface
Configured LSPs on the router or switch, as well as all ingress, transit, and egress LSPs
show mpls lsp
Routes that form a label-switched path
show route label-switched-path
Status of interfaces on which RSVP is running
show rsvp interface
Currently active RSVP sessions
show rsvp session
RSVP packet and error counters
show rsvp statistics
Junos OS Operational Mode Commands That Combine Other Commands
In some cases, some Junos OS operational commands are created from a combination of other operational commands. These commands can be useful shortcuts for collecting information about the device, as shown in Figure 1.
Understanding the brief, detail, extensive, and terse Options of Junos OS Operational Commands
The Junos OS operational mode commands can include brief, detail, extensive, or terse options. You can use these options to control the amount of information you want to view.
Use the ? prompt to list options available for the command. For example:
user@host> show interfaces fe-1/1/1 ?
Possible completions: <[Enter]> Execute this command brief Display brief output descriptions Display interface description strings detail Display detailed output extensive Display extensive output media Display media information snmp-index SNMP index of interface statistics Display statistics and detailed output terse Display terse output | Pipe through a command
Choose the option you wish to use with the command. (See Figure 2.)
Interface Naming Conventions Used in the Junos OS Operational Commands
This topic explains the interface naming conventions used in the Junos OS operational commands, and contains the following sections:
Physical Part of an Interface Name
The physical interface naming conventions for Junos OS platforms is as follows:
On SRX devices, the unique name of each network interface has the following format to identify the physical device that corresponds to a single physical network connector:type-slot/pim-or-ioc/port
On other platforms, when you display information about an interface, you specify the 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:type-fpc/pic/port
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. In the virtual part of the name, a period (.) separates the port and logical unit numbers:
Channel Identifier Part of an Interface Name
The channel identifier part of the 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.
Depending on the type of channelized interface, up to three levels of channelization can be specified. For more information, see the Junos Network Interfaces Configuration Guide.
A colon (:) separates the physical and virtual parts of the interface name:
Using Wildcard Characters in Interface Names
You can use wildcard characters in the Junos OS operational commands to specify groups of interface names without having to type each name individually. Table 2 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
Match any string of characters in that position in the interface name. For example, so* matches all SONET/SDH interfaces.
Match one or more individual characters in that position in the interface name. For example, so-“”* matches all SONET/SDH interfaces in slots 0 and 3.
Match all characters except the ones included in the brackets. For example, so-“[!03]”* matches all SONET/SDH interfaces except those in slots 0 and 3.
Match a range of characters. For example, so-“[0-3]” * matches all SONET/SDH interfaces in slots 0, 1, 2, and 3.
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.