[Contents] [Prev] [Next] [Index] [Report an Error]

Peforming a Recovery Installation

To perform a recovery installation, perform the following tasks:

Preparing to Reinstall the JUNOS Software

Depending on the situation, you should try to perform the following steps before you perform the recovery installation:

  1. Ensure you have an emergency recovery disk to use during the installation. When the router is first shipped, an emergency recovery disk is provided with it. For instructions on creating an emergency boot disk, see Creating an Emergency Boot Disk
  2. Copy the existing configuration in the file /config/juniper.conf.gz from the router to a remote system. For extra safety, you can also copy the backup configurations (the files named /config/juniper.conf.n, where n is a number from 0 through 9).

    Warning: The recovery installation process completely overwrites the entire contents of the fixed storage media.

  3. Copy any other stored files to a remote system as desired.

Reinstalling the JUNOS Software

To reinstall the JUNOS software:

  1. Insert the removable media into the router.

    Note: You can store a configuration on installation media such as a PC Card.

  2. Reboot the router. Do not power off the router if it is already on. Issue the CLI request system reboot command.
  3. When the software prompts you with the following question, type y:
    WARNING: The installation will erase the contents of your disk. Do you wish to continue (y/n)? y
    
  4. The router copies the software from the removable media onto your system, occasionally displaying status messages. Copying the software can take up to 10 minutes.
  5. Remove the removable media when prompted. The router then reboots from the boot device on which the software was just installed. When the reboot is complete, the router displays the login prompt.

Restoring the Router’s Configuration

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:

Creating a New Configuration on a Single Routing Engine

To create a new base configuration on a single routing engine:

Log In to the Router Console

To log in to the router’s console interface and open the CLI in configuration mode:

  1. Verify the router is powered on.
  2. Log in through the console port as root.
    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.

  3. Start the CLI, which initially opens in operational mode. Note the command prompt ends with > in the CLI operational mode.
    root@% cli
    
    root>
  4. Enter the CLI configuration mode. Note the command prompt ends with # in the CLI configuration mode.
    root> configure
    
    [edit]
    root#

Configure Administration User Accounts

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:

  1. Add a password to the root (superuser) administration user account.
    [edit]
    root# set system root-authentication plain-text-password
    New password: password
    Retype new password: password
  2. Create a management console user account.
    [edit]
    root# set system login user user-name authentication plain-text-password
    New Password: password
    Retype new password: password
  3. Set the user account class to super-user.
    [edit]
    root# set system login user user-name class super-user

Add the Management Console to the Network

To add the management console to the network:

  1. Specify the router host name.

    Note: This host name specified in the router configuration is not used by the DNS server to resolve to the correct IP address. This host name is used to display the name of the routing engine in the CLI. For example, this host name shows on the command line prompt when the user is logged on to the CLI:

    user-name@host-name>

    [edit]
    root# set system host-name host-name
  2. Configure the IP address of the DNS server.
    [edit]
    root# set system name-server address
  3. Configure the router domain name.
    [edit]
    root# set system domain-name domain-name
  4. Configure the IP address and prefix length for the router Ethernet interface.
    [edit]
    root# set interfaces fxp0 unit 0 family inet address address/prefix-length
  5. Configure the IP address of a backup router. The backup router is used while the local router is booting and if the routing process fails to start. Once the routing process starts, the backup router address is removed from the local routing and forwarding tables. For more information on the backup router, see the JUNOS System Basics Configuration Guide.
    [edit]
    root# set system backup-router address
  6. (Optional) Configure the static routes to remote subnets with access to the management port. Access to the management port is limited to the local subnet. To access the management port from a remote subnet, you need to add a static route to that subnet within the routing table. For more information on static routes, see the JUNOS System Basics Configuration Guide.
    [edit]
    root# set routing-options static route remote-subnet next-hop destination-IP retain no-readvertise
    
  7. Configure the telnet service at the [edit system services] hierarchy level.
    [edit]
    root# set system services telnet

Commit Changes

Now that you have completed your changes to the configuration file, commit the configuration changes.

  1. Before committing the configuration, you can review your changes to the configuration with the show command.
    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; } } }
  2. Commit the configuration.
    [edit]
    root# commit
    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

  3. Exit configuration mode.
    [edit]
    root# exit
    Exiting configuration mode

    root>

Creating a New Configuration with Redundant Routing Engines

To create a new base configuration on a router with redundant Routing Engines:

Configure Administration User Accounts

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:

  1. Add a password to the root (superuser) administration user account.
    [edit]
    root# set system root-authentication plain-text-password
    New password: password
    Retype new password: password
  2. Create a management console user account.
    [edit]
    root# set system login user user-name authentication plain-text-password
    New Password: password
    Retype new password: password
  3. Set the user account class to super-user.
    [edit]
    root# set system login user user-name class super-user

Set Up Routing Engine Configuration Groups

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.

  1. 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
  2. Navigate to the groups re0 level of the configuration hierarchy.

    [edit]
    root# edit groups re0
  3. Specify the router host name.
    [edit groups re0]
    root# set system host-name host-name

    This host name specified in the router configuration is not used by the DNS server to resolve to the correct IP address. This host name is used to display the name of the Routing Engine in the CLI. For example, this host name appears at the command-line prompt when the user is logged on to the CLI:

    user-name@host-name>

  4. Configure the IP address and prefix length for the router Ethernet interface.
    [edit groups re0]
    root# set interfaces fxp0 unit 0 family inet address address/prefix-length
  5. Return to the top level of the hierarchy.

    [edit groups re0]
    root# top
  6. Create the configuration group re1.

    [edit]
    root# set groups re1
  7. Navigate to the groups re1 level of the configuration hierarchy.

    [edit]
    root# edit groups re1
  8. Specify the router host name.
    [edit groups re1]
    root# set system host-name host-name
  9. Configure the IP address and prefix length for the router Ethernet interface.
    [edit groups re1]
    root# set interfaces fxp0 unit 0 family inet address address/prefix-length
  10. Return to the top level of the hierarchy.

    [edit groups re0]
    root# top
  11. Specify the group application order.

    [edit]root# set apply-groups [ re0 re1 ]
    

Complete the Management Console Configuration

To configure the global management console parameters.

  1. Configure the IP address of the DNS server.
    [edit]
    root# set system name-server address
  2. Configure the router domain name.
    [edit]
    root# set system domain-name domain-name
  3. Configure the IP address of a backup router. The backup router is used while the local router is booting and if the routing process fails to start. Once the routing process starts, the backup router address is removed from the local routing and forwarding tables. For more information on the backup router, see the JUNOS System Basics Configuration Guide.
    [edit]
    root# set system backup-router address
  4. (Optional) Configure the static routes to remote subnets with access to the management port. Access the management port is limited to the local subnet. To access the management port from a remote subnet, you need to add a static route to that subnet within the routing table. For more information on static routes, see the JUNOS System Basics Configuration Guide.
    [edit]
    root# set routing-options static route remote-subnet next-hop destination-IP retain no-readvertise
    
  5. Configure the telnet service at the [edit system services] hierarchy level.
    [edit]
    root# set system services telnet

Commit and Synchronize Changes

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.

  1. Before committing the configuration, you can review the configuration entries using the show command.
    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; } } }
  2. Commit and synchronize the configuration. The commit synchronizecommand will commit this new configuration on both Routing Engines simultaneously.
    [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
  3. Exit configuration mode.
    [edit]
    root# exit
    Exiting configuration mode

    root>

Restoring a Saved Configuration

To restore a saved configuration, perform the following tasks:

  1. Copy Saved Files to the Router
  2. Load and Commit the Configuration File

Copy Saved Files to the Router

To copy the saved configuration to the router:

  1. Log in to the console as root. There is no password.
    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.

  2. Start the CLI:
    # cli
    
  3. Copy the remote configuration file to the router’s /var/tmp directory:
    root@host> ftp remote-server
    
    user: username
    password: password
    ftp> bin
    Type set to I.
    ftp> get /path/file
    ftp> bye
    Goodbye.

Load and Commit the Configuration File

Once the saved configuration file is copied to the router, you load and commit the file:

  1. Start the CLI configuration mode.
    user@routername> configure
    
    Entering configuration mode

    [edit]
    user@host#
  2. Load the file into the current configuration. You should override the existing file.
    user@host# 
    load override /var/tmp/filename
    load complete
  3. Commit the file.
    user@host# commit
    
    commit complete
  4. Exit the CLI configuration mode.
    user@host# exit
    
    user@host>
  5. Back up the JUNOS software.

    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.

     


[Contents] [Prev] [Next] [Index] [Report an Error]