dns update from dhcp server ok for windows clients, not ok for linux (dhclient) clients

Discussion in 'Linux Networking' started by Tom Van Overbeke, Aug 7, 2003.

  1. Hi,

    The subjects says it all (almost):

    we have a linux dhcp server (dhcp-3.0pl1-26) happily distributing ip
    adresses, and updating our dns server (on a separate linux server, running
    bind bind-9.2.1-1.7x.2).

    on our windows desktops, we have no problems: they request an ip adress,
    obtain it, and via the dhcp server the dns gets updated.

    however, i needed to configure a network interface of a linux machine via
    dhcp, and although the ip adress is acquired and the network interface is
    brought up, somehow the dns does not get updated.

    we only allow dns updates from the dhcp server, and i am surprised why there
    would be a difference between a linux machine using dhclient to request an
    ip adress, and a windows machine.

    the /var/log/messages shows no errors from either dns or bind, but a clue
    could be that the DHCPREQUEST doesn't seem to send the machine's hostname,
    whereas the windows client do seem to send it.

    look at these log entries:

    this is a windows machine

    Aug 6 14:22:22 frontend dhcpd: DHCPREQUEST for from
    00:90:27:23:21:88 (atlantis) via eth0
    Aug 6 14:22:22 frontend dhcpd: DHCPACK on to 00:90:27:23:21:88
    (atlantis) via eth0

    and this is from the linux machine

    Aug 6 14:35:46 frontend dhcpd: DHCPREQUEST for (
    from 00:0b:db:d5:5c:7e via eth0
    Aug 6 14:35:46 frontend dhcpd: DHCPACK on to 00:0b:db:d5:5c:7e
    via eth0

    as you can see, the hostname of the linux machine is not displayed after the
    mac adress, whereas the windows machine does show it.

    Any ideas on how to solve this annoying problem ?


    Tom Van Overbeke, Aug 7, 2003
    1. Advertisements

  2. Tom Van Overbeke

    Jeff Guest

    You need to use the "-h" flag with hostname on the dhcpcd_eth0 line in
    /etc/conf.d/net. Like this:

    dhcpcd_eth0="-N -R -h mylinuxboxname.fully.qualified.com"

    This has to be set on each linux machine requesting dhcp service. It
    passes its name request along to dhcpd, which in tern passes it along to

    Jeff, Aug 7, 2003
    1. Advertisements

  3. Tom Van Overbeke

    /dev/rob0 Guest

    So, send the hostname!
    The man pages are not that good IMHO, and on my distro one of the
    crucial ones is missing for some reason. I think dhclient.conf(5) and
    dhcp-options(5) pages may have the syntax you need.

    I think it's more straightforward with dhcpcd(8) if you have that. You
    can put the hostname on the command line:
    dhcpcd -h hostname [-options] interface
    /dev/rob0, Aug 7, 2003
  4. Tom Van Overbeke

    /dev/rob0 Guest

    Please trim your excess quotes!

    [but nothing to indicate what distribution this Linux client uses]
    What is /etc/conf.d? Whilst deceptive coding is always possible, one
    rarely sees it in Linux distributions' shell scripts. So one might
    reason safely that a "dhcpcd_eth0" variable would apply to the use of
    dhcpcd on eth0.

    Do you know what distro Tom uses? It wasn't mentioned nor even hinted
    AFAICT in his post. Do you know what dhclient is?
    What if the client has no /etc/conf.d? What if the client wants a DHCP-
    provided ntp.conf and/or resolv.conf?
    /dev/rob0, Aug 7, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.