LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-22-2005, 03:52 AM   #1
tmmort
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
why does gateway ip address work to resolve names?


I have slackware 10.1 machine connected to a DLink router. The IP address of the router is 192.168.0.1, and the IP address of the linux box is 192.168.0.100 (assigned by router's DHCP server).

I found that I couldn't ping a host name, eg,

ping linuxquestions.org

would return "unknown host" unless I put in a line for a dns server in the resolv.conf file, eg,

nameserver 204.127.198.4

This makes sense to me, but by accident I tried this single line in the resolv.conf file:

nameserver 192.168.0.1

And this also worked! So my question is this: why does this work? I have extensively searched for references to just settting the nameserver address the same as the default gateway, but found nothing. Seems likes this is a lot easier than finding and entering dns server IP addresses.

Any comments?
 
Old 09-22-2005, 04:13 AM   #2
dereut
LQ Newbie
 
Registered: Apr 2005
Posts: 21

Rep: Reputation: 0
while setting up my home network, I install on my server NAT and dnsmasq, that is a dns request forwarder. I do suppose that your router does something similar to nat and also rerout your dns request to an external dns server.

I also use the ip address of my nat server as dns even it it is not a dns server, because of dnsmasq

reup
 
Old 09-22-2005, 07:51 AM   #3
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
the answer is very simple. your router has a dns server inside. most routers do. the router itself uses the dns server of your ISP. I guess you configured that yourself, or the address was retreived with a DHCP request.
 
Old 09-26-2005, 12:58 PM   #4
tmmort
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by yapp
the answer is very simple. your router has a dns server inside. most routers do. the router itself uses the dns server of your ISP. I guess you configured that yourself, or the address was retreived with a DHCP request.
Yes of course. Thank you!
 
  


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
Cannot resolve names bigd Linux - Networking 1 10-09-2005 12:06 PM
i can't resolve names on the network khh80 Linux - Networking 2 07-14-2005 07:02 AM
Internal Can't Resolve Names bootface Linux - Networking 3 03-21-2005 12:00 PM
Linux gateway computer can't resolve names krsnendu Linux - Networking 4 12-17-2003 09:30 AM
Unable to resolve names Starblade Linux - Networking 1 10-25-2003 02:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:25 PM.

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