Connecting and Configuring an EX Series Switch (CLI Procedure)


There are two ways to connect and configure an EX  Series switch: one method is through the console by using the CLI and the other is by using the J-Web interface.


You cannot connect to and perform initial configuration of EX2200-24T-4G-DC, EX4300-48MP, EX4300-48MP-S switches, and EX4600 switches using EZSetup procedure from the J-Web interface. For EX2200-24T-4G-DC switches, you must use EZSetup from the switch console. For EX4300-48MP, EX4300-48MP-S, and EX4600 switches, you must use the CLI procedure through the switch console.

This topic describes the CLI procedure.


To run the ezsetup script, the switch must have the factory-default configuration as the active configuration. If you have configured anything on the switch and want to run ezsetup, revert to the factory-default configuration. See Reverting to the Default Factory Configuration for the EX Series Switch.

Using the CLI, set the following parameter values in the console server or PC:

  • Baud rate— 9600

  • Flow control— None

  • Data— 8

  • Parity— None

  • Stop bits— 1

  • DCD state— Disregard

To connect and configure the switch from the console by using the CLI:

  1. Connect the console port to a laptop or PC by using the RJ-45 to DB-9 serial port adapter. An Ethernet cable that has an RJ-45 connector at either end and an RJ-45 to DB-9 serial port adapter are supplied with the switch.Note

    In EX2200-C, EX2300, EX3400, EX4300, and EX4550 switches, you can also use the Mini-USB Type-B console port to connect to a laptop or PC. See Connecting an EX Series Switch to a Management Console by Using the Mini-USB Type-B Console Port.

  2. At the Junos  OS shell prompt root%, type ezsetup.
  3. (Optional) Enter the hostname.
  4. Enter the root password you want to use for the device.
  5. When prompted, reenter the password.
  6. Enable services such as SSH and Telnet.


    You will not be able to log in to the switch as the root user through Telnet. Root login is allowed only through SSH.

    • The default option for SSH is yes. Select this to enable SSH.

    • The default option for Telnet is no. Change this to yes to enable Telnet.

  7. Use the Management Options page to select the management scenario. You can select in-band management or out-of-band management:Note

    On EX4500, EX6200, and EX8200 switches, only the out-of-band management option is available.

    • Configure in-band management. In in-band management, you configure a network interface or an uplink module (expansion module) interface as the management interface and connect it to the management device.

      In this scenario, you have the following two options:

      • Use the automatically created VLAN default for management— Select this option to configure all data interfaces as members of the default VLAN. Specify the management IP address and the default gateway.

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

    • Configure out-of-band management—Configure the management port. In out-of-band management, you use a dedicated management channel (MGMT 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.

  8. (Optional) Specify the SNMP read community, location, and contact to configure SNMP parameters.
  9. (Optional) Specify the system date and time. Select the time zone from the list.

    The configured parameters are displayed.

  10. Enter yes to commit the configuration. The configuration is committed as the active configuration for the switch.
  11. (For EX4500 switches only) Enter the operational mode command request chassis pic-mode intraconnect to set the PIC mode to intraconnect.

You can now log in with the CLI or the J-Web interface to continue configuring the switch. If you use the J-Web interface to continue configuring the switch, the Web session is redirected to the new management IP address. If the connection cannot be made, the J-Web interface displays instructions for starting a J-Web session.