Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
QFX5120 Switch Hardware Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configure Junos OS on the QFX5120

date_range 23-May-24

QFX5120 Default Configuration

We ship each QFX5120 switch programmed with a factory-default configuration that contains the values set for each configuration parameter. The default configuration file sets values for system parameters such as the system log and file messages.

When you commit changes to the configuration, a new configuration file is created that becomes the active configuration. You can always revert to the factory-default configuration.

This topic shows the factory-default configuration file of a QFX5120 switch:

content_copy zoom_out_map
system {
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
    commit {
        factory-settings;
    }
}

Connect and Configure a QFX5120 Switch

Before you connect and configure a QFX5120, set the following parameter values on the console server or desktop PC:

  • Baud Rate—9600

  • Data—8

  • Flow Control—None

  • Parity—None

  • Stop Bits—1

  • DCD State—Disregard

Ensure that you have the following parts and tools available:

  • An Ethernet cable with an RJ-45 connector attached—not provided

  • An RJ-45 to DB-9 serial port adapter—not provided

  • A management host such as a laptop or desktop PC, with a serial port—not provided

Have the following information available before you configure custom settings for the switch:

  • Root password

  • IP address of the default gateway

  • IP address of the management port

  • IP address of a DNS server

  • (Optional) Hostname

  • (Optional) IP address of a backup router

  • (Optional) SNMP read community, location, and contact to configure SNMP parameters

  • (Optional) Static routes to remote subnets with access to the management port

  • (Optional) Static routes to remote prefixes with access to the management port

We ship the QFX5120 switch with Junos OS preinstalled and ready to be configured when you power on the switch. You must perform the initial configuration of the QFX5120 through the console port (labeled CON) on the switch by using the command-line interface (CLI).

This procedure describes how to perform the initial configuration on the switch and to connect it to the network. For the complete information about enabling the switch to forward traffic, including examples, see the Junos OS configuration guides.

Note:
We no longer include the RJ-45 console cable with the DB-9 adapter as part of the device package. If the console cable and adapter are not included in your device package, or if you need a different type of adapter, you can order the following separately:
  • RJ-45 to DB-9 adapter (JNP-CBL-RJ45-DB9)
  • RJ-45 to USB-A adapter (JNP-CBL-RJ45-USBA)
  • RJ-45 to USB-C adapter (JNP-CBL-RJ45-USBC)

If you want to use RJ-45 to USB-A or RJ-45 to USB-C adapter you must have X64 (64-Bit) Virtual COM port (VCP) driver installed on your PC. See, https://ftdichip.com/drivers/vcp-drivers/ to download the driver.

To perform the initial configuration on the switch and to connect it to the network:

  1. Power the switch on.
  2. Connect the console port (labeled CON) on the switch to a management host such as a laptop or desktop PC by using an RJ-45 to DB-9 serial port adapter.
  3. At the Junos OS login prompt, type root to log in. You don't need to enter a password. If the software boots before you connect to the console port, you might need to press the Enter key on the keyboard for the prompt to appear.
    content_copy zoom_out_map
    login: root
    
  4. Start the CLI.
    content_copy zoom_out_map
    root@:RE:0% cli
    root>
    
  5. Enter the configuration mode.
    content_copy zoom_out_map
    root> configure
    [edit]
    root#
    
  6. Add a password to the root administration user account. Enter a plain-text password, an encrypted password, or an SSH public key string.

    Plain-text password:

    content_copy zoom_out_map
    [edit]
    root# set system root-authentication plain-text-password
    New password: password
    Retype new password: password
    

    Encrypted password:

    content_copy zoom_out_map
    [edit]
    root# set system root-authentication encrypted-password encrypted-password
    
    content_copy zoom_out_map
    [edit]
    root# set system root-authentication ssh-ecdsa public-key
    

    SSH-ECDSA password:

    content_copy zoom_out_map
    [edit]
    root# set system root-authentication ssh-ed25519 public-key
    

    SSH-RSA password:

    content_copy zoom_out_map
    [edit]
    root# set system root-authentication ssh-rsa public-key
    
  7. (Optional) Configure the hostname of the switch. If the name includes spaces, enclose the name in double quotation marks (“ ”).
    content_copy zoom_out_map
    [edit]
    root# set system host-name host-name
    
  8. (Optional) Create a user account.
    content_copy zoom_out_map
    [edit]
    root# set system login user user-name authentication plain-text-password
    New password: password
    Retype new password: password
    
  9. (Optional) Set the user account class to super-user.
    content_copy zoom_out_map
    [edit]
    root# set system login user user-name class super-user
    
  10. (Optional) Configure the domain name of the switch.
    content_copy zoom_out_map
    [edit]
    root# set system domain-name domain-name
    
  11. Configure the default gateway.
    content_copy zoom_out_map
    [edit]
    root# set routing-options static route 0/0 next-hop address
    
  12. Configure the IP address and prefix length for the management interface on the switch.
    content_copy zoom_out_map
    [edit]
    root# set interfaces em0 unit 0 family inet address address/prefix-length
    
    Note:

    The management port em0 (labeled MGMT) is located on the front panel of the QFX5120-32C switch. The management port em0 (labeled MGMT) is located on the rear panel of the QFX5120-48T switch. The management ports em0 (labeled C0) and em1 (labeled C1) are located on the rear panel of the QFX5120-48Y and QFX5120-48YM switches.

  13. (Optional) Configure the IP address of a backup router, which is used only while the routing protocol is not running.
    content_copy zoom_out_map
    [edit]
    root# set system backup-router address
    
  14. Configure the IP address of a DNS server.
    content_copy zoom_out_map
    [edit]
    root# set system name-server address
    
  15. (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.
    content_copy zoom_out_map
    [edit]
    root# set routing-options static route remote-subnet next-hop destination-IP retain no-readvertise
    
  16. (Optional) Configure the static routes to remote prefixes with access to the management port.
    content_copy zoom_out_map
    [edit]
    root# set routing-options static route remote-prefix next-hop destination-IP retain no-readvertise
    
  17. Configure the SSH service.
    content_copy zoom_out_map
    [edit]
    root# set system services ssh root-login allow
    
  18. Configure in-band management or out-of-band management:
    • With in-band management, you can configure a network port interface as the management interface and connect it to the management device. In this scenario, you can do either of the following:

      • Use the automatically created VLAN named default for management of all data interfaces as members of the default VLAN. Specify the management IP address and the default gateway.

      • Create a new management VLAN. Specify the VLAN name, VLAN ID, management IP address, and default gateway. Select the ports that must be part of this VLAN.

    • With out-of-band management, you use a dedicated management channel (MGMT, C0, or C1 port) to connect to the management device. Specify the IP address and gateway of the management interface. Use this IP address to connect to the switch.

  19. (Optional) Specify the SNMP read community, location, and contact to configure SNMP parameters.
  20. (Optional) Specify the system date and time. Select the time zone from the list. The configured parameters are displayed.
  21. Enter yes to commit the configuration. The configuration is committed as the active configuration for the switch.
  22. (Optional) Display the configuration to verify that it is correct.
    content_copy zoom_out_map
    [edit]
    root# show
    system {
        host-name host-name;
        domain-name domain-name;
        root-authentication {
            authentication-method (password | public-key);
        }
        name-server {
            address;
        }
    }
    interfaces {
        em0 {
            unit 0 {
                family inet {
                    address address/prefix-length;
                }
            }
        }
    }
    
  23. (Optional) Configure additional properties by adding the necessary configuration statements.
  24. Commit the configuration to activate it on the switch.
    content_copy zoom_out_map
    [edit]
    root# commit
    
  25. When you have finished configuring the switch, exit the configuration mode.
    content_copy zoom_out_map
    [edit]
    root@switch# exit
    root@switch>
    

You can now log in by using the CLI and continue configuring the switch.

footer-navigation