Welcome to this compilation of the most common Juniper / Junos Troubleshooting and Operational Commands. Based on the documentation and the experience we have achieved along years working as a network engineer, we want to condense the hughest ammount of knowledge and experience in the minimum space, in order to become an useful "cheat sheet" able to help the network engineer on a daily basis.
We are not showing configuration commands. Juniper has tons of documentation in order to configure services. What we want to show is just the operational side, but focussing there, we want to create the best spreadsheet in the web. Please be welcome to help us with any additional commands or suggestions you may have. This site will always be under construction.
We are commited to avoid any copyright infringement, so if someone feels we do, please let us know. Our e-mail address is Esta dirección de correo electrónico está siendo protegida contra los robots de spam. Necesita tener JavaScript habilitado para poder verlo.
Most of these commands will be valid for the following models: MX80, MX104, MX160, MX204, MX240, MX480, MX960, EX2200, EX2300, EX3300, EX3400, EX4200, EX4600, QFX5100, QFX5100, QFX5110, QFX5120, QFX5200, QFX10002, PTX100, PTX3000, PTX5000, PTX10002, PTX10003, PTX10004, PTX10008, PTX10016, SRX300, SRX320, SRX340, SRX380, SRX550, SRX1500, SRX4100, SRX4200, SRX4600, SRX5400, SRX5600, SRX5800, ACX1000, ACX1100, ACX2100, ACX2200, ACX4000, ACX5000, ACX5400, ACX7000, ACX7100
Adittionally, feel free to check our other useful sites: www.bgplookingglass.com and www.routeservers.org
IOS | JUNOS | IOS-XR |
---|---|---|
show version | show version | show version |
show logging | show log messages | show logging |
show interface transceiver | show interface diagnosis optics | sh controllers <interface-id> phy |
Links of Interest | ||
JTAC Contact Numbers | http://www.juniper.net/support/requesting-support.html | |
Juniper Case Manager | https://casemanager.juniper.net/casemanager/ | |
Juniper Discussion Forum | http://forums.juniper.net/t5/Discussion-Forums/ct-p/Forums | |
Junos Software Download Page | https://www.juniper.net/support/downloads/ | |
Juniper Problem Report Search | https://prsearch.juniper.net/InfoCenter/index?page=prsearch | |
Juniper CLI Explorer | https://apps.juniper.net/cli-explorer/ | |
Unofficial Forum about Juniper | https://lists.gt.net/nsp/juniper/ | |
Unofficial IRC channel | Server: chat.freenode.net / Channel: #Juniper | |
Juniper Configuration Operational Commands | ||
edit / configure | enter configuration mode | |
exit configuration-mode | exit from configuration mode to operational mode without committing config changes | |
top | moves to the top level of the configuration hierarchy | |
top edit <path> | moves directly a specific path in the configuration hierarchy | |
up | moves up one level of configuration | |
copy <statement 1> to <statemement 2> | duplicates statement 1 and the entire hierarchy of statements configured under that statement | |
annotate | add comments to a configuration at the current hierarchy level. | |
activate / deactivate | activate / deactivate a configuration statement. if deactivated, config won't take effect when commited. | |
rename <id1> to <id2> | rename identifier id1 to id2 | |
insert term <stat1> before/after <stat2> | moves relative position between terms | |
replace pattern <pattern1> with <pattern2> | replace a pattern with a different one | |
protect <path> | protect the device configuration from being modified or deleted by other users | |
show configuration | display set | displays original commands used to enter configuration | |
show configuration | display set relative | displays original commands used to enter configuration just related to the current hierarchy level | |
show configuration | display inheritance | displays config including inherited terms from specific groups | |
show configuration | no-more | displays config without pagination | |
show configuration | match <exp> | displays config lines matching an expression | |
show configuration | find <exp> | displays config lines starting in the first match of one specific expression | |
run ...... | from configuration mode, execute commands in operational mode | |
configure private / update | enter configuration mode to edit privately from other users. commit only apply current user changes, not to others. to synchronize with other users, enter update command | |
configure exclusive | bans any other users of comitting changes | |
Juniper CLI & Date Operational Commands | ||
show cli history | show current session executed commands | |
show cli authorization | show my user authorization level | |
set cli directory <path> | changes current directory to the selected path | |
set cli timestamp | makes cli outputs with timestamp | |
set date <YYYYMMDDhhmm.ss> | set time & date | |
Juniper Commit Operational Commands | ||
commit | save, validate and activate a complete config | |
commit check | check for syntax errors in the candidate configuration | |
commit confirmed <minutes> | commit configuration and roll it back after a number of minutes (10 minutes default) | |
commit-and-quit | commit configuration and exit configuration mode | |
commit synchronize | commit changes in all routing engines | |
commit at <yyyy-mm-dd hh:mm[:ss]> | commit config at a certain time/date | |
commit at reboot | commit config at next reboot | |
commit comment | commit config adding changes description | |
commit full | commit config restarting all deamons (be very careful when applying this command) | |
commit | display detail | monitor the Junos commit process | |
clear system commit | from operational mode, clear all pending commit requests (similar to rollback) | |
show system commit | show list of commited config files | |
show system rollback compare 4 8 | display differences between config files 4 and 8 | |
show system rollback 32 | displays rollback config file 32 | |
request system commit | commit changes from operational mode | |
show | compare | show candidate configuration | |
show configuration | compare | from operational mode, show candidate configuration | |
rollback | returns to the most recently committed configuration and loads it without activating it, you need to commit it later | |
rollback 0 | discard uncommited changes | |
rollback 22 | loads config file 22 without activating it, you need to commit it later | |
Juniper VRRP Operational Commands | ||
show vrrp detail/extensive | show information about vrrp groups | |
clear vrrp | clear vrrp stats | |
Juniper LACP & MC-LAG Operational Commands | ||
show iccp | ||
show interfaces mc-ae | ||
show lacp interfaces | ||
show interfaces ae0 extensive | ||
Juniper Chassis Operational Commands | ||
show chassis hardware | displays a list of all Flexible PIC Concentrators (FPCs) and PICs installed in the router or switch chassis, including the hardware version level and serial number | |
show chassis routing-engine | displays info like memory load, CPU load, temperature and other parameters related to each Routing Engine. It also shows when it was the last reboot and why this happened | |
show chassis alarms | displays information about the the conditions that have been configured to trigger alarms | |
show chassis environment | displays environmental/temperature information related to the device. Also it shows power supply status | |
show chassis fpc detail | ||
show chassis mac-addresses | displays the media access control (MAC) addresses for the router or switch | |
show system core-dumps | shows system crash dumps | |
show system alarms | displays active system alarms | |
Juniper Beacon & Display Commands | ||
set chassis display fpc-slot 3 message Hola | shows message "hola" in VC member 3 lcd display | |
request chassis beacon fpc 2 on | turns on beacon on fpc number 2 | |
Juniper Switching & ARP Operational Commands | ||
show ethernet-switching table | show MAC table | |
clear ethernet-switching table | clears MAC table | |
clear ethernet-switching table interface | clears MAC table interface status | |
show ethernet-switching redundancy-groups arp-statistics | displays MC-LAG ARP statistics | |
show services statistics arp | displays ARP statistics | |
show arp | show ARPtable | |
Juniper Spanning Tree Operational Commands | ||
show spanning-tree bridge | show STP bridge parameters | |
show spanning-tree interface | show STP interface parameters | |
show spanning-tree mstp | show Multiple Spanning Tree Protocol information | |
show spanning-tree statistics | show STP statistics | |
clear spanning-tree statistics | clear STP statistics | |
Juniper Fusion Commands | ||
request chassis satellite shell-command fpc-slot 101 "shutdown -h now" | send shell comand to a Junos Fusion Satellite (in this case send "shutdown -h now" to FPC 101) | |
show chassis satellite | verifies that a device is recognized as a satellite device by the aggregator device | |
show chassis satellite interface | verifies cascade ports and uplink ports state | |
show chassis satellite neighbor | verifies that a cascade port recognizes a satellite device | |
show chassis satellite terse | verifies the hardware model of each satellite device | |
Juniper Packet Forwarding Engine Operational Commands | ||
show pfe terse | show list of Packet Forwarding Engine components | |
show pfe route | show Packet Forwarding Engine routing table | |
show pfe statistics | show Packet Forwarding Engine statistics | |
Juniper Virtual Chassis Operational Commands | ||
show virtual-chassis | shows virtual chassis members, their serial number, status, role (master, backup, linecard, VC interface involved) | |
show virtual-chassis vc-port | show inter-chassis interfaces anc vc-ports associated | |
request session member X | login a particular member (X) of the virtual chassis | |
request chassis routing-engine master switch | force routing-engine mastership switchover | |
show version invoke-on all-routing-engine | show Junos version installed in each Virtual Chassis member. It also applies to Standalone chassis with dual routing engines | |
Junos BFD Operational Commands | ||
show bfd session | display BFD session statistics | |
clear bfd session | clear bfd sessions | |
clear bfd adaptation | clear bfd parameters | |
Juniper RSVP Commands | ||
clear rsvp session | clear RSVP sessions and trigger fast reroute optimization | |
show rsvp interface | display the status of interfaces on which RSVP is running | |
show rsvp neighbor | display RSVP neighbors | |
show rsvp session | display currently active RSVP sessions | |
show rsvp statistics | display RSVP packet and error counters | |
show rsvp version | display RSVP version and configuration information | |
Juniper PPP Operational Commands | ||
show ppp summary | show PPP summary information | |
show ppp statistics | show PPP statistics | |
show ppp interface | show PPP interface information | |
show ppp address-pool | show PPP address pool information | |
clear ppp statistics | clear PPP statistics | |
Juniper Help Operational Commands | ||
help apropos <topic> | shows all commands related to the topic | |
help topic <topic> | help for high level topics | |
help reference <topic> | help information about a topic | |
help tip cli | displays a random tip | |
help syslog | info about specific error messages | |
Juniper RSI & Logs | ||
request support information | save /var/tmp/rsi.txt | gets RSI info and stores it in rsi.txt file | |
file archive compress source /var/log/ destination /var/tmp/logfile.tgz | compresses /log directory into one file | |
Juniper User Management Commands | ||
show system users | show connected users to the device | |
request system logout user xxx | force logout to user xxx | |
request message all message "hola" | send message "hola" to all logged users in the device | |
show arp | request message user will.jack | sends arp table output to will.jack terminal | |
show log user all-members | displays all users last logins | |
status | display the users currently editing the configuration | |
Load Commands | ||
load merge terminal | loads and merge config directly from router terminal | |
load merge terminal relative | loads and merge config relative to current edit point | |
load merge /var/tmp/ddd.txt | loads and merge directly from file | |
load replace terminal | loads and replace config directly from router terminal | |
load replace terminal relative | loads and merge config relative to current edit point | |
load replace /var/tmp/ddd.txt | loads and merge directly from file | |
Juniper Request Commands | ||
request system reboot | reboot device | |
request system halt | gracefully terminates software processes, but not the chassis | |
request system zeroize | erase all data (config + logs) | |
request system power-off | power-off all the chassis (but the fun) | |
request session member 4 | log in virtual-chassis member number 4 | |
Juniper Monitoring Commands | ||
monitor start messages | displays "messages" log file in real time | |
monitor stop messages | stops displaying "messages" log file in real time | |
monitor interface ge-x/y/z | real-time statistics monitor of one interface | |
monitor traffic interface ge-x/y/z no-resolve detail | displays real-time control traffic | |
monitor traffic interface ae10 extensive no-resolve write-file /var/tmp/test.pcap | It creates a pcap file of a trace in interface ae10 (tested in MX routers). This can be exported and opened with Wireshark tool. | |
Juniper DHCP Operational Commands | ||
show dhcp relay binding <routing-instance name> | shows current dhcp leases | |
Juniper SNMP Commands | ||
show snmp mib get <oid> | show value for a specific OID | |
show snmp mib walk <oid> | show snmpwalk for that specific OID | |
Juniper Shell Commands | ||
start shell | enter shell mode | |
cli | enter cli mode | |
start shell user root | enter shell with root user | |
top | lists running processes | |
df -k | lists disk partition | |
Juniper FPC Commands | ||
start shell pfe network fpc0 or start shell + vty fpc0 |
enter fpc0 cli | |
test xfp 1 laser off | disable XFP optic 1 | |
Juniper OSPF Operational Commands | ||
show ip ospf database | view OSPF database | |
show ip ospf interface | view OSPF interfaces | |
show ip route ospf | display the current state of the routing table learnt through OSPF Protocol | |
Juniper DDoS Violation Operational Commands | ||
show ddos-protection protocols | it shows an overview of the DDoS violation, sorted by ptotocol | |
show ddos-protection protocols statistics brief | it shows an overview of the DDoS violation statistics | |
show ddos-protection resolve | it shows specific information about DDoS violations for the protocol "resolve". There are more than 40 protocols to be queried |