Subject: Re: Easy to follow NAMED & SSHD....
To: Mark Benson , Mac 68k NetBSD <port-mac68k@netbsd.org>
From: Michael G. Schabert <mikeride@mac.com>
List: port-mac68k
Date: 12/31/2001 13:36:43
At 2:29 PM +0000 12/31/01, Mark Benson wrote:
>On Sunday, December 30, 2001, at 06:19 PM, Don Yuniskis wrote:
>
>The problem is that I have a desk with 4 computers on it. They all 
>have different IP addresses (obviously) and I communicate between 
>the m *alot* (most of the day) to share files, use SSH and FTP and 
>share the internet. I am getting monumentally hacked off with typing 
>in IP addresses and I keep forgetting which one belongs to which 
>machine. Names, on the other hand, would make them a lot easier to 
>talk to. I already mirror my ISP's DNS servers across the network 
>using an OS X program via my iBook (the only one with a 56k Modem 
>that works) so that isn't the problem.

Hmm, that sounds like a lot of bother for little benefit IMO, unless y
our ISP's dns is slow to respond to queries.

>  I'd love to do it just using the 'hosts' file but this is not an 
>ideal world. I cant find a way to predefine hosts in Windows XP,

someone else answered this one

>  I also know that OS X doesn't use 'hosts' unless int's in single user mode.

Not true. OSX uses NetInfo for its resolution. You can do the 
equivalent of a hosts file with entries in the netinfo database...but 
then you'd be doing the OSX machine separately from the rest. 
Alternatively, the NetInfo database contains a directive that tells 
the computer what lookup order to use. You just need to stick 
/etc/hosts in there.

>Add to that the fact I don't really want to leave an OS X box on 
>over night (I'd rather the hard disk in my LC burned out than the 
>one in my G3!) and you see where I'm coming from?

Why on earth would this be necessary if you used a hosts file on each 
machine? And why on earth would you have set up the iBook as the 
mirror to your ISP's DNS if you were trying to setup the LCIII as 
your name server? Do it only once and be done with it :P. If you can 
set something up on Linux or OSX, then it's the exact same thing 
under NetBSD. All of them use the Berkeley Internet Name Daemon, BIND.

>If I could setup a file on my LCIII that just told everything that 
>asked the hostname. I would but I thought NAMED did that. I dispare, 
>you guys can be so discouraging at times....
>
>I know your only trying to stop me getting into a mess but I like 
>playing around and getting something to work. Give me a line here!

Yes, BIND (named) does do that. The same way that it does what you 
have running on your OSX laptop. However, there are drawbacks.

>>Don't set up DNS if you don't know what you are doing since
>>mistakes there will just *increase* traffic on the 'net
>>with no positive results for you...
>
>I'm really not being insulting here but you guys can be a bit short 
>sighted to be honest, nearly everything you recommend is a specific 
>solution to Unix systems.

How's that??? I was using /etc/hosts-format files on my Mac SE, so I 
know that MacTCP supports them just fine. Others have shown that 
Windows has the same functionality. So where exactly are these 
"unix-only" things that we are suggesting?

>  I know it may be because that is what you know best an I admire 
>that (it's better than being Windows only ppl after all!) but I am 
>trying to do a cross platform solution here and most of the stuff 
>you suggest just won't work on other OSs.

Everything that's come out of my fingers works seamlessly 
X-platform...and will work *better* than a named solution.

>  The whole reason I want to set up a DNS is that I want it to be 
>able to tell ANY computer a name for itself or other computers.
>Everytime I ask you just put up a wall and say 'don't go there'.Well 
>my friend managed it in Linux so I can do it too. So tell me - is 
>there any info on it around or am I just going to go on asking until 
>I go blue?

I have my home network set up with /etc/hosts files  that assigns two 
shortcut names to each computer. 192.168.1.1 is my alpha, so its 
shortcut names are "prez" and "alpha". .2 is my Q840AV, so it gets 
"mac" and "quadra". .3 is an LC575 belonging to my daughter Veronica, 
so it gets "ronnie" and "lc". .4 is a PowerMac 7200/90, so it gets 
"power" and "ppc". "telnet mac:4000" is perfectly valid with this 
setup.

As I mentioned, the files for named will be written exactly the same, 
whether on Linux or NetBSD...so why don't you go ask your friend to 
see his files?

You will want them to be in /etc/namedb/master.

The biggest drawback that I can see WRT using named is that it only 
wants to deal with actual domain names...i.e. it wants more than just 
"pentium" or "quadra" as the computer's name. It wants 
machine.domain.TLD. While using your computers, you would be able to 
leave off the domain.TLD, if you have the "search domain" or "default 
domain" filled out in your configs...but the computer will be 
resolving the whole domain. This may seem trivial, as you can just 
make up a trivial domain....however, there will always be the 
possibility that there is truly a domain with that designation. Then, 
if you were to try to go there, you wouldn't be able to.

Here's a sample /etc/namedb/master/foo.org

=====
$ORIGIN foo.org.
$TTL    86400
@	IN	SOA	foo.org.	root.foo.org. (
                         01123101	; Serial number: yymmdd[0-9][0-9]
                         3600		; Refresh in secs (every 1 hours)
                         3600		; Retry in secs (every hour)
                         432000		; Expire in secs (every 5 days)
                         86400)		; Minimum in secs (24 hours)

         IN	NS	lc.foo.org.	;internal name server
         IN	MX	10 mail.foo.org.	;where mail should go

localhost	IN	A	127.0.0.1	; loopback address
foo.org.	IN	A	192.168.1.1
lc		IN	CNAME	foo.org.
laptop		IN	A	192.168.1.2
osx		IN	CNAME	laptop
windows		IN	A	192.168.1.3
pentium		IN	CNAME	windows
=====

As you don't own any real domains, your changes should not propogate 
ouutside your network, so you can't cause any harm to the "real" 
Internet...just your own LAN. If you ever have any issues with your 
ISP or anything else, the first step you should take is to turn off 
your name server & point your machines to your ISP's server, before 
blaming any network problems of the ISP.

>If it's any motivation the very existence of my LCIII depends on this....

Hehe, I'll take it if you're done with it :P

Mike
-- 
Bikers don't *DO* taglines.