Configure the Software Initially
You can configure the router from a system console connected to the router's console port or by using telnet to access the router remotely.
Before you configure the software for the first time, you need the following information:
- Name of the machine
- Machine's domain name
- IP address and prefix length information for router's management Ethernet interface
- IP address of a default router
- IP address of a Domain Name System (DNS) server
- Password for the user "root"
To configure the software for the first time, follow these steps:
- Power on the router. The JUNOS software boots automatically.
- Log in as the user
root. There is no password.- Start the command-line interface (CLI):
root#cliroot@>- 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-namedomain-name- Configure the IP address and prefix length for the router's management Ethernet interface:
[edit]root@#set interfaces fxp0 unit 0 family inet addressaddress/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-routeraddress- Configure the IP address of a DNS server:
[edit]root@#set system name-serveraddress- Set the root password, entering either a clear-text password that the system will encrypt, a password that is already encrypted, or an ssh public key string.
To enter a clear-text password, use the following command to set the root password:
[edit]root@#set system root-authentication plain-text-passwordNew password:type passwordRetype new password:retype passwordTo enter a password that is already encrypted, use the following command to set the root password:
[edit]root@#set system root-authentication encrypted-passwordencrypted-passwordTo enter an ssh public string, use the following command to set the root password:
[edit]root@#set system root-authentication ssh-rsakey
- Optionally, display the configuration statements:
[edit]root@showsystem {host-namehost-name;domain-namedomain.name;backup-routeraddress;root-authentication {(encrypted-password "password" | public-key);ssh-rsa "public-key";ssh-dsa "public-key";}name-server {address;}interfaces {fxp0 {unit 0 {family inet {addressaddress;}}}}- Commit the configuration, which activates the configuration on the router:
[edit]root@#commit- If you want to configure additional properties at this time, remain in configuration mode and add the necessary configuration statements. Then commit the changes to activate them on the router:
[edit]root@host-name#commit- When you have completed configuring the router, exit from configuration mode:
[edit]root@host-name#exitroot@host-name>- After you have installed the software on the router, committed the configuration, and are satisfied that the new configuration is successfully running, you should issue the
request system snapshotcommand to back up the new software to the/altconfigfile system. If you do not issue therequest system snapshotcommand, the configuration on the alternate boot drive will be out of sync with the configuration on the primary boot drive.The
request system snapshotcommand causes the root file system to be backed up to/altroot, and/configto be backed up to/altconfig. The root and/configfile systems are on the router's flash drive, and the/altrootand/altconfigfile systems are on the router's hard disk.
NOTE: After you issue this command, you cannot return to the previous version of the software, because the running and backup copies of the software are identical.