剛裝好的 solaris/omnios 作業系統
IP設定好,確定網路可以通
/etc/resolv.conf 也設定好 dns server 的位置

nslookup 確定可以查詢到ip
root@omniosce:/etc# nslookup www.google.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   www.google.com
Address: 172.217.163.36
Name:   www.google.com
Address: 2404:6800:4012:3::2004


但偏偏就是ping 不到
root@omniosce:~# ping www.google.com
ping: unknown host www.google.com

解決方式:
檢查 /etc/nsswitch.conf

找到
hosts:      files
修改成
hosts:      files dns
即可

測試
root@omniosce:/etc# ping www.google.com
www.google.com is alive

arrow
arrow
    創作者介紹
    創作者 helloworld 的頭像
    helloworld

    Hello World

    helloworld 發表在 痞客邦 留言(0) 人氣()