|
|
两台机子,一台rh-as3 aries.example.com 192.168.1.2 , 另一台ubuntu 192.168.1.1
192.168.1.2做dns服务器
在/etc/named.conf里面添加如下
- zone "example.com" IN {
- type master;
- file "slave-example.com.zone";
- };
复制代码
/var/named/slave-example.com.zone的内容
- $TTL 86400
- @ IN SOA aries.example.com. root (
- 20050131 1H 1M 1W 1D )
- IN NS aries.example.com.
- IN A 192.168.1.2
- www IN A 192.168.1.1
- ftp IN A 192.168.1.1
- nfs IN A 192.168.1.2
- named IN CNAME aries.example.com.
复制代码
重启named, 查看/var/log/message
tail -n 20 /var/log/message
- Jan 31 03:47:18 as3 named[2878]: shutting down: flushing changes
- Jan 31 03:47:18 as3 named[2878]: stopping command channel on 127.0.0.1#953
- Jan 31 03:47:18 as3 named[2878]: no longer listening on 127.0.0.1#53
- Jan 31 03:47:18 as3 named[2878]: no longer listening on 192.168.1.2#53
- Jan 31 03:47:18 as3 named[2878]: exiting
- Jan 31 03:47:18 as3 named: succeeded
- Jan 31 03:47:20 as3 named[2990]: starting BIND 9.2.2 -u named
- Jan 31 03:47:20 as3 named[2990]: using 1 CPU
- Jan 31 03:47:20 as3 named[2990]: loading configuration from '/etc/named.conf'
- Jan 31 03:47:20 as3 named[2990]: no IPv6 interfaces found
- Jan 31 03:47:20 as3 named[2990]: listening on IPv4 interface lo, 127.0.0.1#53
- Jan 31 03:47:20 as3 named[2990]: listening on IPv4 interface eth0, 192.168.1.2#53
- Jan 31 03:47:20 as3 named: named startup succeeded
- Jan 31 03:47:20 as3 named[2990]: command channel listening on 127.0.0.1#953
- Jan 31 03:47:20 as3 named[2990]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
- [color=red]Jan 31 03:47:20 as3 named[2990]: zone example.com/IN: has no NS records[/color]
- Jan 31 03:47:20 as3 named[2990]: zone localhost/IN: loaded serial 42
- Jan 31 03:47:20 as3 named[2990]: running
复制代码
在/var/named/slave-example.com.zone里面已经指定了NS 的地址为aries.example.com,ip也指定了,为什么还有这样的问题呢(红色的部分)? |
|