博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DNS协议 记录类型 浅读
阅读量:7044 次
发布时间:2019-06-28

本文共 3760 字,大约阅读时间需要 12 分钟。

hot3.png

DNS 协议学习简单汇总

  DNS协议的历史、设计的初衷在RFC 1034文章中起头部分都有谈到。下面正文主要讲述DNS的大致功能、工作机制、DNS的多种解析记录以及常用记录分别代表的含义。


DNS协议的作用:

  域名系统DNS是互联网使用的命名系统,用来把便于人们使用的机器名字转换成IP地址。Dns设计的初衷是为了方便主机之间进行信息交互,Domain系统是DNS的核心控制部分,它主要是定义了 获取数据的步骤(应该顺着哪个IP获取或是顺着哪个DNS服务器接着查询)。


DNS系统的组成:

  DNS包含了以下的主要部分:

  • Domain Name Space(域名空间)和Resource Record(资源记录):   引用一段RFC文档原文↓

The DOMAIN NAME SPACE and RESOURCE RECORDS, which are specifications for a tree structured name space and data associated with the names. Conceptually, each node and leaf of the domain name space tree names a set of information, and query operations are attempts to extract specific types of information from a particular set

  简单描述就是域名空间下使用的树状结构存储的各种资源记录以及访问资源记录的路径(方法,因为有些资源可能当前的DNS服务器上没有记录)

  • NAME SERVERS(命名服务器):   Name Server就是运行持有域名空间以及资源文件的管理程序,其通常缓存了关于部分域内的资源记录以及访问其他Dns服务器的路径。一般情况上Dns服务器会保存了某个域(子域)的完整资源信息以及一些从任意地方都能访问到特定资源(此服务器不含有的资源)的指针,这一类有着完整的域名信息的服务器有着别名,叫做:权威服务器。权威服务器上的资源是以'区'为单位管理的,这些区内信息否会分散在更多其他的Dns服务器上,冗余提供服务。

  • RESOLVERS (处理者):    Resolver 就是指代的那些从Name Server 中提取所需信息,响应解析请求的处理对象。它依赖于DNS Name Server,是与请求接触(Access)的直接对象,并且也是它来决定此次请求是否还需要引用其他的DNS Name Server 。从概念上理解,它的作用有点像 System Router 。在Resolver与用户的程序(User Programm)之间的不应该采用任何约定

A resolver will typically be a system routine that is directly accessible to user programs; hence no protocol is necessary between the resolver and the user program.

  域名空间(Domain Name Space)中,资源(Resource Set)都是以树上的叶子(leaf)或者是内部节点(Inner Node)的形式保存在树形结构中的。Domain System对叶子以及内部节点并没有很详细的去划分因此可以统称这两者为节点。每个节点都有一个label,长度为63字节,兄弟节点的的label内容是不允许相同的,并且规定了节点的遍历方式是从左往右的(中序遍历,笔者猜测的),每次便利到节点的值便在后面补上一个.,因此 Resolver 提取的信息往往都是由数个节点的值以及.构成的(笔者猜测的,请求的域名的资源记录便是存放在对应的叶子节点中)

Example name space

Note that while upper and lower case letters are allowed in domain names, no significance is attached to the case. That is, two names with the same spelling but different case are to be treated as if identical.

   节点就是由一个一个域名唯一标识的,并且于这个域名相关的资源信息(RRs)的组成大致为:

  • owner

    • which is the domain name where the RR is found.
  • type

    • which is an encoded 16 bit value that specifies the type of the resource in this resource record.

      Types refer to abstract resources.

    • This memo uses the following types:

      A               a host address         CNAME           identifies the canonical name of an alias         HINFO            identifies the CPU and OS used by a host          MX                  identifies a mail exchange for the domain.  See [RFC-974 for details.          NS                  the authoritative name server for the domain          PTR               a pointer to another part of the domain name space          SOA               identifies the start of a zone of authority]
  • class

    - which is an encoded 16 bit value which identifies a protocol family or instance of a protocol. - This memo uses the following classes:
    IN the Internet system

    CH              the Chaos system
  • TTL

    • which is the time to live of the RR.
  • This field is a 32 bit integer in units of seconds, an is primarily used by resolvers when they cache RRs.

  • The TTL describes how long a RR can be cached before it should be discarded.

  • RDATA

    • which is the type and sometimes class dependent data

    • which describes the resource:

      A                 For the IN class, a 32 bit IP address                          For the CH class, a domain name followed                          by a 16 bit octal Chaos address.                                    CNAME             a domain name.        MX                a 16 bit preference value (lower is better) followed by a host name willing                          to act as a mail exchange for the owner domain.        NS                 a host name.        PTR               a domain name.        SOA               several fields.

整体采用的便是分布式的结构:

  • 主域名服务器
  • 辅助域名服务器

引用资料:

持续更新ing .....

修改时间: 2018/05/29

转载于:https://my.oschina.net/u/3744313/blog/1820737

你可能感兴趣的文章
单元测试Struts2的Action(包含源码)
查看>>
简要总结最近遇到的5个问题
查看>>
我的友情链接
查看>>
高校专业机房使用VMware Player解决方案
查看>>
oracle 11g 收缩临时表空间 temp
查看>>
我的友情链接
查看>>
Centos Development Tools 安装
查看>>
1.1.2 C++发展历程
查看>>
我的友情链接
查看>>
awk笔记
查看>>
apache使用.htaccess进行基于文件扩展名的访问控制
查看>>
Hystrix降级技术解析-Fallback
查看>>
Windows XP 禁用防火墙、系统升级、系统还原指南
查看>>
让你的电脑变成wifi
查看>>
xshell 隧道透传
查看>>
zabbix-server添加zabbix-proxy
查看>>
iostat命令找不到
查看>>
外观模式
查看>>
我的友情链接
查看>>
Angular2 AoT编译以及Rollup摇树优化
查看>>