Re: How do I configure domain names for my locally-networked computers?



This looks like exactly the sort of function I am looking for. But I'm
curious: if not by IP address, how does dnsmasq map names to computers? By
MAC address?

The DHCP protocol allows the client to send some additional info, such as
its own hostname (not DNS name, just some random name you decided to give
to the machine). The DHCP server is free to ignore it, but can use it just
as well. E.g. it can be used to give out "static" IPs, or it can be used
(as is done by dnsmasq) to automatically build a DNS map.

Of course, if two machines connect with the same hostname, you may not
always get the result you want. I think the behavior is tailored to the
case where the same machine sometimes connects via different interfaces (so
the mac address may change, but dnsmasq assumes it's really the same
machine).

Note that the dhcp client that comes by default under Debian does not send
a hostname by default and doesn't even seem to provide a way to tell it to
"send the machine's hostname", so instead you have to manually add to the
/etc/dhclient.conf the machine's name with

send host-name "<myhostname>";


-- Stefan
.



Relevant Pages

  • Re: Local Lan DNS Problems
    ... > I've only added the two entries below to the ipcop hosts file as I ... > understand, correct me if wrong, that as theothers use DHCP then they ... Dnsmasq cannot assume that the two requests are from the ... without a client ID.) ...
    (comp.os.linux.networking)
  • Re: Local Lan DNS Problems
    ... Could there be a problem with the IPCop DNS? ... > So I'm looking at this as a straight dnsmasq issue. ... > There seem to be some dhcp fixes. ... > since the DHCP server gets the hostname from DNS which in this case is ...
    (comp.os.linux.networking)
  • Re: Local Lan DNS Problems
    ... Could there be a problem with the IPCop DNS? ... So I'm looking at this as a straight dnsmasq issue. ... There seem to be some dhcp fixes. ... -- especially if the client machines have seen previous duty with other ...
    (comp.os.linux.networking)
  • Re: send a host name with DHCP request?
    ... > where you set the computer to use DHCP. ... The dhcp client ID is ... something different than the dhcp hostname. ... MacOS send a host-name parameter in the dhcp option 12 field with a dhcp ...
    (comp.sys.mac.system)
  • Re: Kernel-level IP autoconfiguration and nodename
    ... I'm unable to get the client machine get its hostname from ... the DHCP server. ... What is really strange is that the kernel itself is ...
    (Linux-Kernel)