DHCP fixed-address

Stefan Baltus stefan at xo.nl
Thu Aug 15 18:19:17 UTC 2002


Hello all,

This will be a somewhat peculiar post, as it is compiled of three emails
that Ted Lemon and I exchanged. Ted asked me to post it onto the list, for
other people's benefit. 

A little background information:

For a dsl network, we are setting up a DHCP server. DHCP requests from the
client behind the DSL modem are bridged to the aggregator and are relayed
to our DHCP server, while the aggregator (being a relay agent) adds an
option 82 to the DHCP packet. It is, based on the value of option 82, which
is unique per DSL line, that we want an single, fixed IP address to be 
assigned. 

The mail I sent to Ted, and our replies:

Stefan wrote:

> We're working out a dhcp configuration. Can you tell me if the following
> works:
> 
> host sl111111 {
>         option agent.remote-id 1:1:1:1;
>         fixed-address 195.18.94.2;
> }
>
> We'd like to assign fixed IP's based on the agent.remote-id instead of
> the mac address. If the above wouldn't work, can you tell me if it
> would be feasible to hack the dhcpd to make it work?

Ted replied:

> You can't assign fixed addresses this way, because remote-id is not unique
> - every client on that relay agent will get the same IP address.   This may
> be what you want, but it's not what RFC2131 wants, so the ISC server can't
> do it.   You can probably hack the ISC server to do this for your own
> personal use, but I warn you that if you do, it will create massive
> headaches for you, and you will probably have a lot of trouble debugging
> the problems that result.
> 
> What you really want to do is hack the ISC server to allow the
> configuration to *suggest* an IP address, which the server will assign if
> it is available.   This shouldn't be very difficult, and it has the virtue
> that the server will still be assigning the lease to a specific client, in
> accordance with rfc2131, but as long as things are configured as you expect,
>  you will get exactly the behavior you want.   If the address isn't
> available, you should get a nice message in the log, so you can debug
> problems easily.

Stefan replied:

> I don't see exactly what you mean here. Who would suggest the IP address?
> The client?

Ted replied:

> The configuration file.   Instead of fixed-address, you'd write
> "suggested-address".   This would be handled like the
> dhcp-requested-address option that the client sends (see rfc2131/2132 for
> details).   If the address wasn't available, the client could either get
> some other address, or get no address, depending on how you configured the
> server.

So far our conversation.

I have a few questions left:

Isn't there a way to do my fixed-ip-assignment-by-agent.remoteid by creating
some smart configfile for the dhcp server?

Why wasn't the suggested-address option not built in? Or is it?

Is there anyone else who had the same 'problem' and if yes, how was this
solved?

I was also thinking of 'abusing' the mac-address hash table and use
the agent.remoteid value instead. That would not leave me with a compliant
DHCP server ofcourse, but I wouldn't care much as this is the only task the
DHCP server must do. 

I'd still prefer a configuration-type solution rather than a programming-type
solution.

Kind regards,

Stefan

-- 
Stefan Baltus <stefan at xo.nl>                XO Communications B.V.
Manager Engineering                         Televisieweg 2
telefoon: +31 36 5462400                    1322 AC  Almere
fax: +31 36 5462424                         The Netherlands


More information about the dhcp-hackers mailing list