LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   simple home LAN - DNS and DHCP (http://www.linuxquestions.org/questions/linux-networking-3/simple-home-lan-dns-and-dhcp-419155/)

davepass 02-24-2006 12:49 PM

simple home LAN - DNS and DHCP
 
Greetings,

I currently have a small network of WinXP, Win2k and Linux (Debian) desktops and/or latops. The desktops have static IPs and the laptops dynamic. They all connect to a linksys router (which I believe assigns the dynamic IPs, correct?) and connect to the internet through a broadband cable connection.

Problem 1:
I can only access shares on the windows boxes through the IP address, not by the computer's name. This obviously becomes a problem when trying to access files on one of the laptops with a dynamic IP.

Problem 2:
One of the Linux boxes runs Apache and functions primarily as a web server. Since I am running several virtual hosts from the server, I need to be able to make requests to the server by host and domain names rather than by IP address. For example:

dev1.myserver.mydomain.com
dev2.myserver.mydomain.com

rather than

192.168.1.161/...

I am currently acheiving this by adding new entries to each computer's hosts file each time a new virtual host is added. This has its obvious drawbacks...


So what I am looking for is a way to have one of the machines (most likely a Linux one) act as a DNS server that will route requests made by name rather than IP (either for files or web content) to the correct machine. I'm assuming that this server would then take over the responsibility of assigning dynamic IPs as well?

I have looked into dnsmasq and bind9 for Linux but being very new to all this, I'm not certain that either of these will do what I need.

Am I biting off more than a noob con chew? or is there a direction someone can point me in that will achieve my objectives?

acid_kewpie 02-24-2006 01:55 PM

personally i'd really suggest dnsmasq, as it's simple and integrates dhcp and dns on small networks. you can certainly accomplsh the same thng with dhcpd and bind, but they are probably on the heavy side for your needs. so stop the router dishing out dhcp, and set up the linux box with a static address, and start dishing out dhcp from said box. as one of the options you then set the dns server as the linux box too. you would also set name servers for internet directly on the linux box (dnsmasq will find these and relay requests onwards if the request is not a local machine. you can either set the router as the dns server for the linux box (and NOT for anyone else, other than as a fallback maybe) or take the name servers the router is using as use them in /etc/resolv.conf.

dnsmasq is seriously easy and does a great job of basic dns and dhcp.


All times are GMT -5. The time now is 01:55 PM.