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 Code:
[B]$ ping 192.168.2.110 {B pinging A by address} 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 |
perhaps try <hostname>.localdomain for the ping.
|
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. |
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/ |
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
|
All times are GMT -5. The time now is 07:28 PM. |