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

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

Post by Tom Van Overbek » Fri, 08 Aug 2003 17:20:08



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 172.21.3.228 from
00:90:27:23:21:88 (atlantis) via eth0
Aug  6 14:22:22 frontend dhcpd: DHCPACK on 172.21.3.228 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 172.21.3.250 (172.21.3.2)
from 00:0b:db:d5:5c:7e via eth0
Aug  6 14:35:46 frontend dhcpd: DHCPACK on 172.21.3.250 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 ?

thanks,

Tom.

 
 
 

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

Post by Jeff » Fri, 08 Aug 2003 23:40:57



> 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 172.21.3.228 from
> 00:90:27:23:21:88 (atlantis) via eth0
> Aug  6 14:22:22 frontend dhcpd: DHCPACK on 172.21.3.228 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 172.21.3.250 (172.21.3.2)
> from 00:0b:db:d5:5c:7e via eth0
> Aug  6 14:35:46 frontend dhcpd: DHCPACK on 172.21.3.250 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 ?

> thanks,

> Tom.

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
bind.

-Jeff

 
 
 

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

Post by /dev/rob » Sat, 09 Aug 2003 00:04:17




Quote:> 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.

So, send the hostname!

Quote:> Any ideas on how to solve this annoying problem ?

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
--

  or put "not-spam" or "/dev/rob0" in Subject header to reply

 
 
 

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

Post by /dev/rob » Sat, 09 Aug 2003 00:24:01


Please trim your excess quotes!



>> 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.

   [but nothing to indicate what distribution this Linux client uses]

Quote:

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

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?

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

> This has to be set on each linux machine requesting dhcp service. It

What if the client has no /etc/conf.d? What if the client wants a DHCP-
provided ntp.conf and/or resolv.conf?
--

  or put "not-spam" or "/dev/rob0" in Subject header to reply
 
 
 

1. Redhat 9.0 dhcp client & windows 2003 dhcp server: dynamic dns update

Hi,

I'm trying to add some linux (redhat 9.0, kernel 2.4.20-8) boxes to our
Windows 2003 domain.
The dhcp server is running fine, and the linux clients are getting leases.
However they are not
getting added to the dns forward lookup zone.

The dhcp server is set up to register *all* client leases in the dns, even
for those who do not request so.

The dns server is set up to allow both secure & insecure updates.

I've tried googling for a solution and have tried:
1) Adding DHCP_HOSTNAME & HOSTNAME to the /etc/sysconfig/network
configuration file.
2) Modifying the /etc/sysconfig/network-scripts/ifup script replacing
<snip>
 if [ -n "${DYNCONFIG}" ]; then
        PUMPARGS=$PUMPARGS
        DHCPCDARGS="$DHCPCDARGS -n"
        if [ -n "${DHCP_HOSTNAME}" ]; then
           PUMPARGS="-h ${DHCP_HOSTNAME}"
           DHCPCDARGS="-h ${DHCP_HOSTNAME}"
</snip>
with
<snip>
 if [ -n "${DYNCONFIG}" ]; then
        PUMPARGS=$PUMPARGS
        DHCPCDARGS="$DHCPCDARGS -n"
        if [ -n "${DHCP_HOSTNAME}" ]; then
           PUMPARGS="--win-client-ident -h ${DHCP_HOSTNAME}"
           DHCPCDARGS="-h ${DHCP_HOSTNAME}"
</snip>
3) Using redhats GUI network configuration tool to set the values  - which I
believe more or less
    amounts to 1).

Still no luck. If anyone has any suggestions I would be very thankful to
hear from them.

Regards

Mads Ravn

2. How to write to an MSDOS partition

3. Dynamic DNS not working with Solaris DHCP/DNS server and win clients

4. Newbie sysadmin nameserver failure question

5. Console not displaying extended ascii characters properly

6. Server Push (Linux: ok, Solaris 2.5: not ok)

7. *sources* for perl 4.036 on Linux anywere?

8. Printcap OK, Postscript OK, together NOT OK - HELP!

9. DNS Problems on RedHat 8.0: Linux client, Windows DHCP server

10. Configure Red Hat 8 client to requeset DHCP server updates DNS entry

11. X windows set up 'is this OK screen' not ok

12. Linux DNS Client Against Windows 2000 DNS Server