Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Reconfigure the Junos OS

Purpose

After you have reinstalled the software, you must copy the router’s configuration files back to the router. (You also can configure the router from scratch, as described in Junos System Basics Configuration Guide) However, before you can copy the configuration files, you must establish network connectivity.

To reconfigure the software, follow these steps:

  1. Configure Names and Addresses
  2. Example: Configuring the Root Password
  3. Check Network Connectivity
  4. Copy Backup Configurations to the Router

Configure Names and Addresses

Action

To configure the machine name, domain name, and various addresses, follow these steps:

  1. Log in as root. There is no password.
  2. Start the CLI:
    root# cli root@>
  3. Enter configuration mode:
    cli> configure [edit]root@#
  4. Configure the name of the machine. If the name includes spaces, enclose the entire name in quotation marks (" "):
    [edit]root@# set system host-name host-name
  5. Configure the machine’s domain name:
    [edit]root@# set system domain-name domain-name
  6. Configure the IP address and prefix length for the router’s management Ethernet interface:
    [edit]root@# set interfaces fxp0 unit 0 family inet address address / prefix-length
  7. Configure the IP address of a default router. This system is called the backup router because it is used only while the routing protocol process is not running.
    [edit]root@# set system backup-router address
  8. Configure the IP address of a Domain Name Server (DNS) server:
    [edit]root@# set system name-server address

Example: Configuring the Root Password

Junos OS is preinstalled on the router. When the router is powered on, it is ready to be configured. Initially, you log in as the user “root” with no password. To set the root password, you have several options: enter a clear-text password that the system will encrypt, enter a password that is already encrypted, or enter a secure shell (ssh) public key string.

To set the root password, follow these steps:

  1. To enter a clear-text password that the system will encrypt, use the following command to set the root password:
    [edit]root@# set root-authentication plain-text-password New Password: type password hereRetype new password: retype password here
  2. To enter a password that is already encrypted, use the following command to set the root password:
    [edit]root@# set system root-authentication encrypted-password password
  3. To enter an ssh public string, use the following command to set the root password:
    [edit]root@# set system root-authentication ssh-rsa key
  4. Commit the changes:
    [edit]root@# commit
  5. Exit from configuration mode:
    [edit]root@# exitroot@>

Check Network Connectivity

Purpose

Establish that the router has network connectivity.

Action

To check that the router has network connectivity, issue a ping command to a system on the network:

root@> ping address

If there is no response, verify that there is a route to the address using the show route command. If the address is outside your fxp0 subnet, add a static route. Once the backup configuration is loaded and committed, the static route is no longer needed and should be deleted.


Copy Backup Configurations to the Router

Action

To copy backup configurations to the router, follow these steps:

  1. To copy the existing configuration and any backup configurations back onto the router, use the file copy command. Place the files in the /var/tmp directory.
    user@host> file copy var/tmp/filename
  2. Load and activate the desired configuration:
    root@> configure [edit]root@# load merge/config/filename or load replace/config/filename [edit]root@# commit

Published: 2013-02-25

Published: 2013-02-25