[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: DHCP in a Windows 2000 domain - udhcpc



Ajit Warrier wrote:
Hi Rick,

As far as I can make out from what you say, the DHCP
server will issue the hostname to the DHCP client and
if the DNS is Dynamic and properly configured, this
hostname should get registered with it. I know that
when a Windows client gets its information from the
DHCP server, it is properly entered into the DNS
server as well, so we can assume that the DHCP and the
DDNS are properly set up.

Probably. As I said before, I'm not a Windows guy. They may have hostnames preloaded into the DNS, too. I'd be curious to see if a dig against the DNS works for the hostname BEFORE the client actually gets its lease.

This means that the hostname that the DHCP server
issues to the DHCP client should get registered in the
DNS server as well whether that is the name the client
requested for or not. Ok, so far?

Yup, if DDNS is set up properly.


Well, I am getting an IP from the DHCP server but the
hostname entry on the DHCP server is blank and there
is no entry for this IP in the DNS server. When I do
"hostname" on the DHCP client, it returns the hostname
that I have set, of course and it does _not_ resolve
it to the IP (which is expected since this name has
not registered with the DNS).

You don't have the "-H" option set on the dhcpcd client. By default, dhcpcd will _not_ set the hostname to the one sent by the DHCP server.

I guess what I asking for boils down to this -
1. How can I find out what name is being issued to the
DHCP client?

You can do a tcpdump off the ethernet port to see the dialog between the DHCP server and client. Something like:

tcpdump -a -s 1024

should show it.

2. Can I change the hostname to the one that has been
issued to the DHCP client, automatically, as soon as
the client finds out what its hostname is?

Yes, add this to your /etc/sysconfig/network-scripts/ifcfg-eth0 file:


DHCPCDARGS="-H"

That forces dhcpcd to accept the hostname from the server, assuming
you're using dhcpcd.  If you use dhclient (RH8.0/9), then you need to
make sure the "require=host-name" is in the /etc/dhclient.conf file.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens vitalstream com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-                       When in doubt, mumble.                       -
----------------------------------------------------------------------





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]