title: Juniper Junos General breadcrumbs:
TODO Clean up, reorganize and add remaining stuff.
{:.no_toc}
?
: Prints the allowed keywords.|
: Can be used to filter the output.cli
start shell user root
request session member <vc-member-id>
configure
exit
show configuration [statement]
show [statement]
show | compare
show configuration | display set
run <command>
edit <path>
up
or top
show
commit [comment <comment>] [confirmed] [and-quit]
confirmed
automatically rolls back the commit if it is not confirmed within a time limit.and-quit
will quit configuration mode after a successful commit.load override terminal
, then Ctrl+D.The devices have two partitions; the primary and the backup. One of them will be designated as active and that choice will be remembered across reboots. When the active partition is damaged, the device will boot into the other partition. When the backup partition is the active partition, an alarm will be set and a banner shown.
Change active partition and reboot: request system reboot slice alternate media internal
The devices should be shut down gracefully instead of just pulling the power. This will prevent corrupting the file system.
shutdown -h now
or halt
request system <halt|power-off> [local|all-members|member <member-id>]
Wait for the "The operating system has halted." text before pulling the power, so that system processess are stopped and disks are synchronized. The system LED turning off and the LCD saying "HALTING..." does not mean that the halting process is finished yet.
request system <halt|reboot> [local|all-members]
halt
, it will print "please press any key to reboot" when halted.request system zeroize
show chassis alarms
show chassis environment
show chassis routing-engine
show <configuration> | display inheritance
scp <config> <device>:/config/juniper.conf.new
load override /config/juniper.conf.new
file delete /config/juniper.conf.new
show interfaces terse
show interfaces routing
show interfaces brief
show interfaces statistics
show interfaces detail
show interfaces media
show lldp neighbors
help syslog SNMP_TRAP_LINK_DOWN
(op mode) (example)run show log escript.log | last
loader>
prompt.boot -s
to boot into single-user mode.recovery
.request system zeroize
(this will delete all configuration).Note: USB3 drives may not work properly. Use USB2 drives.
ls -l /dev/da*
mkdir /var/tmp/usb0 && mount_msdosfs <device> /var/tmp/usb0
(arbitrary path)ls -l /var/tmp/usb0
umount /var/tmp/usb0 && rmdir /var/tmp/usb0
mkdir /var/tmp/usb0 && mount_msdosfs <device> /var/tmp/usb0
ls -l /var/tmp/usb0
cp /var/tmp/usb0/jinstall* /var/tmp/
umount /var/tmp/usb0 && rmdir /var/tmp/usb0
cli
request system software add <file> no-copy reboot
no-validate
.show system storage partitions
show system snapshot media internal
request system snapshot slice alternate
show system snapshot media internal
If the method above did not work, try this instead to completely format and flash the device.
install --format file:///jinstall-whatever.tgz
This procedure clones the active partition to the alternate partition.
This is also how you would clone to and boot from a USB device, but with media external
instead of both media internal
and slice alternate
.
request system snapshot slice alternate
show system storage partitions
show system snapshot media internal
To boot to the alternate partition, use request system reboot slice alternate media internal
.
If one of the root partitions get corrupted (e.g. due to sudden power loss), the device will boot to the alternate root partition. This can be fixed by cloning the new active partition to the alternate, corrupt partition.
See Copy the Active Root Partition or [EX] Switch boots from backup root partition after file system corruption occurred on the primary root partition (Juniper).
lo
: Loopback.ge
: Gigabit Ethernet.xe
: 10G Ethernet.et
: 40G Ethernet.em
and fxp
: Management, possibly OOB.TODO
{% include footer.md %}