Re: dhcp server and isp's dns...
Luke wrote:
> I'm setting up a router/dhcp server, and my router gets its IP and DNS
> info via DHCP from my ISP.
>
> How can I pass the DNS info along to my clients when the DNS info is
> dynamically assigned? I see in the DHCP howto that you can do it easily
> if they are static, but what about dynamic?
I doubt the DNS servers of your provider will be changing IPs often
enough to cause your discomfort. They are dynamically assigned, yes -
but they are the same every time (unless the provider is doing something
really really weird). Get the nameservers IPs from /etc/resolv.conf on
the router and put them into /etc/dhcp(3)?/dhcpd.conf.
Alternatively you can setup your own DNS server. apt-get install bind9
will install DNS server. You dont really have to do anything besides
telling your client machines to use your internal DNS server. I.e: your
DNS server IP is 192.168.1.10. In dhcpd.conf put
"domain-name-servers 192.168.1.10;"
> And what's the best way to add the
> /sbin/route add -host 255.255.255.255 dev eth1
> thing automatically? In the /etc/init.d/dhcp script? I'm using debian,
> and am worried that file will be overwritten every time dhcp is
> updated via apt-get... is this a valid concern?
>
Why do you want to do that? Win98 and above work fine without it. Cant
say much about win95 since never had them on network.
In any case, edit your /etc/network/interfaces to read someting like
<snip>
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
up /sbin/route add -host 255.255.255.255 dev eth1
</snip>
"up" just tells the system to run command after the interface is up.
Guess what "down" does. :-)
> I'm using debian,
> and am worried that file will be overwritten every time dhcp is
> updated via apt-get... is this a valid concern?
>
Not a valid concern. How often is your dhcp updated anyways? Mine has
been updated only once since woody came out.
|