Device Login and Initial Configuration
This section describes how to perform initial configuration on your QFX5220, QFX5230, QFX5240, and QFX5241 Switches by using the Junos OS Evolved CLI. Initial configuration includes root login to the device, setting the root authentication password, assigning the device name, enabling remote access, configuring the IP address for management interface, setting the date and time, and configuring DNS details.
Overview
When you buy any network device, it comes with the factory-default configuration (basic device configuration). This factory-default configuration loads automatically the first time you install the device and power it on.
In this section, you'll learn to customize the factory-default configuration on a QFX Series Switch by using CLI commands. You'll learn how to connect to your switch using the console port and perform an initial configuration to get your device up and running. You can always revert to the factory-default configuration whenever you want. For more information about restoring the default factory configuration, see Reverting to the Default Factory Configuration.
Before You Begin
Gather the following items or information before configuring the switch:
-
Laptop or a desktop PC
-
RJ-45, USB-A, and USB-C cable
-
Name of the switch that you will use on the network
-
Password for the root user
-
Domain name the switch will use
-
For Out Of Band management, IP address and prefix-length information for the Ethernet interface
-
IP address of the default gateway
-
IP address of the DNS server
Perform Initial Device Configuration
To perform initial software configuration on the QFX Series Switch:
Connect the console port of your switch to a laptop or a desktop PC using the RJ-45 cable. By default, console port access is enabled on your device.
Note: If your laptop or desktop PC does not have a serial port, use a serial-to-USB adapter.Power on the switch and wait for it to boot. The software boots automatically. When the boot process is complete, the login: prompt on the console appears.
login:
At the login prompt, type root to log in.
Note:Initially, you do not need a password for the root user account. The device prompt
root@%indicates that you are the root user.login: root
Type cli to start the Junos OS Evolved CLI.
root@% cli root@<hostname>#
Type configure to access the CLI configuration mode.
root@<hostname># configure [edit] root@<hostname>#
To prevent automatic software update, stop the chassis auto-upgrade process.
Note: Until you assign a root password and perform an initial commit, you might see zero-touch provisioning (ZTP)-related messages on the console. You can safely ignore these messages while you configure the root password.[edit] root@<hostname># delete chassis auto-image-upgrade
Stop ZTP.
Note: ZTP is enabled on the QFX Series Switches by default. You must stop ZTP before you configure any settings.[edit] root@<hostname># delete system commit factory-settings
Set the root authentication password and commit.
[edit] root@<hostname># set system root-authentication plain-text-password New password: password Retype new password: password
Configure the name of the switch. If the name includes spaces, enclose the name in quotation marks (“ ”).
[edit] root@<hostname># set system host-name host-name
Commit the configuration, and wait for the ZTP process to stop. Learn how to protect network security by configuring the root password.
root@<hostname># commit
Enable remote access. Remote management access to the device and all management access protocols—such as Telnet, FTP, and SSH—is disabled by default.
To enable SSH service:
[edit] root@<hostname># set system services ssh root-login allow
This command allows root login through SSH. You must configure other users' profiles separately.
To enable Telnet service, if required:
[edit] root@<hostname># set system services telnet
Note: When Telnet is enabled, you cannot log in to the QFX Series Switch using root credentials. Root login is allowed only for SSH access.
Configure the IP address and prefix length for the management interface on the switch.
Note: For more information about how to connect to the management port, see the Switch Management Cable Specifications and Pinouts section in the hardware guide.[edit] root@<hostname># set interfaces re0:mgmt-0 unit 0 family inet address ip-address/prefix-length
Set the date and time on a device manually or use an NTP server to synchronize the date and time.
From the operational mode, manually set the date and time.
[edit] root@<hostname># run set date YYYYMMDDhhmm.ss
In case of NTP server, the date and time syncs automatically. Run the following command to configure the NTP server.
[edit] root@<hostname># set system ntp server ntp-server run show system uptime | match Current run show system status
Configure the domain name and DNS servers on your switch at the system hierarchy level. This allows hostname resolution and full identity through DNS.
[edit] root@<hostname># set system domain-name domain root@<hostname># set system name-server ip-address
Commit the configuration. This step completes the minimum Day-0 configuration.
[edit] root@<hostname># commit
Save the configuration and exit. At this point, the switch is reachable through the management IP address (SSH) and ready for further Day‑1 configuration.
[edit] root@<hostname># exit