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.
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:
system { commit { factory-settings { reset-chassis-lcd-menu; reset-virtual-chassis-configuration; } } services { ssh; netconf { ssh; rfc-compliant; yang-compliant; } } auto-snapshot; syslog { file interactive-commands { interactive-commands any; } file messages { any notice; authorization info; } } processes { dhcp-service { traceoptions { file dhcp_logfile size 10m; level all; flag packet; } } } phone-home { server https://redirect.juniper.net; rfc-compliant; } ## Warning: missing mandatory statement(s): 'root-authentication' } chassis { redundancy { graceful-switchover; } auto-image-upgrade; } interfaces { ge-0/0/0 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/1 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/2 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/3 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/4 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/5 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/6 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/7 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/8 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/9 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/10 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/11 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/12 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/13 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/14 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/15 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/16 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/17 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/18 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/19 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/20 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/21 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/22 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/23 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/24 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/25 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/26 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/27 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/28 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/29 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/30 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/31 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/32 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/33 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/34 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/35 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/36 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/37 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/38 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/39 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/40 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/41 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/42 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/43 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/44 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/45 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/46 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/0/47 { unit 0 { family ethernet-switching { storm-control default; } } } et-0/1/0 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/1/0 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/1/0 { unit 0 { family ethernet-switching { storm-control default; } } } et-0/1/1 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/1/1 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/1/1 { unit 0 { family ethernet-switching { storm-control default; } } } et-0/1/2 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/1/2 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/1/2 { unit 0 { family ethernet-switching { storm-control default; } } } et-0/1/3 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/1/3 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/1/3 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/2/0 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/2/0 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/2/1 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/2/1 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/2/2 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/2/2 { unit 0 { family ethernet-switching { storm-control default; } } } ge-0/2/3 { unit 0 { family ethernet-switching { storm-control default; } } } xe-0/2/3 { unit 0 { family ethernet-switching { storm-control default; } } } irb { unit 0 { family inet { dhcp { vendor-id Juniper-ex4100-48p-FA1422AN0045; } } family inet6 { dhcpv6-client { client-type stateful; client-ia-type ia-na; client-identifier duid-type duid-ll; vendor-id Juniper:ex4100-48p:FA1422AN0045; } } } } vme { unit 0 { family inet { dhcp { vendor-id Juniper-ex4100-48p-FA1422AN0045; } } family inet6 { dhcpv6-client { client-type stateful; client-ia-type ia-na; client-identifier duid-type duid-ll; vendor-id Juniper:ex4100-48p:FA1422AN0045; } } } } } forwarding-options { storm-control-profiles default { all; } } protocols { router-advertisement { interface vme.0 { managed-configuration; } interface irb.0 { managed-configuration; } } lldp { interface all; } lldp-med { interface all; } igmp-snooping { vlan default; } rstp { interface ge-0/0/0; interface ge-0/0/1; interface ge-0/0/2; interface ge-0/0/3; interface ge-0/0/4; interface ge-0/0/5; interface ge-0/0/6; interface ge-0/0/7; interface ge-0/0/8; interface ge-0/0/9; interface ge-0/0/10; interface ge-0/0/11; interface ge-0/0/12; interface ge-0/0/13; interface ge-0/0/14; interface ge-0/0/15; interface ge-0/0/16; interface ge-0/0/17; interface ge-0/0/18; interface ge-0/0/19; interface ge-0/0/20; interface ge-0/0/21; interface ge-0/0/22; interface ge-0/0/23; interface ge-0/0/24; interface ge-0/0/25; interface ge-0/0/26; interface ge-0/0/27; interface ge-0/0/28; interface ge-0/0/29; interface ge-0/0/30; interface ge-0/0/31; interface ge-0/0/32; interface ge-0/0/33; interface ge-0/0/34; interface ge-0/0/35; interface ge-0/0/36; interface ge-0/0/37; interface ge-0/0/38; interface ge-0/0/39; interface ge-0/0/40; interface ge-0/0/41; interface ge-0/0/42; interface ge-0/0/43; interface ge-0/0/44; interface ge-0/0/45; interface ge-0/0/46; interface ge-0/0/47; interface et-0/1/0; interface ge-0/1/0; interface xe-0/1/0; interface et-0/1/1; interface ge-0/1/1; interface xe-0/1/1; interface et-0/1/2; interface ge-0/1/2; interface xe-0/1/2; interface et-0/1/3; interface ge-0/1/3; interface xe-0/1/3; interface ge-0/2/0; interface xe-0/2/0; interface ge-0/2/1; interface xe-0/2/1; interface ge-0/2/2; interface xe-0/2/2; interface ge-0/2/3; interface xe-0/2/3; } } poe { interface all; } vlans { default { vlan-id 1; l3-interface irb.0; } }
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)
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:
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.
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.
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:
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
- Revert to the EX Series Switch Factory-Default Configuration Using the load factory-default Command
- Revert to the Factory-Default Configuration Using the Factory Reset/Port Mode button
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.
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:
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.)
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:
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
.
-
[edit] user@switch#
load factory-default
-
[edit] user@switch#
delete system commit factory-settings
-
[edit] user@switch#
set system root-authentication plain-text-password
-
[edit] user@switch#
commit
-
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 theshow virtual-chassis vc-port
command. -
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.
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:
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:
-
[edit] user@switch#
set chassis config-button no-clear
-
[edit] user@switch#
commit
To enable the Factory Reset/Mode button, run the following commands:
-
[edit] user@switch#
delete chassis config-button no-clear
-
[edit] user@switch#
commit