DNS with golang

1
6. respond时也需要增加一个Additional RRs区域,直接把请求的Additional内容发过去就可以(如果支持source netmask,将请求中的source netmask复制到scope netmask中,OpenDNS要求必须支持scope netmask)
* 意思是非OpenDNS就可以不支持scope netmask吗?目前新浪的仍然不支持
  • miekg/dns: golang lib

  • dig with edns

  • DNS报文格式

    • IP packet
      • IP Header 20 bytes
      • IP Data: UDP
        • UDP Header 8 bytes
        • UDP Data: DNS
          • DNS Header 12 bytes
          • DNS Data: RR
            • RR: Question[]
            • RR: Answer[]
            • RR: Authority[]
            • RR: Additional[]
            • RR
              • QName
              • QType
              • QClass
              • RDLENGTH
              • RDATA
            • RR OPT
              • QName null
              • QType OPT=41
              • QClass = UDP payload 2bytes
              • TTL = Extended-RCODE 1byte: extend + VERSION 1byte: 0 + Z 2bytes: 0
              • RDLen len of data(OPT)
              • OPT
                • Option-Code 2bytes: EDNS0_SUBNET
                • Option-Length 2bytes
                • Option-Data
                  • Family 1byte: IPV4(1)
                  • Source Netmask 1byte: 32
                  • Scope Netmask 1byte: 0
                  • Client Subnet 4bytes: 65.135.152.203
  • 我们总是在追一些时髦的技术,而不顾基础还不牢靠

  • 我们总是看见新的框架,然而框架本质上仍然是那些东西,mvc,cs

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy