LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dns and dhcp server on lan - what's the correct setup? (https://www.linuxquestions.org/questions/linux-networking-3/dns-and-dhcp-server-on-lan-whats-the-correct-setup-746041/)

bruceh 08-08-2009 09:58 AM

dns and dhcp server on lan - what's the correct setup?
 
I have a linksys router in gateway mode connected to the modem from my ISP. Just wanted to let a pc do dns and dhcp so that I could set a domain name and access my computers like "name.domainname" when on the lan. No need to access from outside. It seemed to work well for a few hours, when suddenly network became extremely slow. I noticed when I did ping from the dns/dhcp server I got "no buffer available" error, which leads me to that the server got too many requests or something. I have disabled dhcp on the router and have it forward UDP and TCP on port 53 to the dns/dhcp server. On the server I have its network interface use static IP. Rest of the pc's use dhcp.
Is this the correct way to do it?

jschiwal 08-09-2009 07:56 AM

For a small home network, you might want to look at using dnsmasq. DNSMasq handles LAN addresses (from it's own hosts file) and can be configured as a DHCP server. Local IP domain requests are handled by dnsmasq and Internet domains are relayed to the ISP's DNS servers. You just need the dnsmasq server's address in the other hosts /etc/resolv.conf file.

At home, instead of using a DNS server, I assigned static IP addresses in my Linksys router, and then use a static /etc/hosts file on each computer. I did this so I don't have the IP addresses change on my computers. They all have static addresses even though they are using DHCP. I have a WINS entry in the router with the IP address of my desktop that has "wins support = yes" in smb.conf.


All times are GMT -5. The time now is 03:38 PM.