Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-08-2005, 09:28 PM
|
#1
|
LQ Newbie
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5
Rep:
|
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
|
|
|
11-09-2005, 02:48 PM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
11-09-2005, 03:03 PM
|
#3
|
LQ Newbie
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5
Original Poster
Rep:
|
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.
|
|
|
11-09-2005, 03:31 PM
|
#4
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
On your windows machine if you open a DOS window (Start-->Run-->Cmd on XP) then type "nslookup miller9" what response do you get?
|
|
|
11-09-2005, 09:07 PM
|
#5
|
LQ Newbie
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5
Original Poster
Rep:
|
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?
|
|
|
11-10-2005, 07:54 AM
|
#6
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
11-10-2005, 08:17 AM
|
#7
|
LQ Newbie
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5
Original Poster
Rep:
|
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!
|
|
|
11-19-2005, 04:51 PM
|
#8
|
LQ Newbie
Registered: Nov 2005
Location: Central MA
Distribution: Slackware
Posts: 5
Original Poster
Rep:
|
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 10:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|