External Hosts Resolve but Local Hosts Do Not
I'm having a weird DNS problem. My linux box (Slackware 10.2) will resolve external host names but not host names on my local network. For example I can ping yahoo or this site, but not any of the local machines by name.
My setup is 2 WinXP boxes and 1 linux box netted togather with a Netgear wireless router which connects to the Internet via a Direcway modem. I'm using DHCP and the wireless router is the DHCP server (192.168.1.1). The XP boxes operate fine, getting both internal and external name resolved fine. They are running as a simple workgroup (no windows domain or WINS server). I'm using dhcpcd in the linux box. Doing an nslookup of any of the local machines from the linux machine returns this error (doesn't matter if I use a full name miller9.direcway.com): Code:
root@miller7:~# nslookup miller9 Code:
nameserver 192.168.1.1 Code:
Destination Gateway Genmask Flags Metric Ref Use Iface Any ideas on where to start troubleshooting this? TIA |
Your /etc/resolv.conf is specifying to use a host at 192.168.1.1 as a nameserver. It is also saying that any host you don't type in the Fully Qualified Domain Name (FQDN) for should get "direcway.com" appended to it. Therefore when you type "nslookup miller9" it is actually looking for "miller9.direcway.com".
1) Is 192.168.1.1 running a DNS nameserver? (Since its responding I'm assuming it is but just want to make sure you know.) 2) Is the FQDN of miller9 actually miller9.direcway.com? If not then that's your problem - you either need to specify the FQDN of miller9 in your nslookup OR modify the DNS setup on 192.168.1.1 so it know the correct domain name then add that to your search statement. (You can have multiple domains in your search such as "search direcway.com billybob.com".) 3) Is miller9 even IN your DNS setup on 192.168.1.1? If not then it won't find it even with the correct FQDN. |
Thanks for the suggestions
Quote:
Quote:
Quote:
|
On your windows machine if you open a DOS window (Start-->Run-->Cmd on XP) then type "nslookup miller9" what response do you get?
|
Quote:
Code:
C:\>nslookup miller9 Looks like I need to maybe look at my router configuration. Other ideas? |
In my resolv.conf files I always have the search entries before the nameserver entries. Not sure that makes a difference but since you're getting messagins complaining about domain I wonder if it does? Also you have "direcway.com" - its not supposed to be "directway.com" by any chance?
Although home routers do normally provide DHCP they don't usually provide DNS. Does yours? Did you set up a zone file on it. It wouldn't just discover your machines so far as I know. There should be a zone file called direcway.com that has an A record for miller9. zone files are usually under /var/named or /var/name/var/named if chroot jail is in effect. Not sure where it would be on your router if it has one (as noted I wouldn't think the router does). Entry should be something like: miller9 IN A 192.168.1.1 You should also have a PTR record for reverse lookups: 192.168.1.1 IN PTR miller9.direcway.com. It really sounds to me as if your issue is you're expecting the router to provide automatic DNS for your own network and it likely doesn't. If you really want to have DNS for your own network you'd need to install and configure BIND 9x. |
Quote:
Quote:
Quote:
Quote:
The one question would be how to do that where the router is providing DHCP. The router is on all the time, but the linux machine is not. I'll look into that this evening. Thanks! |
Just to let folks know I got DNS working on my linux box. It is set up to resolve as master for the local network and then use the router to resolve all other (external) addresses.. I had to hardcode more stuff than I would like to in the long run but it seems to work OK.
Unfortunately that did not solve the real problem, which is trying to print to printers on the Windows machines from the linux box, but I'll start a seperate thread for that. Thanks. |
All times are GMT -5. The time now is 07:24 PM. |