On 1 Sep 2003 22:02:32 -0700
(E-Mail Removed) (Ittay Freiman) wrote:
> I have a computer setup as a gateway. It gets its external IP through
> dhcp from the cable company. It also gets IPs for DNS servers. I also
> have several computers set up as a private LAN. Each of them should
> also get the IPs for the DNS servers. There are several ways I know of
> for doing that, I like neither:
> 1. put the IPs statically in /etc/resolv.conf in each machine.
> 2. make the gateway be a dhcp server and configure it to give the IPs
> of the DNS. these IPs will also be written statically in the dhcp.conf
> file.
> 3. install a DNS server (or DNS caching server) in the gateway.
>
> All of these options mean that the DNS IPs are static, hard-coded in
> some configuration file. But since I get them dynamically from my ISP,
> I want to provide them dynamically to the machines in my LAN. How can
> I do that?
My /etc/resolv.conf:
jkoenig@note:~$ cat /etc/resolv.conf
nameserver 192.168.1.1
jkoenig@note:~$
I'm not sure how this would change if your router is a Linux box, not a
Linksys Router. Here is how I get nameserver in resolv.conf:
jkoenig@note:~$ cat /etc/network/interfaces
<snip comments and loopback interface>
auto eth0
iface eth0 inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
jkoenig@note:~$
I don't know if this works because the router does some sort of special
DNS, or because of the inherent action of 'nameserver.' I think it works
like thus:
note (my computer) sends request to router
router looks it up
router returns it to note
I'd test it by setting 'gateway' to another one of my computers and
trying some name resolution, but I'm pretty tired right now.
--
-johann koenig
Now Playing: Rancid - 1998 : Punk-O-Rama (Vol. 4)
Today is Setting Orange, the 26th day of Bureaucracy in the YOLD 3169
My public pgp key:
http://mental-graffiti.com/pgp/johannkoenig.pgp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/VVtxFk4duwOzQpURArUrAJ9K+s77SagmQcHNAeFw/qspHnhrgwCcCg7q
L1quxH0Egwa9Q7d8FyA4KUU=
=w99A
-----END PGP SIGNATURE-----