Using Class to have ip address on unknown network segments

Simon Hobson dhcp1 at
Fri Feb 20 10:06:14 UTC 2015

Teva A-T <tevaat at> wrote:

> I'm trying to use class to provide ip address to LTE customers which is on a network segment unknown by the dhcpd server.

That's stating how you are trying to solve the problem, not stating the problem you are trying to solve. So we have to reverse engineer the problem from your description of how you are trying to solve it.

I believe your problem is :
You have a relay agent which presents as it's GI Addr, but you want to allocate client IPs from the subnet. Is that correct, or is there more to it ?

If that's all it is, then you just need a shared network - which I see you are half way to defining :

shared-network lte-cust {

    subnet .... {

    subnet netmask {
      pool ....

The trick here is to define the subnet containing the relay agent GI Addr, but make it a shared network with the client subnet. The DHCP server treats the subnets as "equivalent" in terms of what addresses it can give to which devices - but since your leave the first subnet empty, there are no addresses to allocate in it.

However, this will *not* work if the same relay agent is forwarding from multiple client subnets using one GI Addr.
If that were the case, then I'd suggest the relay agent is "broken". You'd have to work around that by putting all the client subnets into one big shared network - and then use classing (eg by using Option 82) to restrict each client to the pool/subnet to which it is actually connected.

It would be better to "fix" the relay agent to use an IP address in the subnet it's relaying requests for !

More information about the dhcp-users mailing list