title: Juniper EX Series Switches
breadcrumbs:
- title: Configuration
- title: Network
---
{% include header.md %}
TODO Clean up, reorganize and add remaining stuff.
Related Pages
{:.no_toc}
Using
{:.no_toc}
WIP
{:.no_toc}
This page is super not done. Just random notes for now.
Resources
Initial Setup
- Connect to the switch using serial (RS-232 w/ RJ45, baud 9600, 8 data bits, no parity, 1 stop bits, no flow control).
- Login with username
root
and no password. You'll enter the shell.
- Enter the operation mode:
cli
- Enter configuration mode:
configure
- Use
exit
to return to CLI.
- Set root password:
set system root-authentication plain-text-password
- Setup a non-root user:
set system login user <user> [full-name <full-name>] class super-user authentication plain-text-password
- Disable root login from SSH:
set system services ssh root-login deny
- Set host name:
set system host-name <host-name>
- Set domain name:
set system domain-name <domain-name>
- Set loopback addresses:
set interfaces lo0.0 family inet address 127.0.0.1/32
set interfaces lo0.0 family inet6 address ::1/128
- Set DNS:
set system name-server <addr>
(once for each address)
- Set time:
- (Optional) Set time locally:
set date <YYYYMMDDhhmm.ss>
- Set server to use while booting:
set system ntp boot-server <address>
- Set server to use periodically:
set system ntp server <address>
- Set time zone:
set system time-zone Europe/Oslo
(example)
- Note: After committing, use
show ntp associations
to verify NTP.
- Disable default virtual chassis ports (VCPs) if not used:
- Enter op mode.
- Show VCPs:
show virtual-chassis vc-port
- Remove VCPs:
request virtual-chassis vc-port delete pic-slot <pic-slot> port <port-number>
- Show again to make sure they disappear. This may take a few seconds.
- Delete default interfaces configs:
wildcard range delete interface ge-0/0/[0-47]
(example, repeat for all FPSc/PICs)
- Disable unused interfaces:
wildcard range set interface ge-0/0/[0-47] disable
(example, repeat for all FPSc/PICs)
- Disable dedicated management port and alarm:
- Disable:
set int me0 disable
- Delete logical interface:
delete int me0.0
- Disable link-down alarm:
set chassis alarm management-ethernet link-down ignore
- Disable default VLAN:
- Delete logical interface:
delete vlan.0
(before disabling)
- Disable logical interface:
set vlan.0 disable
- Setup port-ranges: TODO
- Setup VLANs (not interfaces):
set vlans <name> vlan-id <VID>
- Setup LACP:
- Set number of available LACP interfaces:
set chassis aggregated-devices ethernet device-count <0-64>
- Add individual Ethernet interfaces (not using interface range):
- Delete logical units (or the whole interfaces):
wildcard range delete interfaces ge-0/0/[0-1] unit 0
(example)
- Set as members:
wildcard range set ge-0/0/[0-1] ether-options 802.3ad ae<n>
(for LACP interface ae<n>)
- Enter LACP interface:
edit interface ae<n>
- Set description:
desc <desc>
- Set LACP options:
set aggregated-ether-options lacp active [periodic fast]
- Setup default logical unit:
edit unit 0
- Setup VLAN/address/etc.
- Setup VLAN interfaces:
- Setup trunk ports:
- Enter unit 0 and
family ethernet-switching
of the physical/LACP interface.
- Set mode:
set port-mode trunk
- Set non-native VLANs:
set vlan members <vlan-name> [members <VLAN-name>]
(once per VLAN or repeated syntax)
- (Optional) Set native VLAN:
set native-vlan-id <VID>
- Setup access ports:
- Enter unit 0 and
family ethernet-switching
of the physical/LACP interface.
- Set access VLAN:
set vlan members <VLAN-name>
- Setup L3 interfaces:
- (VLAN) Set L3-interface:
set vlans <name> l3-interface vlan.<VID>
- Enter unit 0 of physical/LACP interface or
vlan.<VID>
for VLAN interfaces.
- Set IPv4 address:
set family inet address <address>/<prefix-length>
- Set IPv6 address:
set family inet6 address <address>/<prefix-length>
- Setup static IP routes:
- IPv4 default gateway:
set routing-options rib inet.0 static route 0.0.0.0/0 next-hop <next-hop>
- IPv6 default gateway:
set routing-options rib inet6.0 static route ::0/0 next-hop <next-hop>
- Configure RSTP: TODO
- Configure SNMP (public RO):
set snmp community public authorization read-only
- Enable auto snapshotting and restoration on corruption:
set system auto-snapshot
- Disable DHCP auto image upgrade:
delete chassis auto-image-upgrade
- Commit configuration:
commit [confirmed]
- Backup config to rescue config:
request system configuration rescue save
Commands
Interfaces
- Disable interface or unit:
set disable
- Perform operation on multiple interfaces:
wildcard range set int ge-0/0/[0-47] unit 0 family ethernet-switching
(example)
Virtual Chassis
- Virtual Chassis (VC) is a simple way of connecting multiple close or distant switches into a ring topology and managing them as a single logical device. It simplifies loop prevention (otherwise using STP) and improves fault tolerance.
- Roles: A VC has one switch as master routing engine, one switch as backup routing engine and the remaining switches as linecards.
- Mastership election: The master is elected based on (in order) highest mastership priority, which member was master last time, which switch has been a member the longest, and which member has the lowest MAC address. When using a preprovisioned config, the mastership priority is automatically assigned based on the selected role.
- LEDs: The "MST" LED will be solid green on the master, blinking green on the backup and off on the linecards.
- Alarms: Alarms for a specific device will only show on the master and the actual device.
- FPCs: Each switch will show as separate FPCs (Flexible PIC (Physical Interface Cards) Concentrators).
Best Practices
- Always zeroize before merging.
- Use no-split-detection if using exactly two devices.
- When removing a device, recycle its old ID in the VC.
- If not preprovisioning the VC, explicitly set the mastership priority to 255 for the devices which should be routing engines.
- Enable synchronized commit to ensure commits are always applied to all members.
Commands and Configuration
- Show status:
- Show overview and nodes:
show virtual-chassis
- Show utilization of nodes:
show chassis fpc
- Configuration changes:
- Commit on both routing engines (always recommended for committing on VC):
commit synchronize
- Enable synchronized commit as default commit:
set system commit synchronize
- Virtual chassis ports (VCPs):
- Show:
show virtual-chassis vc-port
- Remove:
request virtual-chassis vc-port delete pic-slot <pic-slot> port <port-number>
- Change assigned member ID:
request virtual-chassis renumber
Setup
- (Optional) Prepare preprovisioned setup:
- Only accept preprovisioned members:
set virtual-chassis preprovisioned
- Add members:
set member 0 serial-number xxx role routing-engine
set member 1 serial-number xxx role routing-engine
set member 2 serial-number xxx role line-card
- If using only two devices, disable split and merge:
set virtual-chassis no-split-detection
- Enable implicit synchronized commit to all devices:
set system commit synchronize
- Enable graceful routing engine switchover:
set chassis redundancy graceful-switchover
Virtual Chassis Fabric
Virtual Chassis Fabric (VCF) evolves VC into a spine-and-leaf architecture. While VC focuses on simplified management, VCF focuses on improved data center connectivity. Only certain switches (like the QFX5100) support this feature.
Miscellanea
- Serial:
- RS-232 w/ RJ45 (Cisco-like).
- Baud 9600 (default).
- 8 data bits, no parity, 1 stop bits, no flow control.
Random Notes (TODO)
show interfaces
, show interfaces ae0 extensive
, show interfaces terse
, show interfaces terse | match ae
, show interfaces terse ge-* | match up.*up
- Int. range:
set interfaces interface-range <whatever> [member-range ge-0/0/0 to ge-0/0/1]
- LACP:
- No "unit 0" on LACP slave interfaces.
- (Optional) Create range or do it per phys. int.
set interfaces ge-0/0/0 ether-options 802.3ad ae0
set interfaces ae0 aggregated-ether-options lacp active
set aggregated-devices ethernet device-count <n>
(0-64)
- Set IP address:
set interfaces ae0 unit 0 family inet address 10.0.0.1/30
- Static route:
set routing-options static route 10.0.0.0/24 next-hop 10.0.1.1
show configuration [...] | display set
{% include footer.md %}