0

I'm running Solaris 10, I've changed DHCP to static IP configuration,

Now I can't use wget anymore, it does not honor /etc/resolv.conf.

Take a look at the screenshot below, wget failed to resolve the DNS address, but host command succeeds.

Any ideas?

enter image description here

EDIT

ping command,

root@sol10 / # ping bing.com
ping: unknown host bing.com

resolv.conf,

root@sol10 / # cat /etc/resolv.conf
domain localdomain
nameserver 192.168.154.2

hosts,

root@sol10 / # cat /etc/hosts
#
# Internet host table
#
::1             localhost
127.0.0.1       localhost
127.0.0.1       sol10
131.188.40.82   mirror.opencsw.org

marked as duplicate by Jeff Schaller, jayhendren, G-Man, grochmal, Archemar Dec 21 '16 at 6:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • When you changed from dynamic IP to static IP address.Make sure your static Ip addresss didnt conflict with the range of IP address on DHCP server.Are you in same network as DHCP client or Static IP address? When you used Static IP address.You should define resolv.conf for nameserver.Because you didnt accept any DNS from DHCP server again – supriady Dec 19 '16 at 7:56
  • All versions of wget I know are perfectly fine with using /etc/resolv.conf. OTOH, host may very well use a non-standard way to access the NS. What are the contents of your /etc/resolv.conf? What happens if you do e.g. ping bing.com, or any other program hat needs to use DNS? – dirkt Dec 19 '16 at 8:00
  • It could be same problem as in here: (unix.stackexchange.com/questions/168584/…). Have you tried with wget -4 <some url> – StefanR Dec 19 '16 at 8:13
  • @dirkt attached everything you need – daisy Dec 19 '16 at 8:19
  • 8
    Better: check /etc/nsswitch.conf and possibly /etc/netconfig. Normal programs like ping wget curl telnet ftp ssh/scp/sftp don't call DNS directly; they call name lookup (aka libnsl) which can use a combination of local file(s), YP/NIS if configured, DNS if configured, and sometimes other things. OTOH host nslookup dig use only DNS, which can give different results. – dave_thompson_085 Dec 19 '16 at 8:27