Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Depends on the distribution, what services are running and how it is configured. You might be getting hostname resolution on the server using Avahi but I am only guessing.
But from the server I can ping other computers by their names!!!
For example, I did "ping client1" from server itself:
Code:
$ ping client1
PING client1.mydomain.com (X.X.X.X) 56(84) bytes of data.
64 bytes from X.X.X.X (X.X.X.X): icmp_seq=1 ttl=128 time=0.456 ms
64 bytes from X.X.X.X (X.X.X.X): icmp_seq=2 ttl=128 time=0.196 ms
Check the other machine. Check name resolution for client1 from myserver
Code:
grep -i client1 /etc/hosts;cat /etc/resolv.conf
looking for either client1 in the hosts file OR a nameserver defined on this network. Something allows the resolution of client1 on myserver, so if we replicate that for myserver it should help. If it is the hosts file, we just need to replicate the proper line for myserver (NOT 127.0.0.1, that is loopback) or an entry on the nameserver for myserver. In both cases use the correct network interface address for myserver, not the loopback address.
If your nameserver is running DHCP and using the host name, it may already have an entry for your "myserver" under an earlier name. If that is the case I would check to see if that old name resolves. The solution may be as simple as turning myserver off and waiting out the lease time.
Check the other machine. Check name resolution for client1 from myserver
Code:
grep -i client1 /etc/hosts;cat /etc/resolv.conf
looking for either client1 in the hosts file OR a nameserver defined on this network. Something allows the resolution of client1 on myserver, so if we replicate that for myserver it should help. If it is the hosts file, we just need to replicate the proper line for myserver (NOT 127.0.0.1, that is loopback) or an entry on the nameserver for myserver. In both cases use the correct network interface address for myserver, not the loopback address.
If your nameserver is running DHCP and using the host name, it may already have an entry for your "myserver" under an earlier name. If that is the case I would check to see if that old name resolves. The solution may be as simple as turning myserver off and waiting out the lease time.
I did:
Code:
# Generated by NetworkManager
search mydomain.com
nameserver 172.20.1.2
nameserver 172.20.2.7
# Generated by NetworkManager
search mydomain.com
nameserver 172.20.1.2
nameserver 172.20.2.7
That indicates that the node at 172.20.1.2 is resolving names for you. Is that host on your network, or is that under control of your ISP?
If it is under your control, that is where we would add your myserver host DNS entry.
Although, if it is under your control and you do not have the knowledge needed to manage it, you might be better just adding the myserver line to all available hosts files. That is far less technical a solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.