Results 1 to 5 of 5
Hello, As a exercise to better understand how Linux networking works, I've connected together a number of Linux boxes to my D-Link router. The router has DHCP configured to automatically ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-28-2006 #1
- Join Date
- Sep 2006
How to set up a Linux-only home network?
As a exercise to better understand how Linux networking works, I've connected together a number of Linux boxes to my D-Link router. The router has DHCP configured to automatically assign IP addresses when needed.
Using the KDE configuration tool, I've asigned the hostnames Tom and Jerry to two of the boxes. From each machine, I can ping the IP addresses of the other machine, which I suppose means that basic IP networking is working. (The boxes are all dual-boot PCs, and I've noticed that the address asigned to each box is the same as when running XP. Is this normal?) However, I can't ping the hostname of the other box.
I know that Windows uses Netbios to make the IP address to hostname translation, and that it doesn't use a local DNS server. But how does it work under Linux? Ie., if I ping Jerry from Tom, how does Tom get the Jerry's IP address. I assume that it must get it from the DNS server running on the D-Link router, but how? I have a rough idea how DNS works, in the sense that each DNS server is responsible for its own domain, but how would this work in the context of a home network?
I've checked the networking HOWTOs, but they describe how to configure a Linux box as a gateway/router in the context of a Windows-based network.
PS. I know that I could avoid all this hassle by setting up static addresses, and adding entries to each machine's /etc/hosts file! But I'd like to know how this all works.
- 09-28-2006 #2
If it were my system, I'd turn off the DLink's DHCP and put it on one of the Linux machines, and set up the DHCP server to always provide the same IP address to a specific MAC address (i.e. to each machine). That way you get the benefits of static IP (i.e. you always know which machine is being referred to in any log, and you can forward ports by IP address, and stuff like that) but you get it centrally allocated.
Then you can add the hostnames into either /etc/hosts and copy that file around the lan, or you can configure DNS.
There was another thread over the last few days that covered some of the basics of an Linux-only network. I gave some thoughts on that too; if you're interested, it's here.
- 09-28-2006 #3
Originally Posted by Roxoff
- Join Date
- Sep 2006
Yes, I'd seen that posting, but it didn't answer my question.
No, I don't want to turn off DHCP at the D-Link router, because I also want to use the boxes in a Windows-only or Windows/Linux environment.
In a dynamic address allocation context, I think that the question boils down to the following: how do I configure DNS on the router, so that I can ping other Linux boxes on the network using their hostnames?
- 09-28-2006 #4
It's pretty unlikely that your router will run a DNS server, it's not a PC remember, and the DHCP is provided for convenience.
There is another option if you have some old computer bits lying around. Build your own server. I'm not talking about something hefty, it only has to hold a really lightweight Linux distro to do DNS, DHCP, and perhaps some web proxying and firewalling. It doesn't even need to be particularly powerful (although having some memory helps with DNS caching). You'd get away with an old PII or even pentium-class computer (my firewall box which does similar is a P150 with 96Mb RAM and no mouse). You can have a lot of fun with a box like this, you can even underclock it (yes - run it slower than intended) to consume less power and run cooler, so it runs for longer.
- 09-29-2006 #5
- Join Date
- Dec 2004
IPCop and Smoothwall would be an excellent choice for a firewall, proxy, DHCP server distro.