[NTLUG:Discuss] OpenSSH - Newbie Question
Paul M Foster
paulf at quillandmouse.com
Thu Jul 6 00:20:43 CDT 2006
Bobby Sanders wrote:
> On Wed, 2006-07-05 at 19:35 -0500, Terry Henderson wrote:
>> Wouldn't it be simplier to just use static IPs?
>
> Well this appears to be the consensus of the group. The question now
> is, can it be done? Sorta' like - Why would you even want to climb that
> mountain? :)
A couple of ways to do this. First, tell each machine what its static IP
is. Under Debian, this is a matter of editing /etc/network/interfaces.
In that file, you specify that instead of DHCP, you want a static IP,
and on a different line, what that address is. Probably different on
different distros. The point is, when X machine comes up, you want it to
believe that its static IP is the one you gave it. After having done
this on all the machines (and making a written list), go back to the
/etc/hosts file on each machine and add a line like:
192.168.0.5 mymachine
for each machine. There is also a hosts file in Windows which is used
for the same purpose. Each machine, when trying to resolve a machine
name into an IP, will search the hosts file, which has your list of
static IPs for all the machines. A sort of poor man's DNS.
The disadvantage of this scheme is that any changes to the network
(adding or removing machines) means editing the hosts file on every
machine. However, if you *don't* do it this way, you're stuck with
creating a central server with bind running on it, which is queried by
all machines to get the IPs of the machines. From what I understand,
some work has been done in the last several years on combining DHCP with
DNS (bind) so they work together. I've never set up a bind server, so I
don't know much about it. Other than that it is a skill in itself. If
you just want something quick and dirty, go the hosts file route.
Paul
--
Paul M. Foster
More information about the Discuss
mailing list