This post is a follow up to one of my previous post, “Juniper EX4600 Layer 3 Config – DHCP – Part 2“. Previously, I talked about how to configure the DHCP server on the Juniper EX series switch using the CLI Commands under “Additional CLI”. Since then, Juniper-Mist has added support for the DHCP server and relay configuration in the Mist Dashboard.
I have a Juniper EX2300 series switch acting as my core switch with all the Layer 3 virtual (VLAN) interfaces configured on it.

DHCP Config – JunOS CLI
Just as a recap, if I want to configure the DHCP server via CLI, I would use the following commands for all those VLANs.
delete groups vlan_dhcp
set groups vlan_dhcp system services dhcp-local-server group mali_dhcp interface irb.10
set groups vlan_dhcp access address-assignment pool vlan10 family inet network 192.168.10.0/24
set groups vlan_dhcp access address-assignment pool vlan10 family inet range vlan-range-10 low 192.168.10.0 high 192.168.10.254
set groups vlan_dhcp access address-assignment pool vlan10 family inet dhcp-attributes option 43 ip-address 192.168.10.11
set groups vlan_dhcp access address-assignment pool vlan10 family inet excluded-range vlan-range-10 low 192.168.10.0 high 192.168.10.100
set groups vlan_dhcp access address-assignment pool vlan10 family inet dhcp-attributes router 192.168.10.1
set groups vlan_dhcp access address-assignment pool vlan10 family inet dhcp-attributes name-server 208.67.222.222
set groups vlan_dhcp system services dhcp-local-server group mali_dhcp interface irb.20
set groups vlan_dhcp access address-assignment pool vlan20 family inet network 192.168.20.0/24
set groups vlan_dhcp access address-assignment pool vlan20 family inet range vlan-range-20 low 192.168.20.0 high 192.168.20.254
set groups vlan_dhcp access address-assignment pool vlan20 family inet excluded-range vlan-range-20 low 192.168.20.0 high 192.168.20.100
set groups vlan_dhcp access address-assignment pool vlan20 family inet dhcp-attributes router 192.168.20.1
set groups vlan_dhcp access address-assignment pool vlan20 family inet dhcp-attributes name-server 208.67.222.222
set groups vlan_dhcp system services dhcp-local-server group mali_dhcp interface irb.30
set groups vlan_dhcp access address-assignment pool vlan30 family inet network 192.168.30.0/24
set groups vlan_dhcp access address-assignment pool vlan30 family inet range vlan-range-30 low 192.168.30.0 high 192.168.30.254
set groups vlan_dhcp access address-assignment pool vlan30 family inet excluded-range vlan-range-30 low 192.168.30.0 high 192.168.30.100
set groups vlan_dhcp access address-assignment pool vlan30 family inet dhcp-attributes router 192.168.30.1
set groups vlan_dhcp access address-assignment pool vlan30 family inet dhcp-attributes name-server 208.67.222.222
set groups vlan_dhcp system services dhcp-local-server group mali_dhcp interface irb.40
set groups vlan_dhcp access address-assignment pool vlan40 family inet network 192.168.40.0/24
set groups vlan_dhcp access address-assignment pool vlan40 family inet range vlan-range-40 low 192.168.40.0 high 192.168.40.254
set groups vlan_dhcp access address-assignment pool vlan40 family inet excluded-range vlan-range-40 low 192.168.40.0 high 192.168.40.100
set groups vlan_dhcp access address-assignment pool vlan40 family inet dhcp-attributes router 192.168.40.1
set groups vlan_dhcp access address-assignment pool vlan40 family inet dhcp-attributes name-server 208.67.222.222
set apply-groups vlan_dhcp
DHCP Configuration in Mist UI:
First Enable the DHCP server and then click on “Add DHCP Network”.


In the next screen, I simply have to choose if I am configuring a server or a relay, provide the information in rest of the fields such as “Network Interface”, “Start/End IPs”, “Gateway”, “DNS”.
Here is a typical example:

DHCP Relay Configuration – Mist UI:
What if this switch is not a DHCP server and/or I want to forward DHCP requests for a particular VLAN to another DHCP server. I can choose “Relay” (NOTE: this is the same as “ip-helper”) and configure the IP Address of the “DHCP Server”.

DHCP Options – Mist UI
Currently there isn’t a way to add multiple DHCP options using this method. If you have a need to configure specific DHCP options like “Option 43”, you can simply use the “Additional CLI” section for that. Here is a sample config:
delete groups vlan_dhcp
set groups vlan_dhcp system services dhcp-local-server group mali_dhcp interface irb.10
set groups vlan_dhcp access address-assignment pool vlan10 family inet network 192.168.10.0/24
set groups vlan_dhcp access address-assignment pool vlan10 family inet range vlan-range-10 low 192.168.10.0 high 192.168.10.254
set groups vlan_dhcp access address-assignment pool vlan10 family inet dhcp-attributes option 43 ip-address 192.168.10.11
set groups vlan_dhcp access address-assignment pool vlan10 family inet excluded-range vlan-range-10 low 192.168.10.0 high 192.168.10.100
set groups vlan_dhcp access address-assignment pool vlan10 family inet dhcp-attributes router 192.168.10.1
set groups vlan_dhcp access address-assignment pool vlan10 family inet dhcp-attributes name-server 208.67.222.222
set apply-groups vlan_dhcp
If I look at different available keywords after the “dhcp-attributes option ##” I can see different keywords available to me.

NOTE: All config samples are from my lab environment use them at your risk. They are provided as is without any warranty, assurance. Always test configurations, settings etc in a non production environment before using it in production.