×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

刚刚装好一个solaris,就是DNS/nslookup不灵。resolv.conf和hosts文件都配了,是不是一定要有domain 才可以让DNS/nslookup工作?

本文发表在 rolia.net 枫下论坛# cat /etc/resolv.conf
nameserver cd
# cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
192.168.2.98 fai loghost
192.168.2.4 cd itsmex.no-ip.com
# hostname
fai
#
# nslookup
*** Can't find server name for address 127.0.0.1: No response from server
*** Default servers are not available
# netstat -rn

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.2.0 192.168.2.98 U 1 2 hme0
224.0.0.0 192.168.2.98 U 1 0 hme0
default 192.168.2.4 UG 1 2
127.0.0.1 127.0.0.1 UH 2 111 lo0


# ifconfig hme0
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.2.98 netmask ffffff00 broadcast 192.168.2.255
ether 8:0:20:b1:99:fb
#

fai是新装的solaris
cd是LINUX,上面有DNS services,NAT firewall/router.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 刚刚装好一个solaris,就是DNS/nslookup不灵。resolv.conf和hosts文件都配了,是不是一定要有domain 才可以让DNS/nslookup工作?
    本文发表在 rolia.net 枫下论坛# cat /etc/resolv.conf
    nameserver cd
    # cat /etc/hosts
    #
    # Internet host table
    #
    127.0.0.1 localhost
    192.168.2.98 fai loghost
    192.168.2.4 cd itsmex.no-ip.com
    # hostname
    fai
    #
    # nslookup
    *** Can't find server name for address 127.0.0.1: No response from server
    *** Default servers are not available
    # netstat -rn

    Routing Table: IPv4
    Destination Gateway Flags Ref Use Interface
    -------------------- -------------------- ----- ----- ------ ---------
    192.168.2.0 192.168.2.98 U 1 2 hme0
    224.0.0.0 192.168.2.98 U 1 0 hme0
    default 192.168.2.4 UG 1 2
    127.0.0.1 127.0.0.1 UH 2 111 lo0


    # ifconfig hme0
    hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet 192.168.2.98 netmask ffffff00 broadcast 192.168.2.255
    ether 8:0:20:b1:99:fb
    #

    fai是新装的solaris
    cd是LINUX,上面有DNS services,NAT firewall/router.更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • 你的resolv.conf格式不对。
      nameserver cd
      cd 是什么意思?
      应该是
      nameserver ip.address
      这个ip是一个装了named的machine.
      # nslookup
      *** Can't find server name for address 127.0.0.1: No response from server
      说明你在用本机做nameserver,但是它没工作。
      你如果只是需要dns client, 改 resolv.conf 到一个正确的ip,如果你要dns server, 要配置named, 启动named服务.
      • sorry ,没看完原贴就回了:-( resolv.conf 里要用 ip地址。就算你在host里定义了也没用。在linux下做了实验,如果用alias, nslookup工作,但是ping domain时无法解析。
        • after change host name to ip address in /etc/resolv.host. it still doesn't work, do I need do something on my LINUX dns server?
          # nslookup
          *** Can't find server name for address 192.168.2.4: Non-existent host/domain
          *** Default servers are not available
          # cat /etc/resolv.conf
          nameserver 192.168.2.4
          #
          • client 这边还要看你的nslook up的顺续,还有一个文件nsswitch.conf呢?不光是resolv.conf 吧
    • GOT IT. had a look on my linux dns configure,then copy every thing to solaris. worked. The linux use DHCP from Rogers. Through it has DNS server, but my own domain seems not work.
      # cat /etc/resolv.conf
      search mtmc.phub.net.cable.rogers.com
      nameserver 24.153.22.195
      nameserver 24.153.23.66
      #hostname
      fai
      #
      # uname
      SunOS
      # nslookup
      Default Server: dns.ym.rnc.net.cable.rogers.com
      Address: 24.153.22.195

      > abc.com
      Server: dns.ym.rnc.net.cable.rogers.com
      Address: 24.153.22.195

      Non-authoritative answer:
      Name: abc.com
      Address: 199.181.132.250

      >