Tuesday, 21 March 2017

Juniper Troubleshooting Commands

TROUBLESHOOTING

set cli timestamp (logs timestamp on cli for all commands you run. Very useful)
show system uptime
show chassis hardware
show chassis fpc detail
show chassis environment
show chassis alarms
show configuration | display detail
show configuration | display inheritance (displays inherited config from a group)
show system statistics (displays tcp, udp, icmp, arp, ...packet statistics)
show system commit (displays last 50 commits)
show system rollback compare <commit #> <commit #> (displays the differences between two commits)

USER MANAGEMENT

show system users (displays logged in users)
request system logout user (terminates a user's session)
request message all message "<message>" (send message to all logged in users)

FIREWALL

show security flow session (displays active sessions for given source, destination parameters)
show security match-policies (displays which policy would match for given source, destination parameters)
show configuration groups junos-defaults (displays pre-defined Junos Applications)

NAT

show security nat source [summary|rule|pool] (displays source nat rules and details)
show security nat static rule (displays static nat rules and details)
show security nat destination [summary|rule|pool] (displays destination nat rules and details)

FIBRE OPTICS

show interfaces diagnostics optics <interface name> (displays sfp module rx/tx power values)

SWITCHING AND ARP

show ethernet-switching table (displays mac address table)
clear ethernet-switching table <mac-address>
show arp [no-resolve] (displays ip to mac table)
clear arp [interface|hostname]

ROUTING

show route table <routing-table-name>
show route terse
show route forwarding-table

OSPF

show ospf neighbor [extensive]
show ospf overview
show ospf interface
show ospf database detail
show ospf route [abr|asbr|extern]
clear ospf neighbor <neighbor ip>

BGP

show bgp summary
show bgp neighbor <neighbor ip>
show route advertising protocol bgp (displays the advertised routes via bgp)
show route receiving protocol bgp (displays the received routes via bgp)
clear bgp neighbor <neighbor ip> [soft|soft-inbound]

DHCP RELAY

show dhcp relay statistics
show dhcp relay binding
clear dhcp relay binding

IPv6

show ipv6 router-advertisement (displays the ipv6 enabled interfaces with ra statistics)
show ipv6 neighbors (displays ipv6 address to mac address table)

CPU & MEMORY

show chassis routing-engine
request chassis routing-engine master switch (to switchover routing engine mastership)
show system processes extensive (displays cpu and memory usage of software processes)
restart <process-name> (restarts a specific software process)
show route summary (displays max limits and the numbers of active routes per routing table)
show system virtual-memory (displays detailed memory usage)
show task memory detail (displays detailed memory usage)

VIRTUAL CHASSIS

show virtual-chassis status (displays virtual chassis members status)
show virtual-chassis vc-port (displays virtual chassis ports details)
request virtual-chassis vc-port [set|delete] (to set or delete virtual chassis ports)

TRACEOPTIONS CONFIG (creates process specific debug output)

traceoptions file <filename>
traceoptions file size <file size>
traceoptions file files <# of files>
traceoptions flag <events to be monitored>

TECHNICAL SUPPORT REQUIRED DATA

request support information | save /var/tmp/<filename>.txt
file archive compress source /var/tmp/<filename>.txt destination /var/tmp/<filename>.txt.tgz
show system core-dumps

Juniper Troubleshooting Commands

TROUBLESHOOTING set cli timestamp (logs timestamp on cli for all commands you run. Very useful) show system uptime show chass...