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 configure
the machine name, domain name, and various addresses, follow these
steps:
Log in as root. There is no password.
Start the CLI:
root# cli
root@>
Enter configuration mode:
cli>
configure
[edit]
root@#
Configure
the name of the machine. If the name includes spaces, enclose the
entire name in quotation marks (" "):
[edit]
root@# set system host-namehost-name
Configure the machine’s domain name:
[edit]
root@# set system domain-name domain-name
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
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
Configure the IP address
of a Domain Name Server (DNS) server:
[edit]
root@# set system name-serveraddress
Set the Root Password
Action
To set the root password, follow these steps:
To set the root password, enter a clear-text password
that the system will encrypt, a password that is already encrypted,
or a secure shell (ssh) public key string.
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
New Password: password
Retype new password: password
To enter a password that is already encrypted, use the
following command to set the root password:
[edit]
root@# set system root-authentication encrypted-passwordpassword
To enter
an ssh public string, use the following command to set the root password:
[edit]
root@# set
system root-authentication ssh-rsa key
Commit the changes:
[edit]
root@# commit
Exit from configuration mode:
[edit]
root@# exit
root@>
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:
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
Load and activate the desired configuration:
root@> configure
[edit]
root@# load merge/config/filename or
load replace/config/filename