Written for Junos OS 24.4 on EX switches, SRX firewalls and MX routers, and checked against Juniper's published Junos 24.4 data models. Some sections say which devices they're for, and Junos OS Evolved can differ. Each command shows the mode it's typed in: operational is the > prompt you get after logging in, and configuration is # (after configure). Config changes do nothing until you commit them, and commit confirmed undoes them by itself if you lose access. Names, addresses and passwords are examples, so swap in your own.

Modes and getting around #

  • Start the Junos CLI after logging in as rootJuniper Junos · Shell (%)
    cli
  • Go into configuration modeJuniper Junos · Operational mode (>)
    configure
  • Edit your own copy of the config, so other people's uncommitted changes aren't mixed inJuniper Junos · Operational mode (>)
    configure private
  • Edit the config and stop anyone else changing itJuniper Junos · Operational mode (>)
    configure exclusive
  • Show who else is editing the configJuniper Junos · Configuration mode (#)
    status
  • Move into part of the config, so commands are shorterJuniper Junos · Configuration mode (#)
    edit interfaces ge-0/0/0
  • Go up one levelJuniper Junos · Configuration mode (#)
    up
  • Go back to the top of the configJuniper Junos · Configuration mode (#)
    top
  • Run an operational command from configuration modeJuniper Junos · Configuration mode (#)
    run show interfaces terse
  • Leave configuration modeJuniper Junos · Configuration mode (#)
    exit
  • Show the words that can come nextJuniper Junos · Operational mode (>)
    show interfaces ?
  • Stop output pausing at the end of each screenJuniper Junos · Operational mode (>)
    set cli screen-length 0
  • Show times in your local time zoneJuniper Junos · Operational mode (>)
    set cli timestamp

Filtering output #

  • Show the config as set commandsJuniper Junos · Operational mode (>)
    show configuration | display set
  • Show only lines that match some textJuniper Junos · Operational mode (>)
    show interfaces terse | match ge-0/0/
  • Show lines that match one of several wordsJuniper Junos · Operational mode (>)
    show interfaces terse | match "ge-0/0/|lo0"
  • Hide lines that match some textJuniper Junos · Operational mode (>)
    show interfaces terse | except down
  • Count the matching linesJuniper Junos · Operational mode (>)
    show interfaces terse | match up | count
  • Start the output at the first matchJuniper Junos · Operational mode (>)
    show configuration | find protocols
  • Show the last linesJuniper Junos · Operational mode (>)
    show log messages | last 50
  • Show everything without pausingJuniper Junos · Operational mode (>)
    show configuration | no-more
  • Show output as JSONJuniper Junos · Operational mode (>)
    show interfaces terse | display json
  • Show output as XML, with the RPC to get it in scriptsJuniper Junos · Operational mode (>)
    show interfaces terse | display xml rpc
  • Save the output to a fileJuniper Junos · Operational mode (>)
    show configuration | save /var/tmp/backup.conf
  • Rerun a command every few secondsJuniper Junos · Operational mode (>)
    show interfaces terse | refresh 2
  • Show where a setting came from, including groupsJuniper Junos · Configuration mode (#)
    show interfaces | display inheritance

Commit, compare and roll back #

  • Check the changes without applying themJuniper Junos · Configuration mode (#)
    commit check
  • Apply the changesJuniper Junos · Configuration mode (#)
    commit
  • Apply the changes, and undo them in a few minutes unless you confirmJuniper Junos · Configuration mode (#)
    commit confirmed 5

    Warning: If you lose access, it rolls back by itself. Run commit (or commit check) before the time is up to keep the changes.

  • Apply the changes with a note in the historyJuniper Junos · Configuration mode (#)
    commit comment "Add VLAN 20 for printers"
  • Apply the changes and leave configuration modeJuniper Junos · Configuration mode (#)
    commit and-quit
  • Apply on both Routing Engines, or every Virtual Chassis memberJuniper Junos · Configuration mode (#)
    commit synchronize
  • See the changes you haven't committedJuniper Junos · Configuration mode (#)
    show | compare
  • Compare the config with an earlier commitJuniper Junos · Configuration mode (#)
    show | compare rollback 1
  • Throw away the changes you haven't committedJuniper Junos · Configuration mode (#)
    rollback 0
  • Load an earlier commit, ready to commit againJuniper Junos · Configuration mode (#)
    rollback 1

    Warning: Replaces every uncommitted change. Check it with show | compare, then commit.

  • List the commit historyJuniper Junos · Operational mode (>)
    show system commit
  • Show what changed between two earlier commitsJuniper Junos · Operational mode (>)
    show system rollback 1 compare 0
  • Save the current config as the rescue configJuniper Junos · Operational mode (>)
    request system configuration rescue save
  • Load the rescue config, ready to commitJuniper Junos · Configuration mode (#)
    rollback rescue
  • Save the config to a fileJuniper Junos · Configuration mode (#)
    save /var/tmp/backup.conf
  • Merge config from a fileJuniper Junos · Configuration mode (#)
    load merge /var/tmp/backup.conf
  • Paste in set commands (finish with Ctrl+D)Juniper Junos · Configuration mode (#)
    load set terminal
  • Paste in config in curly-brace format (finish with Ctrl+D)Juniper Junos · Configuration mode (#)
    load merge terminal
  • Replace the whole config from a fileJuniper Junos · Configuration mode (#)
    load override /var/tmp/backup.conf

    Warning: Everything not in the file is removed when you commit. Use commit confirmed.

  • Delete part of the configJuniper Junos · Configuration mode (#)
    delete interfaces ge-0/0/0 unit 0

    Warning: Takes effect at the next commit. Check with show | compare first.

  • Turn part of the config off without deleting itJuniper Junos · Configuration mode (#)
    deactivate interfaces ge-0/0/0
  • Turn it back onJuniper Junos · Configuration mode (#)
    activate interfaces ge-0/0/0
  • Copy one interface's config to anotherJuniper Junos · Configuration mode (#)
    copy interfaces ge-0/0/0 to ge-0/0/1

Basic setup #

  • Set the hostnameJuniper Junos · Configuration mode (#)
    set system host-name ex-sw1
  • Set the domain nameJuniper Junos · Configuration mode (#)
    set system domain-name example.com
  • Set the DNS serversJuniper Junos · Configuration mode (#)
    set system name-server 192.0.2.53
  • Set the time zoneJuniper Junos · Configuration mode (#)
    set system time-zone Europe/Dublin
  • Set an NTP serverJuniper Junos · Configuration mode (#)
    set system ntp server 192.0.2.123
  • Set the root password (you're asked for it)Juniper Junos · Configuration mode (#)
    set system root-authentication plain-text-password
  • Add an admin user (you're asked for the password)Juniper Junos · Configuration mode (#)
    set system login user admin class super-user authentication plain-text-password
  • Add a read-only userJuniper Junos · Configuration mode (#)
    set system login user admin class read-only authentication plain-text-password
  • Add an SSH key for a userJuniper Junos · Configuration mode (#)
    set system login user admin authentication ssh-ed25519 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample admin@laptop"
  • Set a login bannerJuniper Junos · Configuration mode (#)
    set system login message "Authorised access only"
  • Stop root logging in over SSHJuniper Junos · Configuration mode (#)
    set system services ssh root-login deny
  • Turn off TelnetJuniper Junos · Configuration mode (#)
    delete system services telnet
  • Turn on NETCONF over SSH, for Ansible and other automationJuniper Junos · Configuration mode (#)
    set system services netconf ssh
  • Set the management interface's address (fxp0 on MX and SRX)Juniper Junos · Configuration mode (#)
    set interfaces fxp0 unit 0 family inet address 192.0.2.10/24
  • Set the management interface's address (me0 on EX)Juniper Junos · Configuration mode (#)
    set interfaces me0 unit 0 family inet address 192.0.2.10/24
  • Set a default routeJuniper Junos · Configuration mode (#)
    set routing-options static route 0.0.0.0/0 next-hop 192.168.1.1
  • Disconnect after failed login attemptsJuniper Junos · Configuration mode (#)
    set system login retry-options tries-before-disconnect 3

Show and verify #

  • Show the Junos version and modelJuniper Junos · Operational mode (>)
    show version
  • Show the model, version and Junos familyJuniper Junos · Operational mode (>)
    show system information
  • List the hardware, with serial numbersJuniper Junos · Operational mode (>)
    show chassis hardware
  • Show chassis alarms (fans, power, temperature)Juniper Junos · Operational mode (>)
    show chassis alarms
  • Show system alarms (licences, rescue config, partitions)Juniper Junos · Operational mode (>)
    show system alarms
  • Show temperatures, fans and power suppliesJuniper Junos · Operational mode (>)
    show chassis environment
  • Show the Routing Engine's CPU, memory and uptimeJuniper Junos · Operational mode (>)
    show chassis routing-engine
  • Show how long it's been up, and the last commitJuniper Junos · Operational mode (>)
    show system uptime
  • Show who's logged inJuniper Junos · Operational mode (>)
    show system users
  • Show disk spaceJuniper Junos · Operational mode (>)
    show system storage
  • List interfaces with their status and addressesJuniper Junos · Operational mode (>)
    show interfaces terse
  • Show one interface in full, with errors and countersJuniper Junos · Operational mode (>)
    show interfaces ge-0/0/0 extensive
  • List interface descriptionsJuniper Junos · Operational mode (>)
    show interfaces descriptions
  • Show optic light levelsJuniper Junos · Operational mode (>)
    show interfaces diagnostics optics ge-0/0/0
  • List LLDP neighboursJuniper Junos · Operational mode (>)
    show lldp neighbors
  • Show the ARP table, without looking up namesJuniper Junos · Operational mode (>)
    show arp no-resolve
  • Show one part of the configJuniper Junos · Operational mode (>)
    show configuration interfaces ge-0/0/0
  • Show licencesJuniper Junos · Operational mode (>)
    show system license

Interfaces #

  • Set a descriptionJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 description "Uplink to core"
  • Set an IPv4 addressJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family inet address 192.168.10.1/24
  • Set an IPv6 addressJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:10::1/64
  • Get an address by DHCPJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family inet dhcp
  • Shut an interface downJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 disable
  • Bring an interface back upJuniper Junos · Configuration mode (#)
    delete interfaces ge-0/0/0 disable
  • Set the MTUJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 mtu 9192
  • Set a loopback addressJuniper Junos · Configuration mode (#)
    set interfaces lo0 unit 0 family inet address 10.255.255.1/32
  • Add a tagged subinterface for a VLAN (routers and SRX)Juniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 10 vlan-id 10 set interfaces ge-0/0/0 unit 10 family inet address 192.168.10.1/24
  • Group several ports so you can configure them onceJuniper Junos · Configuration mode (#)
    set interfaces interface-range ACCESS-PORTS member-range ge-0/0/0 to ge-0/0/23
  • Clear an interface's countersJuniper Junos · Operational mode (>)
    clear interfaces statistics ge-0/0/0
  • Watch an interface's traffic and errors liveJuniper Junos · Operational mode (>)
    monitor interface ge-0/0/0
  • Watch traffic on every interfaceJuniper Junos · Operational mode (>)
    monitor interface traffic

VLANs and switching (EX and QFX) #

  • Make a VLANJuniper Junos · Configuration mode (#)
    set vlans USERS vlan-id 10
  • Make a port an access port in a VLANJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode access vlan members USERS
  • Make a port a trunk carrying some VLANsJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode trunk vlan members [ USERS SERVERS ]
  • Carry every VLAN on a trunkJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode trunk vlan members all
  • Set a trunk's native (untagged) VLANJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 native-vlan-id 10
  • Put a range of ports in a VLANJuniper Junos · Configuration mode (#)
    set interfaces interface-range ACCESS-PORTS unit 0 family ethernet-switching interface-mode access vlan members USERS
  • Give a VLAN a gateway address (IRB)Juniper Junos · Configuration mode (#)
    set interfaces irb unit 10 family inet address 192.168.10.1/24 set vlans USERS l3-interface irb.10
  • List VLANs and their portsJuniper Junos · Operational mode (>)
    show vlans
  • Show the MAC address tableJuniper Junos · Operational mode (>)
    show ethernet-switching table
  • Find which port a MAC address is onJuniper Junos · Operational mode (>)
    show ethernet-switching table | match aa:bb:cc:00:01:00
  • Show each port's mode and VLANsJuniper Junos · Operational mode (>)
    show ethernet-switching interface
  • Clear the MAC address tableJuniper Junos · Operational mode (>)
    clear ethernet-switching table

Spanning tree (EX and QFX) #

  • Run RSTP on every portJuniper Junos · Configuration mode (#)
    set protocols rstp interface all
  • Make a port an edge port (to a host, not a switch)Juniper Junos · Configuration mode (#)
    set protocols rstp interface ge-0/0/0 edge
  • Shut edge ports that receive BPDUsJuniper Junos · Configuration mode (#)
    set protocols rstp bpdu-block-on-edge
  • Make this switch the root bridgeJuniper Junos · Configuration mode (#)
    set protocols rstp bridge-priority 4k
  • Show the root bridge and this switch's priorityJuniper Junos · Operational mode (>)
    show spanning-tree bridge
  • Show each port's spanning tree role and stateJuniper Junos · Operational mode (>)
    show spanning-tree interface
  • Re-enable a port shut by a BPDUJuniper Junos · Operational mode (>)
    clear error bpdu interface ge-0/0/0

Static routing and routing instances #

  • Add a static routeJuniper Junos · Configuration mode (#)
    set routing-options static route 10.20.0.0/16 next-hop 192.168.1.254
  • Add a backup static route that's only used if the main one failsJuniper Junos · Configuration mode (#)
    set routing-options static route 10.20.0.0/16 qualified-next-hop 192.168.1.253 preference 200
  • Drop traffic for a range (a discard route)Juniper Junos · Configuration mode (#)
    set routing-options static route 10.20.0.0/16 discard
  • Make a routing instance (like a VRF without MPLS)Juniper Junos · Configuration mode (#)
    set routing-instances CUSTOMER-A instance-type virtual-router set routing-instances CUSTOMER-A interface ge-0/0/0.0
  • Show the routing tableJuniper Junos · Operational mode (>)
    show route
  • Show the route to an addressJuniper Junos · Operational mode (>)
    show route 192.168.1.20
  • Show static routesJuniper Junos · Operational mode (>)
    show route protocol static
  • Show a routing instance's tableJuniper Junos · Operational mode (>)
    show route table CUSTOMER-A.inet.0
  • Show how many routes there are, by protocolJuniper Junos · Operational mode (>)
    show route summary
  • Show the forwarding table entry for an addressJuniper Junos · Operational mode (>)
    show route forwarding-table destination 192.168.1.20

OSPF #

  • Set the router IDJuniper Junos · Configuration mode (#)
    set routing-options router-id 10.255.255.1
  • Run OSPF on an interfaceJuniper Junos · Configuration mode (#)
    set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
  • Advertise the loopback without sending hellos on itJuniper Junos · Configuration mode (#)
    set protocols ospf area 0.0.0.0 interface lo0.0 passive
  • Set an OSPF interface to point-to-pointJuniper Junos · Configuration mode (#)
    set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
  • List OSPF neighboursJuniper Junos · Operational mode (>)
    show ospf neighbor
  • List OSPF interfacesJuniper Junos · Operational mode (>)
    show ospf interface
  • Show the OSPF databaseJuniper Junos · Operational mode (>)
    show ospf database
  • Show routes learned by OSPFJuniper Junos · Operational mode (>)
    show route protocol ospf

BGP #

  • Set the AS numberJuniper Junos · Configuration mode (#)
    set routing-options autonomous-system 65001
  • Add an external (eBGP) neighbourJuniper Junos · Configuration mode (#)
    set protocols bgp group TRANSIT type external set protocols bgp group TRANSIT peer-as 65002 set protocols bgp group TRANSIT neighbor 198.51.100.1
  • Write a policy that advertises a prefixJuniper Junos · Configuration mode (#)
    set policy-options prefix-list OUR-PREFIXES 10.20.0.0/16 set policy-options policy-statement ALLOW-WEB term OURS from prefix-list OUR-PREFIXES set policy-options policy-statement ALLOW-WEB term OURS then accept
  • Advertise with that policyJuniper Junos · Configuration mode (#)
    set protocols bgp group TRANSIT export ALLOW-WEB
  • Show BGP neighbours and how many prefixes each sendsJuniper Junos · Operational mode (>)
    show bgp summary
  • Show one neighbour in detailJuniper Junos · Operational mode (>)
    show bgp neighbor 198.51.100.1
  • Show the routes a neighbour sends youJuniper Junos · Operational mode (>)
    show route receive-protocol bgp 198.51.100.1
  • Show the routes you send a neighbourJuniper Junos · Operational mode (>)
    show route advertising-protocol bgp 198.51.100.1
  • Ask a neighbour to send its routes again, without dropping the sessionJuniper Junos · Operational mode (>)
    clear bgp neighbor 198.51.100.1 soft-inbound
  • Reset a BGP sessionJuniper Junos · Operational mode (>)
    clear bgp neighbor 198.51.100.1

    Warning: Drops the session and every route learned from it until it comes back up.

Firewall filters (ACLs) #

  • Allow SSH only from a management range, to the switch or router itselfJuniper Junos · Configuration mode (#)
    set firewall family inet filter PROTECT-RE term ALLOW-SSH from source-address 192.0.2.0/24 set firewall family inet filter PROTECT-RE term ALLOW-SSH from protocol tcp set firewall family inet filter PROTECT-RE term ALLOW-SSH from destination-port ssh set firewall family inet filter PROTECT-RE term ALLOW-SSH then accept set firewall family inet filter PROTECT-RE term BLOCK-SSH from protocol tcp set firewall family inet filter PROTECT-RE term BLOCK-SSH from destination-port ssh set firewall family inet filter PROTECT-RE term BLOCK-SSH then discard set firewall family inet filter PROTECT-RE term EVERYTHING-ELSE then accept
  • Apply a filter to traffic for the device itself (lo0)Juniper Junos · Configuration mode (#)
    set interfaces lo0 unit 0 family inet filter input PROTECT-RE

    Warning: A mistake here can lock you out, including routing protocols. Apply it with commit confirmed.

  • Apply a filter to traffic coming in on an interfaceJuniper Junos · Configuration mode (#)
    set interfaces ge-0/0/0 unit 0 family inet filter input PROTECT-RE
  • Count matches on a termJuniper Junos · Configuration mode (#)
    set firewall family inet filter PROTECT-RE term BLOCK-SSH then count blocked-ssh
  • Show a filter's countersJuniper Junos · Operational mode (>)
    show firewall filter PROTECT-RE
  • Clear a filter's countersJuniper Junos · Operational mode (>)
    clear firewall filter PROTECT-RE

SRX security: zones, policies and NAT #

  • Put an interface in a security zoneJuniper Junos · Configuration mode (#)
    set security zones security-zone trust interfaces ge-0/0/0.0
  • Allow ping and SSH to the SRX from a zoneJuniper Junos · Configuration mode (#)
    set security zones security-zone trust host-inbound-traffic system-services ping set security zones security-zone trust host-inbound-traffic system-services ssh
  • Add an address to a zone's address bookJuniper Junos · Configuration mode (#)
    set security address-book global address MGMT-NET 192.0.2.0/24
  • Allow web traffic from one zone to anotherJuniper Junos · Configuration mode (#)
    set security policies from-zone trust to-zone untrust policy ALLOW-WEB match source-address any set security policies from-zone trust to-zone untrust policy ALLOW-WEB match destination-address any set security policies from-zone trust to-zone untrust policy ALLOW-WEB match application [ junos-http junos-https ] set security policies from-zone trust to-zone untrust policy ALLOW-WEB then permit
  • Log sessions that a policy allowsJuniper Junos · Configuration mode (#)
    set security policies from-zone trust to-zone untrust policy ALLOW-WEB then log session-close
  • Move a policy above anotherJuniper Junos · Configuration mode (#)
    insert security policies from-zone trust to-zone untrust policy ALLOW-WEB before policy DENY-ALL
  • Hide a zone behind the outside interface's address (source NAT)Juniper Junos · Configuration mode (#)
    set security nat source rule-set TRUST-TO-UNTRUST from zone trust set security nat source rule-set TRUST-TO-UNTRUST to zone untrust set security nat source rule-set TRUST-TO-UNTRUST rule HIDE-TRUST match source-address 0.0.0.0/0 set security nat source rule-set TRUST-TO-UNTRUST rule HIDE-TRUST then source-nat interface
  • List zones and their interfacesJuniper Junos · Operational mode (>)
    show security zones
  • List policies with how often each was hitJuniper Junos · Operational mode (>)
    show security policies hit-count
  • Find which policy would handle some trafficJuniper Junos · Operational mode (>)
    show security match-policies from-zone trust to-zone untrust source-ip 192.168.1.20 destination-ip 203.0.113.80 source-port 50000 destination-port 443 protocol tcp
  • Show how many sessions there areJuniper Junos · Operational mode (>)
    show security flow session summary
  • Show sessions to an addressJuniper Junos · Operational mode (>)
    show security flow session destination-prefix 203.0.113.80
  • Show source NAT rules and how often each was usedJuniper Junos · Operational mode (>)
    show security nat source rule all
  • Clear every sessionJuniper Junos · Operational mode (>)
    clear security flow session all

    Warning: Drops every connection through the SRX, including yours if you're connected through it.

AAA, logging and SNMP #

  • Add a RADIUS serverJuniper Junos · Configuration mode (#)
    set system radius-server 192.168.1.5 secret "MySharedSecret"

    Warning: The secret ends up in your command history. Junos stores it encrypted in the config.

  • Add a TACACS+ serverJuniper Junos · Configuration mode (#)
    set system tacplus-server 192.168.1.5 secret "MySharedSecret"

    Warning: The secret ends up in your command history. Junos stores it encrypted in the config.

  • Try RADIUS first, then local accountsJuniper Junos · Configuration mode (#)
    set system authentication-order [ radius password ]
  • Send logs to a syslog serverJuniper Junos · Configuration mode (#)
    set system syslog host 192.0.2.50 any notice
  • Log config changes to their own fileJuniper Junos · Configuration mode (#)
    set system syslog file interactive-commands interactive-commands any
  • Set a read-only SNMP communityJuniper Junos · Configuration mode (#)
    set snmp community MyCommunity authorization read-only

    Warning: SNMPv1 and v2c send the community in plain text. Limit it to your monitoring server with a client list, or use SNMPv3.

  • Show the main logJuniper Junos · Operational mode (>)
    show log messages | last 50
  • Search the main logJuniper Junos · Operational mode (>)
    show log messages | match ge-0/0/
  • Show who changed whatJuniper Junos · Operational mode (>)
    show log interactive-commands | last 50
  • Follow the main log liveJuniper Junos · Operational mode (>)
    monitor start messages
  • Stop following logsJuniper Junos · Operational mode (>)
    monitor stop

Troubleshooting #

  • Ping an addressJuniper Junos · Operational mode (>)
    ping 192.168.1.20 count 5
  • Ping fast, from a given source addressJuniper Junos · Operational mode (>)
    ping 192.168.1.20 source 10.255.255.1 rapid count 100
  • Ping inside a routing instanceJuniper Junos · Operational mode (>)
    ping 192.168.1.20 routing-instance CUSTOMER-A
  • Trace the route to an addressJuniper Junos · Operational mode (>)
    traceroute 192.168.1.20
  • Capture packets to and from the device itselfJuniper Junos · Operational mode (>)
    monitor traffic interface ge-0/0/0 no-resolve
  • Show the processes using the most CPUJuniper Junos · Operational mode (>)
    show system processes extensive | no-more
  • Show the messages from the last bootJuniper Junos · Operational mode (>)
    show system boot-messages
  • Show the state of the line cards and their portsJuniper Junos · Operational mode (>)
    show chassis fpc pic-status
  • Show core dumps from crashed processesJuniper Junos · Operational mode (>)
    show system core-dumps
  • Save support information for JTACJuniper Junos · Operational mode (>)
    request support information | save /var/tmp/rsi.txt
  • Open a Unix shellJuniper Junos · Operational mode (>)
    start shell

    Warning: Changes made in the shell bypass the config and its history. Use it to look, not to fix.

Files, upgrades and reboots #

  • List filesJuniper Junos · Operational mode (>)
    file list /var/tmp
  • Copy a file from a server over SCPJuniper Junos · Operational mode (>)
    file copy scp://[email protected]/images/junos.tgz /var/tmp/
  • Delete a fileJuniper Junos · Operational mode (>)
    file delete /var/tmp/backup.conf
  • See what a storage clean-up would deleteJuniper Junos · Operational mode (>)
    request system storage cleanup dry-run
  • Free up disk space by deleting old logs and temporary filesJuniper Junos · Operational mode (>)
    request system storage cleanup
  • Install a Junos upgrade and rebootJuniper Junos · Operational mode (>)
    request system software add /var/tmp/junos-install-ex.tgz reboot

    Warning: The device reboots and drops traffic. Save a rescue config first, and do it in a maintenance window.

  • RebootJuniper Junos · Operational mode (>)
    request system reboot

    Warning: Drops traffic until it's back up.

  • Reboot in a few minutesJuniper Junos · Operational mode (>)
    request system reboot in 5
  • Shut down so the power can be removedJuniper Junos · Operational mode (>)
    request system power-off
  • Wipe the config and reset to factory defaultsJuniper Junos · Operational mode (>)
    request system zeroize

    Warning: Erases the config and data, with no undo. You'll need console access afterwards.

Virtual Chassis (EX) #

  • Show the members, their roles and serial numbersJuniper Junos · Operational mode (>)
    show virtual-chassis
  • Show the ports linking the membersJuniper Junos · Operational mode (>)
    show virtual-chassis vc-port
  • Open a session on another memberJuniper Junos · Operational mode (>)
    request session member 1