LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-21-2007, 11:17 PM   #1
robagar
LQ Newbie
 
Registered: Feb 2006
Distribution: slack 12.1, ubuntu 9.04
Posts: 10

Rep: Reputation: 0
[SOLVED] wget resolving IP addresses to 1.0.0.0


hi all

I have an odd problem with wget - basically it fails to resolve hostnames correctly. For instance, using it to download the php source I might get this:

Resolving au.php.net... 1.0.0.0

.. but if I ping au.php.net, it works outputting

64 bytes from au.php.net (203.16.234.91): icmp_seq=1 ttl=58 time=52.3 ms

and if I try wget again, it now resolves the host correctly and the download proceeds without any problems.

Evidently the IP address obtained by ping is being cached. But how do I diagnose the problem with wget? I'm fairly new to linux, so any advice will be greatly appreciated!

cheers
Rob

Last edited by robagar; 01-22-2007 at 08:16 PM.
 
Old 01-21-2007, 11:41 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Do you have any unusual entries in /etc/hosts? This can cause confusion, especially if ping is statically built to only do DNS queries.
 
Old 01-22-2007, 12:10 AM   #3
robagar
LQ Newbie
 
Registered: Feb 2006
Distribution: slack 12.1, ubuntu 9.04
Posts: 10

Original Poster
Rep: Reputation: 0
nope, just the loopback and the host's own local lan ip address
 
Old 01-22-2007, 08:14 PM   #4
robagar
LQ Newbie
 
Registered: Feb 2006
Distribution: slack 12.1, ubuntu 9.04
Posts: 10

Original Poster
Rep: Reputation: 0
[solved] wget resolving IP addresses to 1.0.0.0

It appears to be the fault of my crappy D-Link DSL-G604T router.

In case anyone else has this problem, the workaround is to edit /etc/resolv.conf replacing the router's ip address with your ISP's DNS server's.

Works for me
 
  


Reply



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
Problem resolving hostname with elinks / wget pk21 Linux - General 2 04-10-2006 09:22 PM
Internet addresses resolving VERY slowly timswim78 SUSE / openSUSE 3 12-20-2005 11:12 PM
Resolving IP addresses? easwaran Linux - Networking 3 10-07-2004 07:55 PM
Squid and resolving local addresses on network lumpyhed Linux - Networking 1 03-12-2004 08:31 AM
Mozilla suddenly not resolving addresses moger Linux - General 3 08-23-2003 01:31 PM

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

All times are GMT -5. The time now is 07:06 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
Open Source Consulting | Domain Registration