SRX Services Gateway
Highlighted
SRX Services Gateway

Two disjoint DHCP Pools on one interface supported?

‎12-08-2014 09:28 AM

To aid in some transition work we need to do, I'd like to combine two DHCP pools into one VLAN interface. Is there a way I can do that? Here's the relevant portion of my test unit's config. It seems to only assign from the pool that matches the primary address on the vlan.0 interface.

Attachments

4 REPLIES 4
Highlighted
SRX Services Gateway

Re: Two disjoint DHCP Pools on one interface supported?

‎02-09-2015 04:20 PM

bump. Anyone have any ideas?

Highlighted
SRX Services Gateway

Re: Two disjoint DHCP Pools on one interface supported?

‎02-10-2015 02:35 AM

Well, for one thing your network statement for your second pool doesn't match the actual network, but more importantly, I really don't see how the DHCP server is supposed to differentiate DHCP requests received in the same broadcast domain from one another.  DHCP discover packets would theoretically arive from a client, and the server would then hand out which address?  Also, why are you using DHCP with /30 addresses?  I am a bit confused by what the goal is here.

JNCIE-SEC #127
JNCIE-ENT #489
Highlighted
SRX Services Gateway

Re: Two disjoint DHCP Pools on one interface supported?

‎02-11-2015 01:20 PM

 In all candor, what you really need to do is look into an IPAM Solution like Server 2012 IPAM or similar.

 

The problem here is much more fundemental than just a configuration.  The issue here is where to forward the DHCP Broadcast packets to; if you configure 2 pools, how does the DHCP Server differentiate which pool to assign the address from? 

 

You've got two options there; configure your devices with a DHCP option code for their requests, or configure it by MAC.

 

You can tell JunOs, if memory serves, to assign IP's based on MAC.  So from there you'd configure 2 pools and 2 IP's on an interface, and the static MAC address entries.  Not sure if that deployment scenario would work because really, DHCP and NIC configuration is better done by something that can understand the client configuration better, e.g., windows server.  You'd also probably fail the commit check.

 

One idea does come to mind: If you can get the subnet masks for the ranges to match, you can try configuring the ip range as a supernet then excluding everything that you don't want to assign out of that.  You should be able to explicitly configure a subnet mask that would be assigned to both networks.  That one all depends on the error checking available in JunOS, as it would be a bad idea conceptually to do.

Highlighted
SRX Services Gateway

Re: Two disjoint DHCP Pools on one interface supported?

‎02-16-2015 08:36 AM

Yes, there is an inconsistency in the second network statement. I was trying to anonymise my config and missed that one. The reason for the /30s was simply as a proof of concept. I'm handing out public IP addresses via DHCP and we don't want to be wasteful with this limited resource. Say we have a /25 on one network segment and we add a couple of more customers. I don't want to have to readdress everyone into a /24 since our utiliation would be just slightly over 50% at this point. I'd like to add a /29 so we're not wasting IPs.

Feedback