JunOS (MX) Cheat Sheet

BGP Commands

BGP Summary (IPv4 and IPv6):

show bgp summary

BGP Received routes (shows routes BEFORE filtering? Always check local routing table):

show route receive-protocol bgp <neighbor>

BGP Sent routes:

show route advertising-protocol bgp <neighbor>

Shut/unshut a BGP peer

<set|delete> protocols bgp <group> neighbor <neighbor> shutdown

Reload inbound routes

clear bgp neighbor soft-inbound <neighbor|all>

Reload outbound routes

clear bgp neighbor soft <neighbor|all>

Troubleshooting

Test a policy against the current routing table

test policy <policy> 0.0.0.0/0

Show firewall log

show log firewall [detail]

Show CPU and memory utilization

show system processes extensive
show chassis routing-engine

MX equivilant for IOS “show ip arp <ip|mac>”

show arp no-resolve | match <ip|mac>

Show interfaces “brief”

show interfaces terse

Check interface packet rates

show interfaces <interface> | match rate

Traffic flow overview

monitor interface traffic

Configuration Tips

Automatic rollback in case you blow everything up.  10 minute default.  Issue another commit or rollback to stop the timer.

commit confirmed [minutes]

Quickly find those commands you ran before

show cli history | grep <pattern>

Move policy statement term (in edit mode just before term)

insert term <TermX> before term <TermY>

Check candidate config

commit check

Get rid of uncommitted changes

rollback

Commit [and exit config mode]

commit [and-quit]

Clear current command line

Ctrl-x or Ctrl-u

Detailed command reference

help <reference|apropos> [<command>]

Display config in set format

show configuration [section] | display set

Grep configuration

show configuration | <grep|match|find> "<regex>"

Load entire section of config

load merge terminal

Move around configuration levels

<up|top>

Compare candidate config to running config

show | compare

Run non-configuration command in config mode

run <command>

Comments are closed.