This article determine how to configure JDHCP server and client in SRX.
You can see the below error while configuring DHCPerror "Incompatible with the dhcp server configured under 'system services dhcp"Starting from Junos version 12.1, new DHCP enhanced daemon was introduced called JDHCP.
The SRX act as DHCP server and client (inheriting the JDHCP commands). Below is a Sample DHCP configuration
Server configuration:
set interfaces ge-0/0/0 unit 0 family inet address 192.168.0.1/24set system services dhcp-local-server group <group-name> interface ge-0/0/0.0set access address-assignment pool <pool-name> family inet network 192.168.0.0/24set access address-assignment pool <pool-name> family inet range pool-range low 192.168.0.50set access address-assignment pool <pool-name> family inet range pool-range high 192.168.0.100set access address-assignment pool <pool-name> family inet excluded-address 192.168.0.10set access address-assignment pool <pool-name> family inet excluded-address 192.168.0.20set access address-assignment pool <pool-name> family inet dhcp-attributes maximum-lease-time 3600set access address-assignment pool <pool-name> family inet dhcp-attributes domain-name abc.comset access address-assignment pool <pool-name> family inet dhcp-attributes name-server 8.8.8.8set access address-assignment pool <pool-name> family inet dhcp-attributes router 192.168.0.1
Note: Ensure, DHCP protocol is allowed in the firewall for the security zone associated with specific interface (in this example, ge-0/0/0.0).
set security zones security-zone <zone_name> interfaces ge-0/0/0.0set security zones security-zone <zone_name> host-inbound-traffic system-services dhcp
DHCP Client configuration:
set interfaces ge-0/0/2 unit 0 family inet dhcp-clientset security zones security-zone <zone_name> host-inbound-traffic system-services dhcp