Sample First-Boot Config
(2013-07-19)
This is how I configure my EX2200 when I first get them.
New EX2200 Initial Setup
We reserve 10.30.1.99 as the IP address for a switch being set up. If you have a pre-allocated name and IP for the switch, you should substitute those for the relevant points in the example below.
Attach a console to the serial port in the back. Apply power and watch it boot.
Log in as root, no password.
Issue these commands:
delete chassis auto-image-upgrade
set system host-name "switchHostname"
set system services ssh
set system services web-management http
set interfaces me0 unit 0 family inet address 10.30.1.99/24
set routing-options static route 0.0.0.0/0 next-hop 10.30.1.254
delete chassis auto-image-upgrade
set system root-authentication plain-text-password
New Password: password
Retype new password: password
commit
What you have done here is:
- set the switch's internal host name
- enable ssh management
- enable http management
- set the management interface (the port on the back)'s IP address
- set the default gateway for the management interface
- turn off the chassis auto upgrade process which will probably hijack your CLI session if you are not careful
- set the root password
If for whatever reason you want to set the management interface to be a dhcp client (because you are doing the configuration on a dhcp network and you don't have any static IPs), the command to use is:
set interfaces me0 unit 0 family inet dhcp
At this point you can plug the switch's MGMT interface into the 10.30.1 network.
Rescue
It is highly recommended that you then save this configuration as the "rescue" configuration. This may permit us to recover the switch should a configuration be committed which prevents us from logging in remotely. Save the "rescue" configuration as so:
cli
request system configuration rescue save
Firmware
If you need to update the firmware to the current recommended, run this from the OS level:
ntpdate 10.30.1.147
cli
request system software add http://10.30.1.148/juniper/jinstall-ex-2200-11.4R6.5-domestic-signed.tgz
If you have an old firmware (before 10.4, I think --check your release notes) you have to update the jloader as well:
request system software add http://10.30.1.148/juniper/jloader-ex-2200-11.3I20110326_0802_hmerge-signed.tgz
Then reboot the system
request system reboot
...and watch the console. The reboot will take at least 20 minutes to run.
Finish and Deploy
Log into the switch's web interface, and complete the configuration. This is usually done in the Configure - > CLI Tools -> CLI Editor window, copying and pasting from another reference switch. Remember to commit after making your changes.
Make sure you copy:
- the syslog section
- the snmp section
- the entire VLAN section
Your switch should now have a default configuration on it and can be configured for its particular roles.