Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a 4 computers at home that are hooked up through a router. They all have the same domain name, of course with different host names. I can ping to all of them by IP address, but I wish to be able to refer to them by FQDN. Any tips welcome!
Do they have fixed IPs. If so, then you just need to add a "hosts" file to each, containing the IP/Name of the others. In Linux, the file is /etc/hosts. In Winblows it's C:\WINDOWS\system32\drivers\etc\hosts.
If they have dynamic IPs, then the Router would have to run a DNS tied to it's DHCP. Most, if not all, don't support this. They just pass DNS requests through to an external DNS.
Thank you. This is in Debian unstable, so I'd be interested to know if there's a Debian way of doing this. I'm not sure if these are static IPs or not, but I'll find out. If I want to make the FQDNs be accesible from outside the router, that's a whole different story isn't it? Thanks.
Even if these hosts get their address from DHCP most NAT routers will remember the IP assigned and not change it unless you change a NIC card (which changes the MAC address). So for 5 hosts, editing the hosts file is the best solution. Look in your /etc/nsswitch.conf file. On the "hosts:" line, "files" is listed first. This line is in sync with /etc/host.conf; "order hosts, bind". Some people run their own nameserver (DNS) for the LAN. For 5 hosts, that is just to much work. For some NAT routers, you can use the IP address of the router as the nameserver. This won't work for my Linksys wireless router however.
For only 5 hosts, static addresses would be just as managable. Assign them outside the address range that the router uses to assign addresses. For a Linksys NAT router, that would be in the ranges 192.168.1.2-99 and 192.168.1.150-192.168.1.254.
Yes, but if you want to go from using a dhcp assigned address to a fixed address, you may want to change it's address first. A Linksys NAT router starts at 192.168.1.100, and assigns up to 50 IP addresses. These are the defaults and can be modified in the setup. However with only 5 devices, you have plenty of IP address to choose from outside of 184.108.40.206-149.
My host file contains an entry like:
192.168.1.100 hpamd64.jesnet hpamd64
If you wanted you could even add www.linuxquestions.org to your hosts file with maybe an alias of "lq". Then it would be a few milliseconds quicker and easier to reach your favorite website.
Cool, I just checked the IPs of all the computers and modified their /etc/hosts like this. I can now ping them, ssh to/from them and what not. IIUC, one can just add any number of IP/FQDN in that file to make life easier contacting them? I hope there's no security issue doing that. It's very handy! BTW, is NFS the best way to go to access each computer's filesystem from any of the computers? Thanks again for the pointers!