DNS解析结果会出现别名,该别名也可通过”CNAME“参数解析
1.A机器配置
[root@svr7 named]# vim tedu.cn.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
test.cn. NS svr7
svr7 A 10.10.0.55
www A 10.10.0.24
* A 10.10.0.21
ftp A 10.10.0.25
$GENERATE 1-50 pc$ A 192.168.1.$
mk CNAME ftp ///访问mk结果和ftp一致
2.重启服务
[root@svr7 named]# systemctl restart named
3.B机器测试
[root@k8s-node2 ~]# nslookup mk.test.cn
Server: 10.10.0.10
Address: 10.10.0.10#53
mk.test.cn canonical name = ftp.test.cn.
Name: ftp.test.cn
Address: 10.10.0.25
[root@k8s-node2 ~]# nslookup ftp.test.cn
Server: 10.10.0.10
Address: 10.10.0.10#53
Name: ftp.test.cn
Address: 10.10.0.25
以上两条解析结果一致