Juniper basics
Written by Arnaud no commentsFirst step is to read these "day one" free books : http://www.juniper.net/us/en/community/junos/training-certification/day-...
I choosed Configuring Junos Basics, and Junos for IOS Engineers.
I've also followed http://www.x83.net/first-steps-configuring-juniper-routers/ and
Now, let's get a Switch! for my first try I had 2 QFX5100 : https://twitter.com/afenioux/status/496269731171946497
The default login is "root" and there is no password, once logged in, type "cli" to enter into the Juniper CLI.
Show status and desc of the interfaces :
show interfaces descriptions
show interfaces descriptions
Enter "config mode" :
edit
Show binding with agregated ethernet interface (PortChannel), we use "run" in edit mode (like a cisco "do"):
run show interfaces terse
Show config in indented mode
show configuration
Show config as you would type it:
show configuration | display set
You can double pipe and use match (cisco "include"):
show configuration | display set | match interface
Set a description to an interface, and show its config:
edit interface xe-0/3/6
set description "my INT description"
show
Shutdown an interface (you are not obliged to edit into the interface mode):
set interfaces xe-0/3/2 disable
See you modifications before commiting:
show | compare
Apply your configuration changes
commit
Apply you configuration, and schedule a rollback (by default) in 10 min :
commit confirmed
commit confirmed
Check your config before commit (or confirm commit after a "commit confirmed"):
commit check
commit check
See the configuration history:
show system commit
"deactivate" comment the config, good for tests, delete is delete :
deactivate system syslog
delete system syslog
Activate SSH to login, and set an IP on the managment interface (with a default route) :
set system services ssh
set interfaces vme unit 0 family inet address 192.168.1.100/24
set routing-options static route 0.0.0.0/0 next-hop 192.168.1.1
Show random (but usefull) tips:
help tip cli
List the Serial numbers and the type of all components (SFP / FPC (LineCard) / PFE (Switch Fabric)/ PS...):
show chassis hardware
show chassis hardware
Show optical level and power information of an optic:
show interfaces diagnostics optics xe-0/2/3
show interfaces diagnostics optics xe-0/2/3
Start a shell (with your id or as root)
start shell
start shell user root
start shell
start shell user root
Show all log (but only last lines) :
show log messages | last
show log messages | last
enable/disable debuging (caution!) in is example we "tail" the messages logs :
monitor start messages
monitor stop messages
monitor start messages
monitor stop messages
Watch interface statistics in live :
monitor interface xe-0/3/6
monitor interface xe-0/3/6