Concerns about DNS & DHCP integration

Hi everybody,

I understand that my question would not be new, but I didn’t see somewhere in the mailing list interface where to find for something.
I’m using unbound to serve DNS requests, and isc-dhcp-server to serve DHCP requests.
I have three different subnets, and have some guys moving from floor to floor, then receiving different IP addresses depending on the floor (each floor receive IP addresses from a different IP address range).
Sometimes, those users need to access their machines using VNC or RDP, depending on their OS.
As far as I’m concerned, I understand I need to use some technique to allor Unbound to dynamically register the new IP address, just to let those users connect to their PCs using DNS records, and not IP addresses, because they don’t really know which IP address they do have.
Could you please let me know if there is some note, or something you can point just to have some ideas about if there is a chance to do that, and how to?
Thanks a lot in advance for your time and attention!
Best regards,

Hernan Saltiel via Unbound-users:

just to let those users connect to their PCs using DNS records, and not IP addresses,

one possibility would be a dyndns service.

Andreas

Hernan Saltiel via Unbound-users:

just to let those users connect to their PCs using DNS records, and not IP

addresses,

one possibility would be a dyndns service.

Hi Andreas,
I was thinking about something that would be internally available. Don't
know if unbound could provide such a service based on some config.
Thanks, and best regards,

HeCSa.

Unbound is a resolver, and while it has facilities for serving authoritative data, your scenario seems to rather call for a proper authoritative DNS server with support for dynamic DNS updates. The "dyndns" term is somewhat ambiguous, as it can refer both to these online DNS redirection services; but it also refers to standards-based dynamic DNS updates, defined in RFC 2136.

You might want to take a look at RFC 2136 and the implementations offered by some authoritative implementations, accepting updates from your ISC DHCP server.

sven

Hi Hernan,

Hernan Saltiel via Unbound-users:

just to let those users connect to their PCs using DNS records, and
not IP addresses,

one possibility would be a dyndns service.

Hi Andreas, I was thinking about something that would be internally
available. Don't know if unbound could provide such a service based
on some config.

You could make a script to do things:
unbound-control local_data_remove <name>
unbound-control local_data <name> A <ip4 address>
echo 'local-data: "<name> A <ip4address"' > somedir/<name>.loc

Unbound-control instructs the running daemon what to do; the .loc
files are meant for server restarts, and you include them in unbound.con
f:
server:
include: "somedir/*.loc"

An in dhcpd.conf this looks like this (from
http://jpmens.net/2011/07/06/execute-a-script-when-isc-dhcp-hands-out-a-
new-lease/):
on commit {
        set clip = binary-to-ascii(10, 8, ".", leased-address);
        set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)
);
        execute("/usr/local/sbin/dhcpevent", "commit", clip, clhw,
host-decl-name);
}
Which passes "commit" "192.0.2.1" "11:aa:bb:cc:dd:ee" "name"

You might check the ip address for IPv6 and then commit 'AAAA' records
instead. You can also load PTR records into unbound if you wish.

Best regards, Wouter

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Hernan,

>
>
>
>
> Hernan Saltiel via Unbound-users:
>
> just to let those users connect to their PCs using DNS records, and
> not IP addresses,
>
>
> one possibility would be a dyndns service.
>
>
> Hi Andreas, I was thinking about something that would be internally
> available. Don't know if unbound could provide such a service based
> on some config.

You could make a script to do things:
unbound-control local_data_remove <name>
unbound-control local_data <name> A <ip4 address>
echo 'local-data: "<name> A <ip4address"' > somedir/<name>.loc

Unbound-control instructs the running daemon what to do; the .loc
files are meant for server restarts, and you include them in unbound.con
f:
server:
include: "somedir/*.loc"

An in dhcpd.conf this looks like this (from
http://jpmens.net/2011/07/06/execute-a-script-when-isc-dhcp-hands-out-a-
new-lease/):
on commit {
        set clip = binary-to-ascii(10, 8, ".", leased-address);
        set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)
);
        execute("/usr/local/sbin/dhcpevent", "commit", clip, clhw,
host-decl-name);
}
Which passes "commit" "192.0.2.1" "11:aa:bb:cc:dd:ee" "name"

You might check the ip address for IPv6 and then commit 'AAAA' records
instead. You can also load PTR records into unbound if you wish.

Best regards, Wouter

Hi Wouter!
I'll give this a try!
Thanks, and best regards,

HeCSa.