Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure Junos OS on an EX4100 Switch

EX4100 Default Configuration

Each EX Series switch is programmed with a factory default configuration that contains the values set for each configuration parameter when the switch is shipped. The default configuration file sets values for system parameters such as syslog and commit, configures Ethernet switching on all interfaces, enables IGMP snooping, and enables the LLDP and RSTP protocols.

Note:
  • The factory default configuration file has more interfaces for models that have more ports.

  • The poe statement does not appear for models without PoE+ ports.

When you commit changes to the configuration, a new configuration file is created. This file becomes the active configuration. You can always revert to the factory-default configuration. See Revert to the Default Factory Configuration on an EX Series Switch.

The following is the factory-default configuration file for an EX4100-48P switch:

Connect and Configure an EX4100 Switch

Before you connect and configure an EX4100 switch, set the following parameter values on the console server or 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 laptop or PC, with a serial port (not provided)

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.

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

An EX4100 switch is shipped with Junos OS preinstalled and ready to be configured when the switch is powered on. You must perform the initial configuration of the switch through the console port (labeled CON) on the rear panel of the switch by using the CLI.

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

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

  1. Power the switch on.
  2. Connect the console port (labeled CON) on the rear panel of the switch to a management host such as a laptop or 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 booted before you connected the console port, you might need to press the Enter key for the prompt to appear.
  4. Start the CLI.
  5. Enter configuration mode.
  6. Add a password to the root administration user account. Enter a clear-text password, an encrypted password, or an SSH public key string.

    or

    or

    or

    or

  7. (Optional) Configure the hostname of the switch. If the name includes spaces, enclose the name in double quotation marks (“ ”).
  8. (Optional) Create a user account.
  9. (Optional) Set the user account class to super-user.
  10. (Optional) Configure the domain name of the switch.
  11. Configure the default gateway.
  12. Configure the IP address and prefix length for the management interface on the switch.
    Note:

    The management port vme (labeled MGMT) is located on the rear panel of the switch.

  13. (Optional) Configure the IP address of a backup router, which is used only while the routing protocol is not running.
  14. Configure the IP address of a DNS server.
  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.
  16. (Optional) Configure the static routes to remote prefixes with access to the management port.
  17. Configure the SSH service.
  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) Configure additional properties by adding the necessary configuration statements.
  23. Commit the configuration to activate it on the switch.
  24. When you have finished configuring the switch, exit configuration mode.

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

Revert to the Default Factory Configuration on an EX Series Switch

With EX Series switches, if for any reason the current active configuration fails, you can revert to the factory-default configuration.

You can also roll back to a previous configuration, as described in Rolling Back Junos OS Configuration Changes, or revert to the rescue configuration, as described in Reverting to the Rescue Configuration for the EX Series Switch.

Tip:

If you have lost the root password, it is not necessary to revert to the factory-default configuration to reset it. See Recovering the Root Password on Switches.

The factory-default configuration contains the basic configuration settings for the switch. This is the first configuration of the switch and is loaded when the switch is first powered on. For the factory-default configuration file for your switch, see the hardware documentation for your switch.

Tip:

On fixed-configuration switches, you can run the EZsetup script to complete the initial configuration after reverting to the factory-default configuration. (The EZsetup script is not available on modular switches. To configure modular switches, use the CLI or the J-Web interface.) For information about completing the initial configuration using either the CLI or the J-Web interface, see Connecting and Configuring an EX Series Switch (CLI Procedure) or Connecting and Configuring an EX Series Switch (J-Web Procedure).

You can revert to the factory-default configuration by using the request system zeroize operational command or the load factory-default configuration command to revert to the factory-default configuration file that contains all default settings except the root password setting, which is retained.

These procedures are described in the following sections:

Note:

After resetting the factory default configuration either through the CLI or Factory Reset/Port mode button, the previous host name of the device is not reset. The host name can only be changed by configuring a new hostname or rebooting the device.

Revert to the EX Series Switch Factory-Default Configuration Using the request system zeroize Command

The request system zeroize command is a standard Junos OS operational mode command that removes all configuration information and resets all key values. The operation unlinks all user-created data files, including customized configuration and log files, from their directories. The switch then reboots and reverts to the factory-default configuration.

To completely erase user-created data so that it is unrecoverable, use the request system zeroize media command.

CAUTION:

Before issuing request system zeroize, use the request system snapshot command to back up the files currently used to run the switch to a secondary device. Using the zeroize command will destroy Junos and OAM partitions, and the switch may not boot. To recover from a failed software installation, see Recovering from a Failed Software Installation.

To revert to the factory-default configuration by using the request system zeroize command:

  1. Type yes to remove configuration and log files and revert to the factory-default configuration.
    Note:

    The auto-image-upgrade statement is added under the [edit chassis] hierarchy level when you use this procedure. The automatic image upgrade feature is then available on the switch.

Revert to the EX Series Switch Factory-Default Configuration Using the load factory-default Command

The load factory-default command is a standard Junos OS configuration command that replaces the current active configuration with the factory-default configuration except the root password setting. By default, the root password is not set; you must set it to commit the new configuration in this procedure.

If you want to run the EZsetup script to complete the initial configuration of the switch after you revert to the factory-default configuration, do not use the load factory-default command. Instead, revert using the request system zeroize command. If you use the load factory-default command to revert to the factory-default configuration, the configuration for the root password is retained and the EZsetup script will not run. (The EZsetup script is available only on fixed configuration switches, it is not available on modular switches.)

Note:

The load factory-default command by itself is not supported on EX3300, EX4200, EX4500, and EX4550 switches configured in a Virtual Chassis.

To revert to the factory-default configuration by using the load factory-default command:

Note:

If you use this procedure, you must delete the system commit factory settings, set the root password, and commit the configuration. These steps are not required when you revert to the factory-default configuration by using request system zeroize. Also, the auto-image-upgrade statement is not added to the configuration when you use this procedure; it is added to the configuration when you use request system zeroize.

  1. [edit] user@switch# load factory-default
  2. [edit] user@switch# delete system commit factory-settings
  3. [edit] user@switch# set system root-authentication plain-text-password
  4. [edit] user@switch# commit
  5. Check the member ID and primary-role priority with the show virtual-chassis command and check to see whether there are remaining settings for VCPs by using the show virtual-chassis vc-port command.
  6. Check for remaining settings for VCPs by using the show virtual-chassis vc-port command.

Revert to the Factory-Default Configuration Using the Factory Reset/Port Mode button

To set the switches to the factory-default configuration, use the Factory Reset/Mode button located on the far right side of the front panel.

Note:

To revert a member switch of a Virtual Chassis to the factory-default configuration, disconnect the cables connected to the Virtual Chassis ports (VCPs). You disconnect the cables to prevent any effect on Virtual Chassis configuration parameters (such as member ID, primary-role priority, and setting of VCP uplinks) on other members (see Disconnect a Fiber-Optic Cable).

To revert to the factory-default configuration by using the Factory Reset/Mode button:

  1. Press the Factory Reset/Mode button for 10 seconds. The switch transitions into factory-default configuration, the console displays committing factory default configuration, and the Link/Activity LED on the RJ-45 network ports and the uplink ports is lit steadily green.
  2. Press the Factory Reset/Mode button for 10 more seconds. The switch transitions into initial setup mode, the console displays committing ezsetup config, and the Link/Activity LED on the RJ-45 network ports and the uplink ports blink green.
    Note that you can also press the Factory Reset/Mode button continuously for 10 seconds + 10 seconds, totalling over 20 seconds to commit factory default configuration as well as commit ezsetup config.

The Factory Reset/Mode button is enabled by default. You can disable the button using the CLI.

To disable the Factory Reset/Mode button, run the following commands:

  1. [edit] user@switch# set chassis config-button no-clear

  2. [edit] user@switch# commit

To enable the Factory Reset/Mode button, run the following commands:

  1. [edit] user@switch# delete chassis config-button no-clear

  2. [edit] user@switch# commit