我需要为一个CNAME域创建一个NS记录,目的是让两个域指向一个IP,而不必在两个不同的地方维护当前的IP地址.
此域的DNS提供程序是DynDNS,但它们阻止此操作:
CNAME cannot be created with label
that is equal to zone name
我可以使用其中DNS由1and1提供服务的另一个域来执行此操作:
root@srv-ubuntu:~# dig myseconddomain.co.uk ; <<>> DiG 9.4.2-P1 <<>> myseconddomain.co.uk ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,status: NOERROR,id: 61795 ;; flags: qr rd ra; QUERY: 1,ANSWER: 2,AUTHORITY: 0,ADDITIONAL: 0 ;; QUESTION SECTION: ;myseconddomain.co.uk. IN A ;; ANSWER SECTION: myseconddomain.co.uk. 71605 IN CNAME myfirstdomain.co.uk. myfirstdomain.co.uk. 59 IN A www.xxx.yyy.zzz ;; Query time: 298 msec ;; SERVER: 10.0.0.10#53(10.0.0.10) ;; WHEN: Tue Aug 18 14:17:26 2009 ;; MSG SIZE rcvd: 78
这是否违反RFC或DynDNS是否有正当理由阻止此行为?
跟进
感谢已发布的两个答案,我现在知道1和1 IS正在破坏RFC来执行此操作.然而,它确实有效,他们似乎支持它.对于拥有如此众多域名的公司来说,如果他们在如此大规模的情况下毫无异议地做到这一点似乎很奇怪.
更多跟进
根据要求输出“dig myseconddomain.co.uk ns”.
root@srv-ubuntu:~# dig myseconddomain.co.uk ns ; <<>> DiG 9.4.2-P1 <<>> myseconddomain.co.uk ns ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,id: 18085 ;; flags: qr rd ra; QUERY: 1,ADDITIONAL: 2 ;; QUESTION SECTION: ; myseconddomain.co.uk. IN NS ;; ANSWER SECTION: myseconddomain.co.uk. 4798 IN NS ns67.1and1.co.uk. myseconddomain.co.uk. 4798 IN NS ns68.1and1.co.uk. ;; ADDITIONAL SECTION: ns67.1and1.co.uk. 78798 IN A 195.20.224.201 ns68.1and1.co.uk. 86400 IN A 212.227.123.89 ;; Query time: 59 msec ;; SERVER: 10.0.0.10#53(10.0.0.10) ;; WHEN: Wed Aug 19 12:54:58 2009 ;; MSG SIZE rcvd: 111
解决方法
正确,违反了
RFC 1034,第3.6.2节,第3段:
… If a CNAME RR is present at a node,no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different. …
这适用于此,因为您的区域的根目录也必须具有SOA和NS记录.