Topic: tech juniper ijos prev next

tech juniper ijos > 03: Junos CLI Operations

03: Junos CLI Operations

Interacting with Junos OS

Use the physical console port (9600bps, 8/1/N), console port provided by the hypervisor, SSH or Telnet. Some devices have a dedicated management Ethernet port. The actual name of the dedicated management Ethernet port varies by platform.

J-web is installed and enabled by default on most devices running Junos.

Junos Automation Interfaces

The Junos XML API defines XML tags that correspond to Junos configuration statements and many operational commands. Every Junos configuration statement has an equivalent XML tag. The JSON REST API has an equivalent to every XML API tag; JSON is converted to XML behind the scenes.

Juniper Extension Toolkit (JET) APIs provide a modern, programmatic interface for network operators to extend Junos capabilities.

Accessing the CLI

Non-root users are placed into the CLI automatically on login. The root user has full control of the system and is placed in the Unix CLI on login. The % prompt identifies Unix CLI mode (# on vSRX devices). Run the cli command to enter the Junos CLI.

Operational mode is identified by a > prompt. Configuration mode is identified by a # prompt.

Junos CLI Help

Typing a ? at the CLI gives contextual help, listing valid commands to follow the command that has already been typed.

The help command gives more specific help. For example, help topic interfaces. Contextual help for the help command is also available.

help reference gives more detailed configuration syntax help based on the current level in the configuration hierarchy.

help apropos provides more context to a specific variable by providing set statements.

Common Monitoring and Troubleshooting Commands

show version
show system uptime
show chassis hardware
show chassis alarms
show chassis routing-engine
show route
show interfaces
monitor traffic interface <interface>
monitor interface traffic
file (list | copy | delete)
(ping | traceroute | ssh) <hostname/IP>
restart dhcp-service
request system (power-off | reboot)