Description

This article determine how to configure JDHCP server and client in SRX.

Symptoms

You can see the below error while configuring DHCP

error "Incompatible with the dhcp server configured under 'system services dhcp"

Starting from Junos version 12.1, new DHCP enhanced daemon was introduced called JDHCP.

Solution

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/24
set system services dhcp-local-server group <group-name> interface ge-0/0/0.0

set access address-assignment pool <pool-name> family inet network 192.168.0.0/24
set access address-assignment pool <pool-name> family inet range pool-range low 192.168.0.50
set access address-assignment pool <pool-name> family inet range pool-range high 192.168.0.100
set access address-assignment pool <pool-name> family inet excluded-address 192.168.0.10
set access address-assignment pool <pool-name> family inet excluded-address 192.168.0.20
set access address-assignment pool <pool-name> family inet dhcp-attributes maximum-lease-time 3600
set access address-assignment pool <pool-name> family inet dhcp-attributes domain-name abc.com
set access address-assignment pool <pool-name> family inet dhcp-attributes name-server 8.8.8.8
set 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.0
set 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-client
set security zones security-zone <zone_name> host-inbound-traffic system-services dhcp

Modification History

2024-08-29 : Article Created