Enter CLI configuration mode
cli configure
1. Set Root Password
set system root-authentication plain-text-password
Enter and confirm the root password.
2. Assign Hostname
set system host-name EX4200-Switch
3. Configure VLANs
set vlans Management vlan-id 40 set vlans PCs vlan-id 10 set vlans Servers vlan-id 50
4. Assign Management VLAN IP Address
set interfaces vlan unit 40 family inet address 192.168.40.1/24
5. Configure Access Ports
PCs VLAN (VLAN 10)
set interfaces ge-0/0/1 unit 0 family ethernet-switching port-mode access set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members PCs
Servers VLAN (VLAN 50)
set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode access set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members Servers
Management VLAN (VLAN 40) - Optional Access Port
set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode access set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members Management
6. Configure Trunk Port (VLANs 10, 40, 50)
set interfaces ge-0/0/3 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/3 unit 0 family ethernet-switching vlan members [PCs Servers Management]
7. Set Routing for Management VLAN
set routing-options static route 0.0.0.0/0 next-hop 192.168.40.254
8. Enable Management Services
set system services ssh
9. Enable Spanning Tree Protocol (STP)
set protocols rstp
10. Optional: Configure Syslog
set system syslog host 192.168.40.100 any info
11. Optional: Enable NTP
set system ntp server 192.168.40.200
12. Optional: Configure DHCP Relay for PCs and Servers
set forwarding-options dhcp-relay server-group DHCP-SERVER 192.168.40.100 set forwarding-options dhcp-relay active-server-group DHCP-SERVER set forwarding-options dhcp-relay group PCs interface vlan.10 set forwarding-options dhcp-relay group Servers interface vlan.50
13. Save Configuration
commit
Verify Configuration
show configuration
Validate Setup
Check VLAN Assignments
show vlans
Check Interface Status
show interfaces terse
Test Management Connectivity
ping 192.168.40.254