Knowledge Search


×
 

[SRX] How to configure JDHCP in a routing instance

  [KB26897] Show Article Properties


Summary:

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 the client, when the client facing interface is part of a routing instance.

Symptoms:

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.

Solution:

Setup:

SRX(ge-0/0/15)---------client
Create a virtual router:
set routing-instances SACHIN-VR instance-type virtual-router
Assign an interface to the virtual router:
set routing-instances SACHIN-VR interface ge-0/0/15.0
Assign the IP address to the interface:
set interfaces ge-0/0/15 unit 0 family inet address 6.6.6.1/24
Configure the DHCP server:
set routing-instances SACHIN-VR system services dhcp-local-server group SAM interface ge-0/0/15.0
set routing-instances SACHIN-VR access address-assignment pool SACHINVR-POOL family inet network 6.6.6.0/24
set routing-instances SACHIN-VR access address-assignment pool SACHINVR-POOL family inet dhcp-attributes router 6.6.6.1
set routing-instances SACHIN-VR access address-assignment pool SACHINVR-POOL family inet dhcp-attributes name-server 8.8.8.8
set routing-instances SACHIN-VR access address-assignment pool SACHINVR-POOL family inet range SACHINVR-RANGE low 6.6.6.66
set routing-instances SACHIN-VR access address-assignment pool SACHINVR-POOL family inet range SACHINVR-RANGE high 6.6.6.67
Configure the security zone to allow the DHCP protocol:
set security zones security-zone UNTRUST host-inbound-traffic system-services all
set security zones security-zone UNTRUST host-inbound-traffic protocols all
set security zones security-zone UNTRUST interfaces ge-0/0/15.0
Verification:

Use the following commands to verify if JDHCP is working:
show dhcp server binding routing-instance SACHIN-VR
show dhcp server statistics routing-instance SACHIN-VR
For example:
root@SRX240-HM-2# run show dhcp server binding routing-instance SACHIN-VR

IP address Session Id Hardware address Expires State Interface
6.6.6.66 30 00:0c:29:83:a1:14 86301 BOUND ge-0/0/15.0

[edit]
root@SRX240-HM-2# ...show dhcp server statistics routing-instance SACHIN-VR
Packets dropped:
Total 45
dhcp-service total 45

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
Related Links: