For the last chapter of Juniper’s first PDF, we are going to have a closer look how to get more information about JunOS and also practice the password recovery procedure that will sooner and later be useful for you.
Table of Contents
Exercise 1 – boot messages
Do you remember the booting process in chapter 1? Well you have a command to see the messages again (hint: use the show system command).
root@JUNOS1# run show system boot-messages Copyright (c) 1996-2010, Juniper Networks, Inc. ... ad1: 1024MB <QEMU HARDDISK 0.11.0> at ata0-slave WDMA2 Trying to mount root from ufs:/dev/ad0s1a vn_read_compressed_block: invalid block index 550
Exercise 2 – JunOS packages
Still about the booting process, we have seen that JunOS packages are loaded on virtual memory disks (you can still see that using the show system storage command). Find the command which list all these packages including their versions.
root@JUNOS1> show version Hostname: JUNOS1 Model: olive JUNOS Base OS boot [10.1R1.8] JUNOS Base OS Software Suite [10.1R1.8] JUNOS AppId Services [10.1R1.8] JUNOS IDP Services [10.1R1.8] JUNOS Routing Software Suite [10.1R1.8]
Exercise 3 – network interfaces
Now show all interfaces configured on JUNOS1 (equivalent to show ip interface brief on Cisco IOS) and then use a command to show a maximum of details for interface em0.
root@JUNOS1> show interfaces terse Interface Admin Link Proto Local Remote em0 up up em0.0 up up inet 192.168.1.1/24 192.168.1.3/24 ... root@JUNOS1> show interfaces em0 extensive Physical interface: em0, Enabled, Physical link is Up Interface index: 8, SNMP ifIndex: 17, Generation: 134 Type: Ethernet, Link-level type: Ethernet, MTU: 1514, Clocking: ...
Exercise 4 – monitor
Let’s play a bit more with the monitor command. On JUNOS2, monitor all interface traffic (statistics) in real time. From JUNOS1 ping JUNOS2 (192.168.1.2) and check the counters incrementing.
root@JUNOS2> monitor interface traffic Interface Link Input packets (pps) Output packets (pps) ... em0 Up 1476 1302 ...
Exercise 5 – password recovery
Now assume you have forgotten the root password for JUNOS2 or maybe you really have, don’t panic, you are going to do a password recovery. First reboot you system and be ready to hit space to get to the kernel command prompt. Then follow the procedure as explained in the documentation.
root@JUNOS2> request system reboot Reboot the system ? [yes,no] (no) yes ...
Hit [Enter] to boot immediately, or space bar for command prompt. <space> Type '?' for a list of commands, 'help' for more detailed help. OK boot –s ... Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery ... NOTE: Once in the CLI, you will need to enter configuration mode using NOTE: the 'configure' command to make any required changes. For example, NOTE: to reset the root password, type: NOTE: configure NOTE: set system root-authentication plain-text-password NOTE: (enter the new password when asked) NOTE: commit NOTE: exit NOTE: exit NOTE: When you exit the CLI, you will be asked if you want to reboot NOTE: the system Starting CLI ... root> configure Entering configuration mode  root# set system root-authentication plain-text-password New password: Retype new password:  root# commit error: could not open database: /var/run/db/juniper.data: No such file or directory error: Database open failed for file '/var/run/db/juniper.data': No such file or directory commit complete  root@JUNOS2# exit Exiting configuration mode root@JUNOS2> exit Reboot the system? [y/n] y
Well done, you completed all exercises for Juniper’s first PDF, now it is time to go into more serious stuff with the second PDF and Routing Fundamentals