Tru64 Unix
1753767 會員
5619 線上
108799 解決方案
發表新文章

nslookup 找得到但 ping 不到???

 
watermelonyu
教授

nslookup 找得到但 ping 不到???

nslookup 可以找到 hostname 對應的 IP, 但直接 ping hostname 會出現 unknown host...ping IP 也沒問題..... Why?
8則回覆 8
watermelonyu
教授

nslookup 找得到但 ping 不到???

Hi Eric,



Please change the hosts' search path from the /etc/svc.conf as below:

hosts=local

Change to

hosts=local,bind



Hope it helps,

Richard.
watermelonyu
教授

nslookup 找得到但 ping 不到???

Hello Richard,



我已經修改了 /etc/svc.conf, 但結果還是一樣 ping 不到.



How should I do?
watermelonyu
教授

nslookup 找得到但 ping 不到???

Hello Eric:



Would you please run coommand as follow:

# grep hosts /etc/svc.conf

And post the results here for us to check.



Best Regards

Danny
watermelonyu
教授

nslookup 找得到但 ping 不到???

我把 /etc/svc.conf 的檔案內容貼上來



aliases=local

auth=local

group=local

hosts=local,bind

netgroup=local

networks=local

passwd=local

protocols=local

rpc=local

services=local



SECLEVEL=BSD # for backwards compatibility ONLY

watermelonyu
教授

nslookup 找得到但 ping 不到???

Hello Eric:



/etc/svc.conf seemed to be good, would you please post /etc/resolv.conf and try nslookup

and ping for other hosts to make sure your DNS servers have correct entries.



Best Regards

Danny
watermelonyu
教授

nslookup 找得到但 ping 不到???

Hi all,



The work-around will be add the hostname into /etc/hosts.

It's a problem only encountered on V4.0D not on V4.0F (or higher).



Please provide both trace files "nslookup.log" and "telnet.log" via the following command.



# ./trace -o nslookup.log nslookup HOSTNAME

# ./trace -o telnet.log telnet HOSTNAME

or

# ./trace -o ftp.log ftp HOSTNAME

ftp>quit

#



PS: Please getting the trace from the attached!



Richard.
watermelonyu
教授

nslookup 找得到但 ping 不到???

Hi Eric,



I think the hostname has included the special character as "_" that works to nslookup but failed to ping command.

See the documented in the resolv.conf man page:



====

options allow_special all | { \char }



Option for defining valid characters in hostnames. Specify all to disable

hostname checking (allow all characters) or define a set of valid charac-

ters by using the { \char } syntax, where char is the character you want to

allow. For example, you can allow the semicolon, underscore, and colon

characters by using { \; \_ \: }.



Disabling hostname checking altogether is not recommended. By default, the

allow_special option is not set and strict hostname checking is enforced.

====



If the special character "_" is used in DNS DB. The solution will be added the following definition into resolv.conf

Such as:



options allow_special { \_ }



Good luck,

Richard.
watermelonyu
教授

nslookup 找得到但 ping 不到???

Hi Richard & Danny,



感謝你們熱心的答覆我的問題, 我改用 sysman 去 config DNS client, 一切就正常了.



原本我是手動增加 resolv.conf , 和後來去修改 svc.conf, 但發現都 ping 不到, 所以只好用 sysman.



但為什麼不能自己手動修改設定檔呢?



Thanks again for your support



Eric