LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem Connect to Internet...Ping :Unkown host www.yahoo.com (http://www.linuxquestions.org/questions/linux-newbie-8/problem-connect-to-internet-ping-unkown-host-www-yahoo-com-781754/)

manthena 01-12-2010 01:27 PM

Problem Connect to Internet...Ping :Unkown host www.yahoo.com
 
Hi Team,
Can anyone help me out with this.


My /etc/resolv.conf entires
search Belkin
nameserver 192.168.2.1

When I ping www.yahoo.com
error:Unkown host www.yahoo.com

when I ping 192.168.1.110
Error :from 192.168.1.108 destination host is unreachle

ANy help is very appreciated

Thank you

manthena

GrapefruiTgirl 01-12-2010 01:41 PM

Unles you have a nameserver running on 192.168.2.1 then you will not be able to resolve anything at all, resulting in your current problem.
If you use DHCP (like, your belkin router gets an IP address from your ISP and/or from your modem, and then your computer gets an IP address from the router), then your /etc/resolv.conf file should contain two nameserver entries, those being the nameservers your ISP provides for your use, followed by the "Search Belkin" entry.

So if what I wrote here basically describes your internet connection, then I suggest you try running DHCP again for your externally connected network device, and re-check resolv.conf to see if it has been updated properly. If you do NOT use DHCP for some reason, you will need to manually enter your nameserver addresses into resolv.conf before you can resolve any internet hosts.

In the future, please let us know what Linux you are using, and when describing such a problem, tell us how you are connected to the internet, as repair procedures will vary depending on these factors.

Welcome to LQ :)

Sasha

TB0ne 01-12-2010 01:42 PM

Quote:

Originally Posted by manthena (Post 3824045)
Hi Team,
Can anyone help me out with this.

My /etc/resolv.conf entires
search Belkin
nameserver 192.168.2.1

When I ping www.yahoo.com
error:Unkown host www.yahoo.com

when I ping 192.168.1.110
Error :from 192.168.1.108 destination host is unreachle

ANy help is very appreciated

Given the information you provided, it's hard to say anything. How are you connected? Do you connect to a router/switch? Directly? Are you using DHCP, or a static address? Behind a firewall? At home, or at an office? And what version/distro of Linux are you using?

If you're using DHCP, either restart networking, or reboot the box, to see if you get a new address/DNS config. Check it out with an ifconfig and route command, to see if you've got a default route, and a real address. If not, you'll have to verify your DNS and IP config info with your network admin.

bobshaffer2 01-12-2010 01:45 PM

need mroe information
 
output from 'ifconfig -a' and 'route -n' would be helpful, and possibly 'iptables -L -v -n' if you have set up a firewall...

r3sistance 01-12-2010 02:01 PM

I would start with bobshaffer2's request. I would ask on top of this, are you able to ping the gateway (What appears to be a Belkin Router)?

Also GrapefruiTgirl, this is likely to be a setting of the router to default DNS references to itself while the router will be just acting as a DNS proxy, my home router displays similar behavior to this tho is of a different manufacture. I would point out that DNS settings wouldn't be effecting the IP based pings as these won't use DNS.

GrapefruiTgirl 01-12-2010 02:08 PM

Quote:

Originally Posted by r3sistance (Post 3824115)
Also GrapefruiTgirl, this is likely to be a setting of the router to default DNS references to itself while the router will be just acting as a DNS proxy, my home router displays similar behavior to this tho is of a different manufacture. I would point out that DNS settings wouldn't be effecting the IP based pings as these won't use DNS.

Thanks for that info, r3sistance :)

I based my post on the fact that my own Belkin router shows the exact functionality as is appearing in the OP's post, and that the "search" entry does still appear below my nameserver entries in resolve.conf, that's all.

And yes you are of course correct in that the IP pings will not be affected by this, as they don't require DNS, but trying to ping Yahoo.com will require DNS from *somewhere*.

I'm not as familiar with "proxifying DNS" as you may be, so if further input is needed regarding that, feel free to provide it.

Best regards,
Sasha

PS -- I notice that was your 666th post :/ oOOo creepy :p

manthena 01-13-2010 11:13 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 3824072)
Unles you have a nameserver running on 192.168.2.1 then you will not be able to resolve anything at all, resulting in your current problem.
If you use DHCP (like, your belkin router gets an IP address from your ISP and/or from your modem, and then your computer gets an IP address from the router), then your /etc/resolv.conf file should contain two nameserver entries, those being the nameservers your ISP provides for your use, followed by the "Search Belkin" entry.

So if what I wrote here basically describes your internet connection, then I suggest you try running DHCP again for your externally connected network device, and re-check resolv.conf to see if it has been updated properly. If you do NOT use DHCP for some reason, you will need to manually enter your nameserver addresses into resolv.conf before you can resolve any internet hosts.

In the future, please let us know what Linux you are using, and when describing such a problem, tell us how you are connected to the internet, as repair procedures will vary depending on these factors.

Welcome to LQ :)

Sasha

Thank you Sasha,

I went to /etc/sysconfig/network which solved the problem since I assigned a diffrent Gateway in the file.

r3sistance 01-13-2010 05:17 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3824129)
I'm not as familiar with "proxifying DNS" as you may be, so if further input is needed regarding that, feel free to provide it.

Best regards,
Sasha

PS -- I notice that was your 666th post :/ oOOo creepy :p

I am not exactly sure what the routers do if they act as a DNS server or if they simply forward on the query and return the results as a proxy, but I have seen this behaviour.

And indeed, I had noticed it was 666, tho 666 is a misquote, it should be 616 ^^;;.


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