Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-13-2012, 12:09 PM
|
#1
|
|
Member
Registered: Jan 2002
Location: UK
Distribution: Desktop - Ubuntu, Server - Debian, CentOS
Posts: 62
Rep:
|
How to ping Windows 7 machines by name from Debian Server?
I have backuppc installed on my Debian server and I need to be able to resolve my Windows 7 machines on my home LAN by name. I have a machine called lanthanum, and if I ping it by name I get this:
Code:
PING lanthanum (67.215.65.132) 56(84) bytes of data.
64 bytes from hit-nxdomain.opendns.com (67.215.65.132): icmp_req=1 ttl=55 time=247 ms
Why is ping going out to the internet? Lanthanum's IP address is 10.0.0.57 and it should resolve to that but it's not. I can ping lanthanum fine from windows machines. I've added "wins" to /etc/nsswitch.conf on the "hosts:" line and rebooted, but it's still not working. I have a DNS server on my home network. Any ideas? I don't want to configure the hosts file.
|
|
|
|
03-13-2012, 12:18 PM
|
#2
|
|
Member
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 982
|
Greetingz!
Try using the "Fully Qualified Domain Name" ( FQDN) of the Windows machine in question.
You should be able to undo the change to your nsswitch.conf file as well.
EDIT: If you do an ' nslookup lanthanum', and you're not "hitting" your local LAN first, your *NIX system's /etc/resolv.conf may need to be tweaked.
Last edited by xeleema; 03-13-2012 at 12:20 PM.
|
|
|
|
03-13-2012, 12:23 PM
|
#3
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
What is in your /etc/resolv.conf?
What does the "hosts" line in /etc/nsswitch.conf have in it other than wins? If you have DNS it seems you could set line to have dns and hosts. I've never used wins in nsswitch.conf so don't know if it should work and/or if it requires additional configuration (e.g. samba for user authorization) to work.
When you type a host name by default it will try whatever method is in nsswitch.conf first then the next one second then the last one so for example I typically have:
hosts: files dns
which tells it to look at /etc/hosts first then dns. (This allows me to override DNS entries at host level by specifying the host in /etc/hosts.)
A default example is:
hosts: db files nisplus nis dns
That would first look at a database, then at /etc/hosts then at nisplus then at nis and finally at dns to find the name.
The name you typed is the "short" name. The /etc/resolv.conf can tell DNS what domain to search as well as what DNS server to query. You probably got the internet default answer because either you have a domain to search specified that it found or you don't have any and it made its guess on what to look for based on whatever the stub resolver on Linux is designed to use by default. If the fully qualified domain name (FQDN) is something like: lanthanum.myexample.com then you'd add myexample.com as the search domain to resolv.conf so that when you did the DNS lookup for the short name it would know to try appending myexample.com to get the FQDN.
|
|
|
|
03-13-2012, 12:31 PM
|
#4
|
|
Member
Registered: Jan 2002
Location: UK
Distribution: Desktop - Ubuntu, Server - Debian, CentOS
Posts: 62
Original Poster
Rep:
|
(smacks head) My local DNS server was not in there. I put it in there and all is fine now. Thanks for reading and thanks for the great replies.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:42 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|