FW: [CLUE-Tech] DHCP and DNS

David Anselmi anselmi at americanisp.net
Sat May 24 18:37:18 MDT 2003


Joe Daily wrote:
> You have a couple of ways of doing this.
> 
> First, to find the ips of your machines. You have two options that I see, 
> 
> 	the first one is to ping the broadcast and grep the result for the
> machine name. (There are some options in ping to have it return the
> machine name). 

Interesting.  Note that /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 
has to contain a 0 to get a response to the ping.

But I think that doesn't help with names.  The whole problem is we don't 
know the name/address mapping, so there is nowhere for ping to look it 
up.  (When ping et. al. show names rather than numbers they do reverse 
lookups in DNS.  Reverse lookups never seem to use /etc/hosts.)

> 	Or set up a couple of bash scripts to have the ips emailed to you
> can 	then another script to have it clear all but the latest emails. (I
> do 	it this way but the scripts are built for various windows and Linux
> boxes)

I didn't mention this because it seems like too much work.  But it would 
be easier to mirror one /etc/hosts file to all the machines.  Debian has 
a nice system at http://www.debian.org/mirror/push_mirroring.  The 
problem you're trying to solve is essentially the same as the one WINS 
solves.  So probably you want a similar solution (although multicasting 
might be a cool thing to throw in).

> 	Of course you can always find the dhcp server and replace it with a
> Linux box and then in the dhcp.conf you can have the server dish out 	the
> same ip to the lab boxes based on its mac address)

What do you mean by "replace"?  Multiple DHCP servers on the same subnet 
seems like a bad idea unless you use your own address space.  But if you 
have that you don't need DHCP.  Version 3 of dhcpd (from ISC) supports 
some sort of failover, but before that you couldn't have two cooperating 
servers, much less a rogue server and expect it to work.  It shouldn't 
be hard to modify dhcpd to only give out unused IPs but I don't think it 
does that yet.

Dave




More information about the clue-tech mailing list