LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-20-2004, 03:06 AM   #1
jimthing2001
LQ Newbie
 
Registered: Jan 2004
Posts: 26

Rep: Reputation: 15
dns not working!


Ok, here is the situation. I am not hosting any sites or anything fancy, just want to access the internet with my computer. I have Windows XP and Linux Red Hat 9.0 on my computer. Everything works on windows, but on Linux, I cant get any name resolution working. For example, I can get to hotmail.com by using the IP address, but not by using "hotmail.com" So I figure its a problem with DNS, but I'm not sure...I'm kind of new to linux. If someone can help, I will give them my soul in the next life.

Potentially Helpful Information:

ISP = road runner. ( sc.rr.com )
I am hooked up to a NetGear WebSafe Router Model:RP114
The only relevant info I can find on the router is DDNS Provider = DynDNS.org.

IPConfig -all Results (under windows)
------------------------------------------------------
IP Address = 192.168.0.6
Subnet Mask = 255.255.255.0
DHCP enable = Yes
Default Gateway = 192.168.0.1 (This is the router)
DHCP Server = 192.168.0.1
DNS Server = 192.168.0.1
------------------------------------------------------

Now, I know about the etc/reslov.conf and etc/hosts files. I've been told I need to put some stuff in them...and so far nothing has worked, but I'm willing to start from scratch for the sake of clarity, so lets pretend they are empty. What do I need in it? Thanks!

mikell
 
Old 05-20-2004, 03:25 AM   #2
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
The /etc/resolv.conf file should contain something like the following:

search mydomain.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

where mydomain.com is the name of your domain (no suprise there then!)
and the nameserver IPs are those provided by your ISP.

However, the problem may be down to the DHCP information given by your router. Somewhere in there should be the information for the DHCP server settings. It's usually here where you insert the IP addresses of the DNS servers. If these are wrong, then it won't matter what you put in the resolv.conf file as the DHCP proffered IPs take precedence. Check them out!

Regards

Carl.

p.s. If this works, sign below

Sale of one soul belonging to

..............................................

Lucifer.
 
Old 05-20-2004, 04:03 AM   #3
jimthing2001
LQ Newbie
 
Registered: Jan 2004
Posts: 26

Original Poster
Rep: Reputation: 15
ok well I have the ip addresses of the two dns servers my isp provides. I'm pretty sure I've edited the resolv.conf exactly as you are suggesting, but it didnt work then, and probably won't work now, but I'll give it one more shot tommorrow. However, I did find some more info on the router. Here it is.

LAN SETUP - IP

DHCP SETUP:
DHCP SERVER (checked)
Pool Starting Address = 192.168.0.1
Primary DNS Server = 0.0.0.0
Secondary DNS Server = 0.0.0.0


I'm assuming you are suggesting replacing those 0.0.0.0's with dns server IP's from my ISP right? Before I do that, let me ask you this. I mentioned in my first post that DDNS (Dynamic DNS) is enabled on this router. I assume this may mean the 0.0.0.0's are there because the ip's are dynamic. Second, remember I said DNS works perfect when I use windows (which I am on now), and so those 0.0.0.0.'s obviously are not inhibiting dns from doing its job now, so it seems like it should not be a problem from linux either. Let me know what you think ,and thanks for the help man!

mikell
 
Old 05-20-2004, 04:18 AM   #4
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
Well there's nothing to lose by trying!

I'm convinced that the DNS servers in your resolv.conf mean nothing if you're a DHCP client and that's why they have no effect.

I'd give it a go with the IPs entered into the router and see if it works.

Carl.
 
Old 05-20-2004, 04:23 AM   #5
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Please edit resolv.conf to point to the rr DNS servers

24.93.67.126
24.93.67.127
 
Old 05-22-2004, 10:34 AM   #6
jimthing2001
LQ Newbie
 
Registered: Jan 2004
Posts: 26

Original Poster
Rep: Reputation: 15
Ok I put both nameservers in the resolv.conf file, but that didnt fix it. Here is some more information.

etc/hosts file
order host,bind

etc/host.conf file
127.0.0.1 localhost.localdomain localhost dhcppc5

I hear those files are relevant to dns. If there is any more info that might help, please let me know! I'm lost here. thanks

mikell
 
Old 05-24-2004, 03:04 AM   #7
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
Are you sure?

Surely the /etc/host.conf file should contain

order hosts,bind

Note the plural hosts, whereas the /etc/hosts file should have the actual entries.

Carl.
 
Old 05-24-2004, 03:34 AM   #8
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Quote:
Originally posted by jimthing2001
<snipped>
etc/hosts file
order host,bind

etc/host.conf file
127.0.0.1 localhost.localdomain localhost dhcppc5

<snipped>
Actually

/etc/hosts should contain

127.0.0.1 localhost.localdomain localhost

/etc/host.conf should contain

order hosts,bind
.

Last edited by ppuru; 05-24-2004 at 03:35 AM.
 
Old 05-24-2004, 08:44 PM   #9
jimthing2001
LQ Newbie
 
Registered: Jan 2004
Posts: 26

Original Poster
Rep: Reputation: 15
Ok my bad guys...I just copied those down wrong.

host.conf
order hosts,bind

hosts
127.0.0.1 localhost.localdomain localhost dhcppc5

There they are but I'm still not getting name resolution. So so far, I've got the resolv.conf file with the proper nameservers, and the hosts and host files set up properly. (I need the dhcppc5 at the end of the hosts file or my computer runs VERY slowly...this issue was resolved some time ago, and seems to have fixed the problem) other than that, I've done everything I've been told so far. Please help!! just let me know what you need to know. thanks guys!

mikell
 
Old 05-25-2004, 01:24 AM   #10
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
what output do you get with

#nslookup www.yahoo.com (or any other site)

I am wondering whether your resolv.conf gets overwritten once you get the DHCP settings.

After you connect to your ISP, check the contents of resolv.conf.
 
Old 05-25-2004, 02:15 AM   #11
jimthing2001
LQ Newbie
 
Registered: Jan 2004
Posts: 26

Original Poster
Rep: Reputation: 15
ok, you were right about /etc/resolv.conf getting overwritten...it was being overwritten to this:
search sc.rr.com
192.168.0.1

nslookup yahoo.com returned this:
;; connection timed out; no servers could be reached

I also ran dig and got the same thing.

I figured the "Automatically obtain DNS information from provider" option in the network configuration panel might be the reason why the /etc/resolv.conf was being overwritten, so I unchecked it and now it is not being overwritten anymore. But nslookup and dig still do not work. Any ideas?? Thanks man!

mikell
 
Old 05-25-2004, 03:42 AM   #12
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
edit /etc/sysconfig/network-scripts/ifcfg-ethx

add the entry

PEERDNS=NO

and restart your network services.

Connect to your ISP. Your resolv.conf should not get overwritten now.

try nslookup and dig.

Make sure iptables is not blocking anything.

#iptables -nvL

Last edited by ppuru; 05-25-2004 at 03:46 AM.
 
Old 05-25-2004, 09:47 AM   #13
jimthing2001
LQ Newbie
 
Registered: Jan 2004
Posts: 26

Original Poster
Rep: Reputation: 15
ok I'll try it, but remember in my last post I said I fixed it from being overwritten by deselecting the "Automatically obtain DNS information from provider" option in the the network configuration panel. Should I still edit the network script file? thanks!
 
Old 05-26-2004, 01:02 AM   #14
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Missed that point about resolv.conf not getting overwritten.

Check iptables

#iptables -nvL

is not blocking any DNS traffic.

Also try starting DNS services on your system.

point /etc/resolv.conf to 127.0.0.1.

Check whether dig/nslookup resolve.

Last edited by ppuru; 05-26-2004 at 01:24 AM.
 
Old 05-26-2004, 03:31 PM   #15
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
Did you add the Netgear into your network now or was it there always ?

Jimthing .. your message listed that your Netgear didn't have any DNS addresses either. Unless it's
getting it automatically from the network it would be an issue.

That could be a real problem if it's not market to be getting it automatically from the network.
BTW your pool starting address is also seems wrong 192.168.0.1 should be the LAN IP address for the Netgear.
The pool should start from 0.2
RR service uses login string to enable the DHCP service from their network .. I don't have the details for it.
But unless your cable modem issues an address to your Netgear box ..nothing will work.
Check the status page of your Netgear .. it should have should ahve something like

Iinternet or WAN) IP Address : xx.xx.xx.xx

DNS 1 xx.xx.xx.xx
DNS 2 xx.xx.xx.xx

So here is one way to take it one step further .. because your MAC doesn't change between reboots (I hope)
power down everything .. then power up cable modem, then router and finally your PC(in xp mode)

Check if your Pc connects to the net .. check the settings in the Netgear (on 192.168.0.1)

If all works, then just power down the pc and reboot with linux and see if it will connect .. Netgear should give it the same address and DNS settings that it gave to the XP .. (BTW make sure you remove the static IP address and routes that you entered before starting this way).
 
  


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
DNS not working jonlake Linux - Networking 9 07-08-2005 01:40 AM
DNS not working? dav7500 Linux - Networking 8 03-24-2004 03:09 PM
DNS Stopped Working` Seventh Linux - Networking 4 01-12-2004 09:49 AM
DNS not working on LAN. richcoosa19 Linux - Networking 3 09-11-2003 04:26 PM
DNS not working! eXor Linux - Networking 3 10-13-2002 01:11 PM

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

All times are GMT -5. The time now is 11:48 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