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

Re: Resolving hostnames using DHCP




On Sunday, April 6, 2003, at 06:34  pm, Carlos Sousa wrote:

On Sun, 6 Apr 2003 16:10:45 +0000 Clive Menzies wrote:
Hi Reaz

I've got the nameservers in resolv.conf and so resolving public IP's
is fine.  It's the hosts on the local network that don't resolve.  I
tried including the DHCP server's  IP address as a name server but
that gave some strange errors and didn't help.

Desperate people do the strangest things... :)
Yep - desperate and a novice in a complicated world ;-)

I've also got the nameservers referred to in dhcpd.conf.

Cool, then your client machines are able to resolve external hostnames,
without having to specify any nameservers by hand on each of them.
Glad I got that right ;-)

I'm sure I'm missing something obvious ;-)

Same problem here.

Instead of messing with bind's dynamic updates, I made a bash script
that parses the dhcp server's log file for the host names and IP
addresses of its clients, then adds that information to /etc/hosts as
<ip> <hostname> pairs, one per line.

Cron runs the script every few minutes (though that's probably a little
paranoid since DHCP-given IPs, in my experience, tend to stick to their
machines), and I never had any trouble accessing the 20-odd machines in
my network since.

Just be *very careful* when automatically editing your /etc/hosts, make
sure you have a backup of it handy.
From another reply I've sent, you'll see that I don't actually need to resolve these names - it was ignorance on my part and thinking from a windows networking perspective (about which I also know very little) that made me think I did. Making a "bash script which parses....." is way beyond my current state of competence so I think I will leave it for now. Thanks for the input though.

Regards

Clive
____________________________
Who says middle America supports this act of aggression in the Middle East?:
http://www.alternet.org/story.html?StoryID=15453

What is it like to be an Iraqi in Baghdad?
http://www.dear_raed.blogspot.com/

Clive Menzies & Associates Limited
strategies for business
http://www.clivemenzies.co.uk
75 Priory Road, London N8 8LR
d/l: 020 8348 0996
fax: 087 0705 2066



Reply to: