This article provides information on how to configure a SRX device (running 12.x or later) as a DHCP Server to provide the IP address to client, when the client facing interface is part of a VLAN.
Starting with 12.x, the DHCP process has been modified and the new process is JDHCP. Even though both of the processes run on the device, it is recommended to use JDHCP and not DHCP.
set vlans VLAN1 vlan-id 10 set vlans VLAN1 l3-interface vlan.1
set interfaces ge-0/0/15 unit 0 family ethernet-switching vlan members VLAN1 set interfaces vlan unit 1 family inet address 6.6.6.1/24
set system services dhcp-local-server group JDHCP interface vlan.1 set access address-assignment pool JDHCPVR-POOL family inet network 6.6.6.0/24 set access address-assignment pool JDHCPVR-POOL family inet range JDHCPVR-RANGE low 6.6.6.66 set access address-assignment pool JDHCPVR-POOL family inet range JDHCPVR-RANGE high 6.6.6.67 set access address-assignment pool JDHCPVR-POOL family inet dhcp-attributes router 6.6.6.1 set access address-assignment pool JDHCPVR-POOL family inet dhcp-attributes name-server 8.8.8.8
set security zones security-zone TRUST interfaces vlan.1 host-inbound-traffic system-services all set security zones security-zone TRUST interfaces vlan.1 host-inbound-traffic protocols all
[edit] root@SRX240# run show dhcp server statistics Packets dropped: Total 0 Messages received: BOOTREQUEST 2 DHCPDECLINE 0 DHCPDISCOVER 1 DHCPINFORM 0 DHCPRELEASE 0 DHCPREQUEST 1 Messages sent: BOOTREPLY 2 DHCPOFFER 1 DHCPACK 1 DHCPNAK 0 DHCPFORCERENEW 0
2020-07-25: Article reviewed for accuracy; no changes required.