LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 08-02-2010, 02:43 PM   #1
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Rep: Reputation: 15
Question web name resolution fails - ping works


Hi,

I'm trying to install Mandriva Spring 2010 for a friend on his laptop after MS Windows crashed. The installation appeared to work, but I've got an odd networking problem - firefox is unable to load URLs. Every URL I try returns a server not found error.

When I drop into bash I'm able to do the following
Code:
  ping 66.102.9.103
  ping google.com
However when I try

Code:
  wget http://google.com
I just get a message that tells me that wget is "unable to resolve host address google.com'"

This is odd - ping is able to resolve google.com, but wget isn't. I assume that firefox and Konqueror both have the same problem. Could it be cause I've specified the http protocol? If so how do I fix it?
 
Old 08-02-2010, 02:56 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Distribution: Arch 2014.02.01
Posts: 2,317
Blog Entries: 1

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
what do you get if you

wget www.google.com

or

dig www.google.com
 
Old 08-02-2010, 02:59 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Opps. szboardstretcher seems to be correct.

Last edited by jefro; 08-02-2010 at 03:00 PM.
 
Old 08-03-2010, 05:30 AM   #4
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,

Thanks for the suggestions.

Code:
  wget www.google.com
comes back with the same "Name or service not known" error. However the dig application is far more interesting - it comes back with a load of IP addresses that match google.

I've also tried pinging a few other locations, and the results are a bit strange as well.
  • google.com - pings work as expected
  • ping amazon.com - IP address is resolved to 72.21.207.65, but 100% packet loss
  • ping microsoft.com - IP address resolved to be 207.46.232.182, but 100% packet loss
  • ping goats.com - IP address resolved to be 208.122.50.173. Replies are slow, but they work

I can imagine the machine being able to resolve a major site like google, but not the Goats web comic!
 
Old 08-03-2010, 08:22 AM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Distribution: Arch 2014.02.01
Posts: 2,317
Blog Entries: 1

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Try

Quote:
service firewall stop
or
service iptables stop
and
service iptables6 stop
then try again.
 
1 members found this post helpful.
Old 08-03-2010, 10:00 AM   #6
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,

Thanks for you advice. I don't have services called "firewall" or "iptables6" (I'm not using IPv6). I've also rebooted the machine a few times, so I don't think it's a service that is in a bad state.

Is the issue likely to be related to the eth0 device (in which case I'll send the configuration of ifcfg-eth0) or is it some other lookup service that handles name resolution? I've looked at /etc/hosts and it only contains an entry for 127.0.0.1
 
Old 08-03-2010, 01:25 PM   #7
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Original Poster
Rep: Reputation: 15
one other thing that might help (I'm clutching at straws here), in /etc/sysconfig/network, there is an entry I've never seen before:
Code:
  CRDA_DOMAIN=IE
I'm not sure what this is about, or if it's relevant!
 
Old 08-03-2010, 03:07 PM   #8
jefro
Guru
 
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
OK, then what does nslookup say?

Also most distros have a file to set wget and other apps if you have some odd network like a proxy. Do you have a proxy? Does the distro offer a system wide network setting? It may not be working for wget.

Last edited by jefro; 08-03-2010 at 04:02 PM.
 
1 members found this post helpful.
Old 08-04-2010, 03:18 AM   #9
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi jefro,

I'll have to get back to you with the nslookup details (my friend wanted the machine back, but we are still working on it!)

There shouldn't be a proxy - the machine is used on a home network. I've got a router that is connected directly to the broadband; the router also acts as my DHCP which I can see is correctly handing out IP addresses in my 192.169.xx.xx range.

This is the first time I've used the Mandriva Spring 2010 distro, so the might be some setting I've missed.


Cheers.
 
Old 08-04-2010, 10:03 AM   #10
szboardstretcher
Senior Member
 
Registered: Aug 2006
Distribution: Arch 2014.02.01
Posts: 2,317
Blog Entries: 1

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Are you using DHCP?

I would check /etc/resolv.conf to make sure a real dns server is in there.

To test, you can always use 4.2.2.2 which is an att dns server somewhere. Add that, and try. Do not do a network restart if you are using DHCP -- it will overwrite it.
 
Old 08-04-2010, 10:11 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Not all sites respond to ping; some sites have slower connections than others. Testing gave same results as OP
Code:
c@CW9:~$ ping -c2 google.com
PING google.com (209.85.229.147) 56(84) bytes of data.
64 bytes from ww-in-f147.1e100.net (209.85.229.147): icmp_req=1 ttl=51 time=25.8 ms
64 bytes from ww-in-f147.1e100.net (209.85.229.147): icmp_req=2 ttl=51 time=25.2 ms

--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 25.273/25.585/25.897/0.312 ms
c@CW9:~$ ping -c2 amazon.com
PING amazon.com (207.171.166.252) 56(84) bytes of data.

--- amazon.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

c@CW9:~$ ping -c2 microsoft.com
PING microsoft.com (207.46.232.182) 56(84) bytes of data.

--- microsoft.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

c@CW9:~$ ping -c2 goats.com
PING goats.com (208.122.50.173) 56(84) bytes of data.
64 bytes from 208.122.50.173: icmp_req=1 ttl=49 time=99.2 ms
64 bytes from 208.122.50.173: icmp_req=2 ttl=49 time=99.3 ms

--- goats.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 99.223/99.305/99.388/0.325 ms
 
Old 08-12-2010, 02:11 PM   #12
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi szboardstretcher, catkin

Sorry for the delay getting back to you - the owner wanted him machine back!

The change to /etc/resolv.conf worked a treat, but only as long at the machine isn't rebooted. Restarting the machine (or just the network service?) clears the file. Any ideas how to make it permanent?
 
  


Reply

Tags
dns


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PcLinuxOS fails to go out on web despite saying ethernet works nooby Linux - Distributions 6 08-27-2008 06:09 AM
Ping always fails but TCP/IP & everything else works nsfx Linux - Networking 5 04-09-2007 01:59 PM
ping works, web doesnt kjan.ondrace Linux - Networking 8 11-05-2006 10:11 AM
LAN/ADSL Router ping working but DNS ping fails R N Ghosh Linux - Networking 1 01-13-2006 07:44 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM


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

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