LinuxQuestions.org
Register a domain and help support LQ
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 11-08-2005, 08:28 PM   #1
kjm9
LQ Newbie
 
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
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
Server:         192.168.1.1
Address:        192.168.1.1#53
** server can't find miller9: NXDOMAIN
Resolv.conf looks OK I think:
Code:
nameserver 192.168.1.1
search direcway.com
Route returns:
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
I do not want to hardcode the other machines into the host table; I sometimes bring in other machines and want to use DHCP for what it was intended.

Any ideas on where to start troubleshooting this?

TIA
 
Old 11-09-2005, 01:48 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,937
Blog Entries: 5

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
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.
 
Old 11-09-2005, 02:03 PM   #3
kjm9
LQ Newbie
 
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the suggestions
Quote:
Originally posted by jlightner
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.)
Yes. It resolves outside names and is reported as the DNS nameserver by my windows boxes which work fine.
Quote:
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".)
Yes, the FQDN should be miller9.direcway.com. That is what appears when pinging from the windows boxes on my little network.
Quote:
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.
Oh yes. miller9 is one of the windows machines and it resolves just fine from the other windows machine and itself. I get the same answer when I do an nslookup of any of the 3 machines on the network from the linux box, including if I nslookup the linux box itself.
 
Old 11-09-2005, 02:31 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,937
Blog Entries: 5

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
On your windows machine if you open a DOS window (Start-->Run-->Cmd on XP) then type "nslookup miller9" what response do you get?
 
Old 11-09-2005, 08:07 PM   #5
kjm9
LQ Newbie
 
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by jlightner
On your windows machine if you open a DOS window (Start-->Run-->Cmd on XP) then type "nslookup miller9" what response do you get?
Code:
C:\>nslookup miller9
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Default servers are not available
Server:  UnKnown
Address:  192.168.1.1

*** UnKnown can't find miller9: Non-existent domain
Thank you, that's very interesting. I'd assumed because ping and tracert worked on the windows boxes that nslookup also worked. Ping and traceroute do not work on the linux machine.

Looks like I need to maybe look at my router configuration. Other ideas?
 
Old 11-10-2005, 06:54 AM   #6
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,937
Blog Entries: 5

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
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.
 
Old 11-10-2005, 07:17 AM   #7
kjm9
LQ Newbie
 
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by jlightner
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?
No, "direcway.com" is right.
Quote:
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.
I thought it was doing DNS because it returns itself as the DNS server when doing DHCP, but I suspect you are right and that it does not
Quote:
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.
My router has none of that. It just has an HTML admin interface. I can configure the IP range (192.168.1.1-51) and default domain (direcway.com), but not much more.
Quote:
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.
I think you are right. I'm thinking I might need to configure the linux box to provide local DNS, and maybe WINS as well. I'll look it some more and see if that makes sense.

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!
 
Old 11-19-2005, 03:51 PM   #8
kjm9
LQ Newbie
 
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
  


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
Can't resolve hosts at work marie@dk Linux - Networking 4 10-14-2005 03:45 AM
bind & resolve local hosts jingo_man Linux - Networking 7 07-08-2004 02:56 PM
Server cannot resolve any hosts! hydro Linux - Networking 5 02-16-2004 07:57 PM
Adding shell commands to hosts.deny and hosts.allow ridertech Linux - Security 3 12-29-2003 03:52 PM
how to resolve names to IPs WITHOUT /etc/hosts or DNS iggymac Linux - Networking 11 11-13-2001 10:32 PM


All times are GMT -5. The time now is 01:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration