Solaris網路管理:DNS客戶端的設定(轉)

amyz發表於2007-08-10
Solaris網路管理:DNS客戶端的設定(轉)[@more@]

  /etc/resolv.conf檔案

  記錄DNS伺服器的地址和域名

  關鍵字:

  domainname

  nameserver

  # more /etc/resolv.conf

  nameserver 172.16.255.3

  domainname sunrise.com.cn

  /etc/nsswitch.conf檔案

  記錄主機名的搜尋順序等資訊

  # more /etc/nsswitch.conf

  #

  # /etc/nsswitch.dns:

  #

  # An example file that could be copied over to /etc/nsswitch.conf; it uses

  # DNS for hosts lookups, otherwise it does not use any other naming service.

  #

  # hosts: and services: in this file are used only if the

  # /etc/netconfig file has a - for nametoaddr_libs of inet transports.

  passwd: files

  group: files

  # You must also set up the /etc/resolv.conf file for DNS name

  # server lookup. See resolv.conf(4).

  hosts: files dns

  ipnodes: files

  …

  …

  將這個檔案的hosts記錄配置成hosts: files dns

  nslookup命令

  用於查詢DNS伺服器

  用於驗證客戶端的設定

  用於下載DNS資料庫

  # nslookup

  Default Server: ns.zjhzptt.net.cn

  Address: 202.96.96.68

  >

  Server: ns.zjhzptt.net.cn

  Address: 202.96.96.68

  Non-authoritative answer:

  Name:

  Address: 192.18.97.241

  >

  啟動時,nslookup預設地以本地伺服器為目標。響應中包括目標伺服器的名字和地址。>是提示符,這意味著可以開始傳送名字服務詢問或配置。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752019/viewspace-941495/,如需轉載,請註明出處,否則將追究法律責任。

相關文章