Home‎ > ‎Juniper‎ > ‎

JUNOS Cheat Sheet

COMMAND   Description Example

Chassis Management


show chassis alarm 
Chassis alarm status
show chassis craft-interface
Information currently on craft display
show chassis environment 
Environmental information & temperature
show chassis routing-engine
Displays info about the RE, memory & CPU utilization
show chassis hardware  detail/frus/ext Hardware inventory + serial numbers; frus shows fans; ext shows eeprom
show chassis fpc  detail FPC and PIC status
show chassis fpc pic-satus
Displays info for all PICs
show chassis mac-addresses 
MAC address
show chassis [feb | scb | ssb | sfm slot] 
PFE control board status

System management

show host
ns lookup show host www.cisco.com
show version
displays software running on the box
show system software
displays installed packages
show system uptime
uptime of the router
show system processes extensive/summary Show the process table
show system statistics ip, icmp,… Show protocol statistics
show system users
Show users currently logged into the system
request system reboot
Restarts the system
request system halt
Stops the router and prepares it to be shut down
request system reboot
Reboot the system
request system snapshot
Save config in /altconfig and software in /altroot before upgrade
request support information
show tech
request system software add <pkgname>
performs bsd pgkadd; always use jbundle (4->5 jinstall)
restart <process> [ gracefully, immediately, soft]
Restart process


enters configuration mode
displays the current configuration show protocols ospf

| match  item filters the output of the command show config | match firewall

| find item filters starting with the regular expression show config | find firewall

| save <file> save configuration as <file>
modifies configuration statements edit protocols ospf
sets configuration statements set chassis alarm sonet lo1 red
removes configuration statements
exists edit mode and also config mode
save, validate and activate a complete config
commit check
just check config do not apply
commit confirmed x
activates config for a x minutes and then ask for confirmation, x=10 default
commit and-quit
activates config and exists edit mode
rollback 0
deletes the new edited changes and returns to current config
returns to the last commited config
rollback    +    commit
it will return to previously saved config. Only at the top level!
load merge </var/home/user/config>
combines the current config and the new one
load override </var/home/user/config>
erases the candidate config and replaces it with "luis"
load merge terminal
copy and paste portions of the config, vanaf root config
show | compare
compares the candidate config with the running config
file list
displays all files on this user home directory
file list /config
displays all files on the /config directory
file show <file>
displays content of <file>

Managing files

start shell

/config flashdisk contains active config and rollbacks 1,2 & 3
/var/db/config harddisk contains rollback files 4 through 49
/var/tmp harddisk contains core files generated by the daemons when they crash
/var/log harddisk files generated by the logging and traceoptions
/var/home harddisk contains subdirectory per user
/altroot harddisk contains a copy of the root file structure form the flash drive request system snapshot
/altconfig harddisk contains a copy of the /config file structure on the flash drive request system snapshot

Logs located in /var/log

show log messages
shows all the logs, location is /var/log
show log  file-name
shows logs about an specific log file show log bgp-events.0
show log cli
show logs about cli commands issued
show log chassisd
show logs about chassis probs
show log install
show logs releveant to an install JUNOS version
show log debug
show daemon logs
show log messages?
displays all the files with their dates of the collected logs
show log inventory
shows logs about inventory
monitor start  file-name
monitors logs in real time
monitor stop
stops monitoring

Show interfaces

show interfaces extensive shows all possible info about an interface

terse shows ip interface brief

description shows interfaces description

media Display media information

statistics Display statistics and detailed info

routing Display routing status
monitor interface 
monitors interface real-time statistics
monitor traffic
prints packet headers to your terminal screen for info sent/received by the RE
monitor start <var/log/file>
prints logfile to your terminal screen
show arp
shows ARP entries
 clear interfaces statistics so-2/0/1
reset counters & statistics for this particular interface


show route
show ip route
show route protocol [static, isis…]
show ip route for an specific protocol show route protocol static
show route x.x.x.x extensive
extensive view of a route


show firewall
show packet/byte counts for all policing filters
show firewall log detail log in memory resident buffer/kernel cache (detail: packet length)
clear firewall [all|filter-name|counter-name]
clears counters
show interfaces filters
displays all firewall filters on all interfaces
show interfaces policers
displays all firewall policers on all interfaces
show policer
displays all policers, where it is used and no. packets processed


icmp echo-request/echo-response
ping atm interface <intf> vci <nr>
ping remote atm interface using oam cells
send udp 33434/ttl=1- receive icmp time-exceeded

send udp 33435/ttl=2 - receive icmp time-exceeded

send udp 33439/ttl=6 - receive icmp port unreachable
set t3-options loopback local and delete sets loopback on PIC towards router
set t3-options loopback remote and delete sets loopback on PIC towards far-end

set t3-options bert-period 120 
Bit Error Rate Testing
set t3-options bert-algorithm all-ones-repeating

set t3-options bert-error-rate 0

test interface t3-1/2/0 t3-bert-start and stop

show interfaces t3-1/2/0 extensive | find bert


test policy <policy-name> 0/0
Pass all routes (0/0) through the policy as test