Discussion:
dhcpd.conf : dynamic ddns-domainname option
Clément Jeanne
2006-07-28 07:54:02 UTC
Permalink
Hi,
Does anybody know where to find documentation about dhcpd.conf
functionalities like "pick", "match", "pick-first-value", etc. ?
I expect that such options is the key to solve my problem :
extract from FQDN option 81 the domain name to use for ddns-domainname.
I want the client not to be registered on the new domain it connects to,
but on it's legacy domain. That is why I want to pick the domainname the
client gives on the DHCP Discover packet, if not It's registered in the
domain specified in "option domain-name"

Regards

Clément
Shane Kerr
2006-07-28 09:03:00 UTC
Permalink
Clément,
Post by Clément Jeanne
Does anybody know where to find documentation about dhcpd.conf
functionalities like "pick", "match", "pick-first-value", etc. ?
extract from FQDN option 81 the domain name to use for ddns-domainname.
I want the client not to be registered on the new domain it connects to,
but on it's legacy domain. That is why I want to pick the domainname the
client gives on the DHCP Discover packet, if not It's registered in the
domain specified in "option domain-name"
"pick-first-value" is documented in the dhcp-eval(5) man page. "pick" is an
alias for "pick-first-value" (although I don't think that is documented anywhere).

"match" is documented in the dhcpd.conf(5) man page. There are examples in the
CLIENT CLASSING or SUBCLASSES sections.

I don't know if these will actually help you solve your problem, but hopefully so!

- --
Shane
Clément Jeanne
2006-07-28 14:27:23 UTC
Permalink
Thanks,
I did not suspect the existence of dhcp-eval(5) because none of the man in my distro where pointing at it.
I read it, but didn't get what I need.

Here is what I want to do :

I get the fqdn from option 81 like machineA.subdomain4.domain6

I want to extract subdomain4.domain6 to put it in ddns-domainname (ddns-domainname=suffix (???))
and by the way machineA in ddns-hostname

I guess that the first "." is the key to achieve that but there is no function to do the job

May be there is an easiest way to proceed

Any ideas?

Regards


Hash: SHA1

Clément,
Post by Clément Jeanne
Does anybody know where to find documentation about dhcpd.conf
functionalities like "pick", "match", "pick-first-value", etc. ?
extract from FQDN option 81 the domain name to use for ddns-domainname.
I want the client not to be registered on the new domain it connects to,
but on it's legacy domain. That is why I want to pick the domainname the
client gives on the DHCP Discover packet, if not It's registered in the
domain specified in "option domain-name"
"pick-first-value" is documented in the dhcp-eval(5) man page. "pick" is an
alias for "pick-first-value" (although I don't think that is documented anywhere).

"match" is documented in the dhcpd.conf(5) man page. There are examples in the
CLIENT CLASSING or SUBCLASSES sections.

I don't know if these will actually help you solve your problem, but hopefully so!


- --
Shane
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEydLEMsfZxBO4kbQRAjcSAJ4s0tZcOo9QlI1nTwMOGmdNGtORmgCgkQNk
uBfY9FIqeYCpyPkrxF+xXZU=
=hHhY
-----END PGP SIGNATURE-----
--
Clément JEANNE
TEAMLOG Ouest

Agence de Rennes
Rennes Atalante Beaulieu
12A rue Patis Tatelin
35700 RENNES
Tel : 0299125365
e-mail : ***@teamlog.com
David W. Hankins
2006-07-28 15:47:44 UTC
Permalink
Post by Clément Jeanne
I get the fqdn from option 81 like machineA.subdomain4.domain6
I want to extract subdomain4.domain6 to put it in ddns-domainname (ddns-domainname=suffix (???))
and by the way machineA in ddns-hostname
This is dhcpd's default configuration for these values:

option server.ddns-hostname = \n\
pick (option fqdn.hostname, option host-name); \n\
option server.ddns-domainname = config-option domain-name; \n\
option server.ddns-ttl = encode-int(lease-time / 2, 32); \n\
option server.ddns-rev-domainname = \"in-addr.arpa.\";";

So, logically, to get the behaviour you just described, you would
configure the following in dhcpd.conf (over-riding the above):

option server.ddns-hostname = option fqdn.hostname;
option server.ddns-domainname = option fqdn.domainname;
--
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
Clément Jeanne
2006-07-28 16:34:37 UTC
Permalink
Post by David W. Hankins
Post by Clément Jeanne
I get the fqdn from option 81 like machineA.subdomain4.domain6
I want to extract subdomain4.domain6 to put it in ddns-domainname (ddns-domainname=suffix (???))
and by the way machineA in ddns-hostname
option server.ddns-hostname = \n\
pick (option fqdn.hostname, option host-name); \n\
option server.ddns-domainname = config-option domain-name; \n\
option server.ddns-ttl = encode-int(lease-time / 2, 32); \n\
option server.ddns-rev-domainname = \"in-addr.arpa.\";";
So, logically, to get the behaviour you just described, you would
option server.ddns-hostname = option fqdn.hostname;
option server.ddns-domainname = option fqdn.domainname;
Oh, great !!!
It's working as I want.
You saved me in putting an end to long hours searching.

Thanks a lot

Loading...