Subject: Re: ipnat/dhcp and nameservers
To: None <mcmahill@mtl.mit.edu>
From: Rob Windsor <windsor@warthog.com>
List: netbsd-users
Date: 02/09/2000 19:25:07
Verily did mcmahill@mtl.mit.edu write:

> my setup:

> cable modem ----[NetBSD box, 2 ethernet cards]----[other NetBSD machines]

> the box in the middle gets ip number and name servers via dhcp on the
> cable modem and does ip-nat.  The question is how do I propagate the name
> server stuff to the machines on the local network?  Right now, I just have
> a fixed name server IP set in /etc/resolv.conf on the internal machines
> but its not really the best server to use.

> Thanks for any suggestions.

DNS servers aren't going to change often, so you might as well hardcode them.  
If you're paranoid about them changing, twiddle the dhcp script to syslog the 
dns server addresses so you can look them up if you're having problems.

The *best* thing to do, while we're on the subject, is to run named on your 
NAT box, listen only on the internal interface, and point your home LAN 
machines at that interface address for a dns server.  Why you ask?  Well, then 
you're not NAT'ng UDP nslookup packets and you have standard DNS caching from 
a local name server.

fwiw, @HOME generally will do DHCP, but you still have one address assigned to 
you.  Obviously if you aren't using @HOME, YMMV.

-- Rob
----------------------------------------
Internet: windsor@warthog.com                             __o
Life: Rob@Carrollton.Texas.USA.Earth                    _`\<,_
                                                       (_)/ (_)
The weather is here, wish you were beautiful.