網路
1753894 會員
7754 線上
108809 解決方案
發表新文章

HP-UX 網路解析順序 dns or /etc/hosts 誰先???

 
watermelonyu
教授

HP-UX 網路解析順序 dns or /etc/hosts 誰先???

1. 在 /etc/hosts 檔案中 有設定 dns ip address, 如下所述:





10.1.110.102 dc02.gda.cib dc02





2. 在 /etc/nsswitch.files , 設定 local 先解析, 再來 dns解析, 如下所述:





hosts: files dns







3. 執行下列指令





li-db01:/etc#

li-db01:/etc#nslookup

*** Can't find server name for address 10.1.110.102: Non-existent domain

*** Default servers are not available

Using /etc/hosts on: li-db01





請問: 上面的訊息, 是否告訴是先 DNS 解析, 再來 /etc/hosts 解析, 如何修正順序????
1則回覆 1
watermelonyu
教授

HP-UX 網路解析順序 dns or /etc/hosts 誰先???

Hi,



Have you set up the follows in /etc/nsswitch.conf



hosts: files dns



nslookup command reference /etc/nsswitch.conf as configuration.



If there is no /etc/nsswitch.conf in your system, please do the follow to create it

# cp /etc/nsswitch.files /etc/nsswitch.conf



..

.