Junos Troubleshooting Commands Reference: Route to Flows - 夜莺博客

Junos Troubleshooting Commands Reference: Route to Flows

Having a reliable list of Junos operational commands at hand turns chaotic troubleshooting sessions into structured investigations. This reference, compiled by a network engineer working daily with Junos, groups the most useful commands by functional area — generic diagnostics, BGP, OSPF, forwarding table, security flows and IPsec — so you can jump straight to the right show command for the problem you are facing. It also explains how to enable traceoptions when standard outputs are not enough.

Enabling traceoptions for Protocol Debugging

set <protocol> traceoptions flag all
set <protocol> traceoptions file <name> size 100m

Traceoptions can be enabled in the hierarchy of the specific protocol (bgp, ospf, isis, rsvp, and so on) and help with immediate identification of the issue type; press ? after flag to list available options.

Generic Junos Troubleshooting Commands

show route
show route table <table-name>
show route protocol <protocol> table <table-name>
show route hidden table inet.0
show route summary
ping source <address> rapid count <n>
traceroute routing-instance <name>
show interfaces detail
show interfaces extensive
monitor interface
show log messages
show chassis alarms
show chassis hardware detail
show chassis fpc

BGP and OSPF Diagnostics

show bgp summary
show bgp neighbor
show route receive protocol bgp extensive
show route advertising protocol bgp hidden
show ospf route
show ospf database detail
show ospf neighbor extensive
show ospf interface detail
show ospf statistics

For forwarding plane verification use show route forwarding-table destination <prefix> to see the actual next hop programmed in the PFE.

Security Flows and IPsec on SRX

show security flow session
show security flow status
show security flow statistics
show security policy
show security ike security-association
show security ike security-association index <#> detail
show security ipsec security-association
show security ipsec statistics
show security ipsec next-hop-tunnels
monitor interface st0.x
show interfaces extensive st0.x
show security pki local-cert detail

For route-based VPNs, combine show security flow session tunnel with monitor interface st0.x to confirm encrypted traffic is flowing over the tunnel interface.

See also inter-VLAN troubleshooting on EX switches and SRX device upgrade steps.

原文链接:https://ard92.github.io/2022/04/25/junos-troubleshooting.html