LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   web name resolution fails - ping works (http://www.linuxquestions.org/questions/linux-networking-3/web-name-resolution-fails-ping-works-823623/)

stormcloud 08-02-2010 03:43 PM

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?

szboardstretcher 08-02-2010 03:56 PM

what do you get if you

wget www.google.com

or

dig www.google.com

jefro 08-02-2010 03:59 PM

Opps. szboardstretcher seems to be correct.

stormcloud 08-03-2010 06:30 AM

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!

szboardstretcher 08-03-2010 09:22 AM

Try

Quote:

service firewall stop
or
service iptables stop
and
service iptables6 stop
then try again.

stormcloud 08-03-2010 11:00 AM

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

stormcloud 08-03-2010 02:25 PM

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!

jefro 08-03-2010 04:07 PM

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.

stormcloud 08-04-2010 04:18 AM

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.

szboardstretcher 08-04-2010 11:03 AM

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.

catkin 08-04-2010 11:11 AM

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


stormcloud 08-12-2010 03:11 PM

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?


All times are GMT -5. The time now is 11:14 AM.