To perform a recovery installation, perform the following tasks:
Depending on the situation, you should try to perform the following steps before you perform the recovery installation:
![]() |
Warning: The recovery installation process completely overwrites the entire contents of the fixed storage media. |
To reinstall the JUNOS software:
![]() |
Note: You can store a configuration on installation media such as a PC Card. |
WARNING: The installation will erase the contents of your disk. Do you wish to continue (y/n)? y
Once you have restored the JUNOS software, you will need to restore the router’s configuration. You can either create a new configuration as you did when the router was shipped from the factory, or if you saved the router's previous configuration, you can simply restore that file to the system:
To create a new base configuration on a single routing engine:
To log in to the router’s console interface and open the CLI in configuration mode:
Amnesiac <ttyd0>
login: root
![]() |
Note: From the factory, the root administration user account is not associated with a password. However, you must add a password to the root administration account before you can successfully commit a configuration. |
root@% cli
root>
root> configure
[edit]
root#
Set the root administration user account password. You also need to set up one or more administration user accounts. These administration user accounts are used to log in to the router through the management console. To configure administration user accounts:
[edit]
root# set system root-authentication plain-text-password
New password: password
Retype new password: password
[edit]
root# set system login user user-name authentication plain-text-password
New Password: password
Retype new password: password
[edit]
root# set system login user user-name class super-user
To add the management console to the network:
[edit]
root# set system host-name host-name
[edit]
root# set system name-server address
[edit]
root# set system domain-name domain-name
[edit]
root# set interfaces fxp0 unit 0 family inet address address/prefix-length
[edit]
root# set system backup-router address
[edit]
root# set routing-options static route remote-subnet next-hop destination-IP retain no-readvertise
[edit]
root# set system services telnet
Now that you have completed your changes to the configuration file, commit the configuration changes.
root# show
## Last changed: 2008-08-27 22:30:42 UTC
version 9.3B1.5;
system {
host-name tp8;
domain-name subnet.juniper.net;
backup-router 192.168.71.254;
root-authentication {
encrypted-password "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx."; ## SECRET-DATA
}
name-server {
192.168.5.68;
172.17.28.101;
}
login {
user regress {
class super-user;
authentication {
encrypted-password "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; ## SECRET-DATA
}
}
}
services {
telnet;
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 192.128.69.205/21;
}
}
}
}
routing-options {
static {
route 172.16.0.0/12 {
next-hop 192.168.71.254;
retain;
no-readvertise;
}
route 192.168.0.0/16 {
next-hop 192.168.71.254;
retain;
no-readvertise;
}
}
}
[edit]
root# commit
commit complete
[edit]
root# exit
Exiting configuration mode
root>
To create a new base configuration on a router with redundant Routing Engines:
Set the root administration user account password. You also need to set up one or more administration user accounts. These administration user accounts are used to log in to the router through the management console. To configure administration user accounts:
[edit]
root# set system root-authentication plain-text-password
New password: password
Retype new password: password
[edit]
root# set system login user user-name authentication plain-text-password
New Password: password
Retype new password: password
[edit]
root# set system login user user-name class super-user
In a router with two Routing Engines, one
configuration should be shared between both Routing Engines. This
ensures that both Routing Engine configurations are identical. Within
this configuration, create two Routing Engine groups, one for each
Routing Engine. Within these groups, you specify the Routing Engine
specific parameters. For more information on creating configuration
groups, see:
http://www.juniper.net/techpubs/software/junos/junos92/swconfig-cli/creating-a-configuration-group.html#id-11110765. For more information on the initial configuration for redundant
Routing Engine systems, see
http://www.juniper.net/techpubs/software/junos/junos92/swconfig-high-availability/initial-routing-engine-configuration.html.
Create the configuration group re0. The re0 group is a special group designator that is only used by RE0 in a redundant routing platform. For more information on the re0 group, see: http://www.juniper.net/techpubs/software/junos/junos92/swconfig-high-availability/initial-routing-engine-configuration.html.
[edit]
root# set groups re0
Navigate to the groups re0 level of the configuration hierarchy.
[edit]
root# edit groups re0
[edit groups re0]
root# set system host-name host-name
[edit groups re0]
root# set interfaces fxp0 unit 0 family inet address address/prefix-length
Return to the top level of the hierarchy.
[edit groups re0]
root# top
Create the configuration group re1.
[edit]
root# set groups re1
Navigate to the groups re1 level of the configuration hierarchy.
[edit]
root# edit groups re1
[edit groups re1]
root# set system host-name host-name
[edit groups re1]
root# set interfaces fxp0 unit 0 family inet address address/prefix-length
Return to the top level of the hierarchy.
[edit groups re0]
root# top
Specify the group application order.
[edit]root# set apply-groups [ re0 re1 ]
To configure the global management console parameters.
[edit]
root# set system name-server address
[edit]
root# set system domain-name domain-name
[edit]
root# set system backup-router address
[edit]
root# set routing-options static route remote-subnet next-hop destination-IP retain no-readvertise
[edit]
root# set system services telnet
Commit the configuration changes. When you issue the synchronize command, the configuration is shared between both Routing Engines and committed on both Routing Engines simultaneously.
root# show
## Last changed: 2008-10-17 18:32:25 UTC
version 9.1R1.8;
groups {
re0 {
system {
host-name spice-re0;
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 192.168.69.155/21;
}
}
}
}
}
re1 {
system {
host-name spice-re1;
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 192.168.70.72/21;
}
}
}
}
}
global;
}
apply-groups [ re0 re1 ];
system {
domain-name englab.juniper.net;
backup-router 192.168.71.254;
root-authentication {
encrypted-password "xxxxxxxxxxx"; ## SECRET-DATA
}
name-server {
192.168.1.1;
}
login {
user regress {
uid 2001;
class super-user;
authentication {
encrypted-password "xxxxxxxxxxx"; ## SECRET-DATA
}
}
}
services {
telnet;
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
routing-options {
static {
/* corporate office */
route 172.16.0.0/12 {
next-hop 192.168.71.254;
retain;
no-readvertise;
}
}
}
[edit]
root# commit synchronize
re0:
configuration check succeeds
re1:
commit complete
re0:
commit complete
If you receive an error message after you issue the commit statement, you can review the configuration using the show command to find the errors in your configuration. You can delete incorrect entries using the delete command. For example, to delete a host name from the configuration, issue the following statement:
[edit]
root# delete system host-name host-name
[edit]
root# exit
Exiting configuration mode
root>
To restore a saved configuration, perform the following tasks:
To copy the saved configuration to the router:
Escape character is '^]'.
[Enter]
router (ttyd0)
login: root
Password: [Enter]
Initially, access to the router is limited to the console port after a recovery installation. Access through the management ports and interfaces is set in the configuration. For information about accessing the router through the console port, see the administration guide for your particular router.
# cli
root@host> ftp remote-server
user: username
password: password
ftp> bin
Type set to I.
ftp> get /path/file
ftp> bye
Goodbye.
Once the saved configuration file is copied to the router, you load and commit the file:
user@routername> configure
Entering configuration mode
[edit]
user@host#
user@host#
load override /var/tmp/filename
load complete
user@host# commit
commit complete
user@host# exit
user@host>
After you have installed the software on the router, committed the configuration, and are satisfied that the new configuration is successfully running, issue the request system snapshot command to back up the new software to the /altconfig file system. If you do not issue the request system snapshot command, the configuration on the alternate boot drive will be out of sync with the configuration on the primary boot drive.
The request system snapshot command causes the root file system to be backed up to /altroot, and /config to be backed up to /altconfig. The root and /config file systems are on the router’s CompactFlash card, and the /altroot and /altconfig file systems are on the router’s hard disk.