通过机器名进行ping:
修改/etc/nsswitch.conf,找到hosts: 行。
改成类似下面:
hosts: files wins dns
wins在dns前面就会自动搜索局域网优先于dns服务器。
the part of interest would be
"...and the "wins" parameter needs to be added to the "hosts:" line in the /etc/nsswitch.conf file"
so then...
grab you favorite editor
edit your /etc/nsswitch.conf file
search for the line starting with hosts (my line was like this "hosts: files dns")
add "wins" to the line ("hosts: files dns wins")