Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a very small lan connect to comcast though a belkin router. I have the gateway and dns set to the router's ip address. This connects all the PC to the internet, and to each other. I have a few linux boxes on the lan.
I would like the linux boxes to be able to connect to each other by name, not just IP. I thought I could do that by editing the /etc/hosts files; but - to my surprice - that does not work.
The first line in my /etc/resolv.conf is the address of the router. There is nothing in /etc/hosts.deny, or /etc/hosts.allow. I am very sure the hosts are spelled correctly, and there is no case conflict, and the IP addresses are correct.
When I try to ping one the hosts by name I get the error: "ping: unknow host <i>hostname</i>." I can ping all the hosts by ip address.
Can I use /etc/hosts? Or should I set up dns on my of my linux boxes. If I set up dns on a linux box, will that affect my ability to connect to the internet by my cable modem?
Well when name resolution breaks on a lan but it looks for WAN/Internet hostnames (well, FQDN actually) I found that lwres is the issue. Not only do you have to have the daemon running but in /etc/nsswitch you need this line:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.