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 |
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. |
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 |
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. |
Please edit resolv.conf to point to the rr DNS servers
24.93.67.126 24.93.67.127 |
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 |
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. |
Quote:
/etc/hosts should contain 127.0.0.1 localhost.localdomain localhost /etc/host.conf should contain order hosts,bind . |
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 |
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. |
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 |
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 |
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!
|
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. |
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). |
All times are GMT -5. The time now is 12:43 PM. |