Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX] Configuring JDHCP on a VLAN in a routing instance

0

0

Article ID: KB26899 KB Last Updated: 30 Jul 2020Version: 3.0
Summary:

This article provides information on how to configure an SRX device (running Junos OS release 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 VLAN and the VLAN is a part of a routing instance.

 

Symptoms:

Starting with Junos OS release 12.x, the DHCP process has been modified and the new process is JDHCP. Even though both processes run on the device, it is recommended to use JDHCP and not DHCP.

 

Solution:

Setup

SRX(ge-0/0/15)---------client
  1. Create a virtual router.

set routing-instances JDHCP-VR instance-type virtual-router
  1. Configure the Ethernet switching.

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 vlans VLAN1 vlan-id 10
set vlans VLAN1 l3-interface vlan.1
  1. Assign an interface to the virtual router.

set routing-instances JDHCP-VR interface vlan.1
  1. Configure the DHCP server.

set routing-instances JDHCP-VR system services dhcp-local-server group JDHCP-GROUP interface vlan.1
set routing-instances JDHCP-VR access address-assignment pool JDHCPVR-POOL family inet network 6.6.6.0/24
set routing-instances JDHCP-VR access address-assignment pool JDHCPVR-POOL family inet range JDHCPVR-RANGE low 6.6.6.66
set routing-instances JDHCP-VR access address-assignment pool JDHCPVR-POOL family inet range JDHCPVR-RANGE high 6.6.6.67

Verification

root@SRX240-HM-2# run show dhcp server binding routing-instance JDHCP-VR

IP address Session Id Hardware address Expires State Interface
6.6.6.66 30 00:0c:29:83:a1:14 86301 BOUND vlan.1

[edit]
root@SRX240-HM-2# run show dhcp server statistics routing-instance JDHCP-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
 

NOTES

The following configurations leverage JDHCP:

set routing-instances JDHCP-VR system services dhcp-local-server group JDHCP-GROUP interface vlan.1
set routing-instances JDHCP-VR access address-assignment pool JDHCPVR-POOL family inet network 6.6.6.0/24

In Junos OS 12.1x and later releases, DHCP configurations leveraging JDHCPD would look like:

root# run show system processes extensive | match dhcp
1281 root 1 96 0 50280K 12060K select 19:38 0.00% jdhcpd

In earlier versions, DHCP configurations leveraging DHCPD would look like:

set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.2
set system services dhcp pool 192.168.1.0/24 address-range high 192.168.1.254
set system services dhcp pool 192.168.1.0/24 router 192.168.1.1

The DHCPD process with the above configuration would show as:

root# run show system processes extensive | grep dhcp
57506 root 1 96 0 8884K 3500K select 0:00 0.00% dhcpd

 

Modification History:

2020/07/30: Article reviewed for accuracy; no changes required; article valid and relevant

 

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search