[CLUE-Tech] Getting the IP

Jim Ockers ockers at ockers.net
Sat Aug 23 11:39:09 MDT 2003


Roger:

> On machine B I do `ping dhcppc1` and get "unknown host."
> That's saying DNS doesn't know about it.  I don't know
> that there should be a connection between DHCP and DNS
> anyway.

I agree.

> In the real setup (which is the school lab), each machine
> would use DHCP but it would provide a name relating to
> the physical position of the student station in the
> lab, such as phs-501 for a machine name.  But I don't
> think that makes any difference for my question.

So you are setting the hostname of the computer to be some
name associated with the physical location of the computer,
correct?

> So how do I find out the IP address acquired with DHCP
> of machine A from machine B?

Your best bet is to try to use the DNS.  BIND now supports
DNS updates from hosts or perhaps an "active directory"
type server.

Unfortunately most of the time the Linux DHCP clients do
not try to do any DNS updates when they obtain a DHCP lease.
In the case of Windows clients, there is usually an option
in Windows 2000 and later to update the DNS with the computer
name.

With dhcpcd you could try the -h hostname option or the
-I clientID options.  Your DHCP server would need to be tied
into the DNS server using the afore-mentioned DNS updates
function.

If you did things this way, the DHCP client would notify the
DHCP server of its clientID or hostname or something, after
it gets a lease (or perhaps during the lease negotiation).
Then the DHCP server would notify the DNS server (using the
allow-update function) of the client name and IP address.

Then the DNS server would update the DNS zones (forward and
reverse) to reflect the new client hostname and IP address.
If you use Windows 2000 server for your DNS server and DHCP
server, this stuff is all done automatically for you.

It can also be done on a Linux server but requires some
dedication.  You will probably need the newest DHCP server
software (or maybe even a commercial one).  The version of
BIND that ships with RH72 will support DNS updates.  Bear
in mind that I haven't tried this myself, but I've seen it 
done and I know it works with Windows because this is how
it is set up at work.

Hope this helps,
Jim

-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list