Knowledge Search


×
 

[SRX] Example - Configuring SRX with a DHCP server in multiple routing instances

  [KB29401] Show Article Properties


Summary:

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.

Symptoms:

Starting with Junos OS 12.1 and later, the DHCP process has been modified to an enhanced process called JDHCP.

Note: The dhcpd daemon and the jdhcp daemon cannot run on the device at the same time. Therefore you must choose to run either one of the daemons at a time.
Cause:

Either the dhcpd daemon or the jdhcp daemon must run on the device; you cannot run both at the same time.

Solution:

Topology

Virtual router (VR):

         ge-0/0/1(routing-instance)----------Client

Default routing instance:

         fe-0/0/6(inet table)-------------Client

Configuration

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:

For virtual router:

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

For default routing instance:

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


Verification

Virtual router:

Use the following commands to verify if JDHCP is working:
show dhcp server binding routing-instance TEST-VR
show dhcp server statistics routing-instance TEST-VR

Default routing instance:

show dhcp server binding
show dhcp server statistics



Related Links: