Machine names don't work across LAN
When the machine name is used to ping itself it will resolve and the ping completes. When the machine name of other computers on the LAN are used they don't resolve. You have to put in the raw IP numbers (192.168.1.x).
I have a router at 192.168.1.1 that seems to be configured fine. It uses the MAC address of one of the machines (cloned in) to keep the cable modem happy. Everything else works fine on the network, it's just that I can't use the names. The router sees those names, btw, and lists them as "attached devices". What could be going on? Here is the output of dig: Code:
dig |
That would only work if the router is providing local DNS service (coupled with the DHCP server) and your machine is set to use that as the primary DNS server. None of the information you have posted so far involves either of those points, so we don't have enough information to work on here.
Keep in mind that Windows machines resolve names on the network different than Linux machines (or any other OS, really). Windows machines continually broadcast their names to every machine in the local network, and eventually a small database is built up on each machine. For Linux/Unix, you need to use a name resolution service like DNS. Samba can be configured as such to let a Linux machine use the Windows name resolution service (WINS), but this is a bit of a hackish method and would be more of a last resort. |
Quote:
|
Well, the first thing you need to figure out is if the router even provides local DNS, not all of them do. You might spend all this time trying to troubleshoot the problem only to find it just isn't something your router does. As for the DNS configuration on the local machine, "dig" simply shows you what the DNS server it is connected to returns for root. It doesn't show anything about how DNS is configured on the local machine. That is in /etc/resolv.conf.
Since the router sees the hostnames of attached devices, we can assume that they are being reported properly during the DHCP negotiation, so therefore either the router doesn't serve DNS for local machines, or the DNS configuration isn't right. It could be the router only returns full domain names for local hosts, so you might need to give a different "search" parameter in resolv.conf. |
This is the contents of /etc/resolv.conf:
Code:
root@server:/etc# more /etc/resolv.conf Code:
root@server:/etc# netstat -tulpn |
Quote:
lets you map IPs to names it won't be providing name-services. No idea how your "names used to work" would have come about, or how it stopped. If you have a local DNS, and the router is the DHCP server you'd have to put the local DNS servers IP into the routers config for the DHCP clients to receive proper configurations to enable name resolution. The best thing to diagnose why it's failing now is to remember what you changed before it failed ;} Cheers, Tink |
All times are GMT -5. The time now is 09:15 AM. |