V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
wonter
V2EX  ›  问与答

自建的权威 DNS 服务器能否当查询是 A 记录的时候应答 CNAME 记录?

  •  
  •   wonter · 2018-07-18 23:04:00 +08:00 · 1250 次点击
    这是一个创建于 2080 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题

    这样是否符合 DNS 规范??

    当用户查询某个域名的 A 记录,返回的是 CNAME 记录

    2 条回复    2018-07-19 02:21:02 +08:00
    Showfom
        1
    Showfom  
       2018-07-19 01:01:42 +08:00
    CNAME 会继承 TXT SOA MX 等记录,从而引起冲突,所以你怎么做都是不规范的
    msg7086
        2
    msg7086  
       2018-07-19 02:21:02 +08:00   ❤️ 2
    RFC 1034 Domain Concepts and Facilities November 1987

    [Page 15]

    If a CNAME RR is present at a node, no other data should be present.

    [Page 24]

    If the data at the node is a CNAME, and QTYPE doesn't match CNAME, copy the CNAME RR into the answer section of the response, change QNAME to the canonical name in the CNAME RR, and go back to step 1.

    所以当你 Zone 里对应域名节点是 CNAME 的时候,任何查询都应该返回 CNAME 记录,不论是 A 或者是 AAAA TXT MX 都一样。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1129 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 22:56 · PVG 06:56 · LAX 15:56 · JFK 18:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.