LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-16-2010, 09:34 PM   #1
Al Schapira
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
Ping: unknown (local) host, FC-12, w/ router & DSL modem, not newbie, but stumped.


Please pardon the length of this plea for help, but I want to lay out all the info I think is relevant.

Three PCs are connected to a Linksys WRT54GL router (no wireless involved here.)
The router is addressed as 192.168.2.1 and provides DHCP to the PCs.

The router is connected to a Westell Verizon DSL modem.
The modem is addressed as 192.168.1.1 and provides DHCP to the router
(192.168.1.45)

All three PCs connect to external internet properly.
The router's DHCP client table shows all three PCs by name with their
assigned address, typically those in the table below.

PROBLEM:
The two FC-12 PCs CANNOT ping the others BY NAME but CAN ping BY ADDRESS.
Also the FC-12 PCs that can ping by address but not by name can also ssh, etc by address, but not by name.

The FC-12 PCs CAN ping external servers such as google.com, yahoo.com, properly.

The W-XP PC, however, CAN ping the FC-12 PCs by name, e.g from "A" I can ping "B" and "C".

BUT:
The FC-12 PCs CAN see the other PCs using the 'network places' Gnome GUI, and CAN copy files among them using drag-and-drop. !!!

ALSO:
Addressing the PCs by name used to work when I had AT&T DSL service, but something changed when the router was configured for Verizon DSL service. Previously, the router was set to PPPOE, and I used static addresses on all PC's, now its set to DHCP, as per Verizon. I removed the static addresses from /etc/hosts on the FC-12 PCs.

Also, from the W-XP side, the FC-12 SMB clients seem to work properly.

Here is the situation:
------------------------------------------------------------------------------------
Code:
PC   OS    typical  DHCP  can ping  can ping  can ping  can ping  can ping  can ping
                 IP       ... .110      A     ... .111      B     ... .112     C
==  =====  =============  ========  ========  ========  ======== ========  ========
A   W-XP   192.168.2.110    yes       yes       yes       yes      yes       yes   
B   FC-12  192.168.2.111    yes       no        yes       no       yes       no   
C   FC-12  192.168.2.112    yes       no        yes       no       yes       no

Code:
[B]$ ping 192.168.2.110    {B pinging A by address}
PING 192.168.2.110 (192.168.2.110) 56(84) bytes of data.
64 bytes from 192.168.2.110: icmp_seq=1 ttl=128 time=0.287 ms
64 bytes from 192.168.2.110: icmp_seq=2 ttl=128 time=0.276 ms
64 bytes from 192.168.2.110: icmp_seq=3 ttl=128 time=0.292 ms
^C
--- 192.168.2.110 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2334ms
rtt min/avg/max/mdev = 0.276/0.285/0.292/0.006 ms

[B]$ ping A                {B pinging A by name}
ping: unknown host A

-----------------------------------------------------------------------------------
[B]$ cat /etc/resolv.conf   { same on C }
; generated by /sbin/dhclient-script
search GAMMA5 
nameserver 192.168.2.1    { the router }
nameserver 192.168.1.1    { the DSL modem }
-----------------------------------------------------------------------------------

From C: { or B }
[C]$ ping -c2 google.com
PING google.com (66.249.81.104) 56(84) bytes of data.
64 bytes from lga15s01-in-f104.1e100.net (66.249.81.104): icmp_seq=1 ttl=47 time=27.8 ms
64 bytes from lga15s01-in-f104.1e100.net (66.249.81.104): icmp_seq=2 ttl=47 time=28.0 ms

--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1029ms
rtt min/avg/max/mdev = 27.857/27.955/28.053/0.098 ms
========================================================================
Since the W-XP box can ping the others by name I conclude:
1) nothing is blocking ping protocols.
2) there is a DNS server working in the router (or somewhere else)

What do I have to do in the FC-12 PC's to get name resolution for the other PC's?
Which daemons should be running on the FC-12 boxes?
Which should NOT be running on the FC-12 boxes?
What do I check in iptables etc to make sure this is not the problem?

Thanks for any suggestions to fix this problem.

-Al
 
Old 03-16-2010, 10:10 PM   #2
oznola
Member
 
Registered: Mar 2010
Location: las vegas, nv
Distribution: debian etch, kubuntu, mac osx 10.51, vista
Posts: 65

Rep: Reputation: 15
perhaps try <hostname>.localdomain for the ping.

Last edited by oznola; 03-16-2010 at 10:13 PM.
 
Old 03-16-2010, 10:28 PM   #3
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
To be able to ping by host name, you need to state host name in DHSP request file of each host.
So when host asks for IP it also gives your router/DHSP server its host name.
Then you should state in DHCP server that DNS server is your router, and in router settings state external DNS server. In that case computers will ask your router and it give them IP of other hosts in its LAN.

Hope you understand me.
 
Old 03-17-2010, 01:54 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Windows computers use netbios for hostname to IP address lookup but linux normally does not. The fact that windows computers can use the linux hostname instead of the IP address is due to samba which is why windows can ping a linux computer by hostname but not the opposite. Gnome and other file browsers have built in SMB (netbios) client support which is why it works like network neighborhood.

The reason it worked before is because the hostname to IP address lookup was being accomplished by the hosts files but since you are using DHCP now it will not work. You can configure linux to use "netbios" for hostname IP address lookup via wins. I've posted a couple of URLs that will help you get it working. I assume that samba is compiled with libnns_wins support.

http://samba.org/samba/docs/man/Samb...html#id2668215
http://www.linuxquestions.org/questi...d-wins-608694/
 
1 members found this post helpful.
Old 03-18-2010, 11:49 AM   #5
Al Schapira
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Original Poster
Rep: Reputation: 0
That did it!

Thank you michaelk. I added 'wins' to the end of the 'hosts' line in nsswitch.conf (on both linux boxes) and voila! I can ping by name all PCs from all PCs. --Al
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind9 ,host does reslove a dns name but ping says unknown host Byenary Linux - Networking 10 01-12-2011 01:33 AM
Fedora & dsl router modem ... how to smau Linux - Networking 1 04-23-2005 01:52 PM
Suse 9.1 with Router & DSL Modem Shinoby Linux - Networking 1 11-02-2004 09:09 AM
ping: unknown host in local intranet linuxjustin Linux - Networking 3 04-04-2004 02:03 PM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration