This article provides information on how to configure an SRX device with DHCP services in both the default routing instance and a custom routing instance. This is for devices that are running Junos OS Release 12.1 and later. DHCP provides IP to clients that face the default routing instance and custom routing instance.
Starting with Junos OS 12.1 and later, the DHCP process has been modified to an enhanced process called JDHCP.
Either the dhcpd daemon or the jdhcp daemon must run on the device; you cannot run both at the same time.
ge-0/0/1(routing-instance)----------Client
fe-0/0/6(inet table)-------------Client
Create a virtual router:
set routing-instances TEST-VR instance-type virtual-router set routing-instances TEST-VR interface ge-0/0/1.0
Assign IP addresses to the interfaces:
set interfaces ge-0/0/1 unit 0 family inet address 6.6.6.1/24 set interfaces fe-0/0/6 unit 0 family inet address 192.168.1.1/24
Configure the DHCP services:
set routing-instances TEST-VR system services dhcp-local-server group SAM interface ge-0/0/1.0 set routing-instances TEST-VR access address-assignment pool TESTVR-POOL family inet network 6.6.6.0/24 set routing-instances TEST-VR access address-assignment pool TESTVR-POOL family inet range TESTVR-RANGE low 6.6.6.66 set routing-instances TEST-VR access address-assignment pool TESTVR-POOL family inet range TESTVR-RANGE high 6.6.6.67
set system services dhcp-local-server group TEST-VR interface fe-0/0/6.0 set access address-assignment pool test family inet network 192.168.1.0/24 set access address-assignment pool test family inet range test-range low 192.168.1.14 set access address-assignment pool test family inet range test-range high 192.168.1.20
show dhcp server binding routing-instance TEST-VR show dhcp server statistics routing-instance TEST-VR
show dhcp server binding show dhcp server statistics