Find the answer to your Linux question:
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.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    9

    How to set up a Linux-only home network?


    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 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.

    Many thanks,
    Paul

    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.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,846
    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.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    9
    Quote Originally Posted by Roxoff
    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)...

    There was another thread over the last few days that covered some of the basics of an Linux-only network.
    Hello Roxoff,

    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?

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,846
    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.
    Linux user #126863 - see http://linuxcounter.net/

  5. #5
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    IPCop and Smoothwall would be an excellent choice for a firewall, proxy, DHCP server distro.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •