当前位置:网站首页>Detailed explanation of common DNS resource record types
Detailed explanation of common DNS resource record types
2022-08-04 23:44:00 【China Science and Technology Tripartite】
The vast majority of Internet access is based on domain names,Internet access is based on IP来实现的,因此,There needs to be a way to resolve domain names into IP的机制,Let users use the domain name to access,Automatically convert the domain name to the corresponding oneIP,这就是DNS的功能.
DNS的基础概念
DNS:Domain Name Service,基于C/S模式的域名解析服务,应用层协议;监听在53/udp,53/tcp端口;TCP用来区域传送; UDP用来解析.
区域(zone)和域(domain)
Region is a physical concept,Domains are logical concepts.
比如:sfn.cn.这个域
FQDN–>IP:
The forward parsing library and the functionality of forward parsing,It is a forward analytical area.
IP–>FQDN:
Reverse parsing library and reverse parsing functionality,It is a reverse parsing area.
一般而言,A domain is divided into a forward resolution area and a reverse resolution area,But pure domains are not necessarily larger than regions,Because of the area of the parent domain,Possibly larger than the subdomain's domain.
区域数据库文件
Primarily documented by resources(RR,resource record)组成.
Common resource record types:SOA、NS、MX、A、AAAA、PTR、CNAME.
SOA:start of authority,起始授权记录,一个区域解析库有且只能有一个SOA记录,And must be placed in the first item of all resource records.
NS:name service,域名服务记录,A zone resolution library can have more than oneNS记录,一个NSThe record represents oneDNS服务器,One of the main ones,The rest are supplementary.
MX:mail exchanger,邮件交换器,A record that identifies the address of the mail server within the domain,MX记录可以有多个,其MX记录有优先级的概念,优先级 0-99,数字越小,优先级越高.
A:address,地址记录,也就是从FQDN–>IPv4
AAAA:address,地址记录,从FQDN–>IPv6
PTR:pointer,主要用于实现IP–>FQDN
CNAME:别名记录.
The definition format of the resource record
语法:NAME [TTL] IN RR_TYPE VALUE
SOA记录:
NAME:当前区域的名字,例如:sfn.cn. Or if it's a reverse zone,则 1.168.192.in-addr.arpa.
VALUE:有多部分组成
<1>当前区域的区域名称(也可以使用主DNS服务器名称);
<2>当前区域的管理员的邮箱地址,但地址中不能使用@符号,General use of dots.来替代;
<3>The definition of the coordination properties of the master-slave service and the cache time of negative answers,Use the entire content()括号括起来,Available after each line of content;A semicolon indicates that the following are comments.
完整的SOAExample record definition:
sfn.cn. 86400 IN SOA sfn.cn. admin.sfn.cn (
2016091801 //代表序列号,不能超过10位
2H //Represents the refresh interval for synchronizing data from the slave to the master,此处表示2小时
10M //Indicates when the primary server cannot be contacted,The interval between when the slave server contacts the master server again,10分钟
1W //表示过期时间,That is, the maximum waiting time when the server is always unable to contact the main server,That is, after this time,It is determined that the primary server is faulty,Then the slave server also stops the service,1周
1D //Indicates how long to cache negative answers,1天
)
NS记录:
可有多个NS记录,一个NS记录对应一个DNS服务器,每个NSThe record should have a correspondingA记录.
NAME:当前区域的区域名称
VALUE:当前区域的某DNS服务器的名字,例如ns1.sfn.cn
例如:
sfn.cn. 86400 IN NS ns1.sfn.cn.
sfn.cn. 86400 IN NS ns2.sfn.cn.
MX记录:
MX记录可以有多个,一个MXThe record corresponds to a mail server,每个记录的VALUE之前应该有一个数字,Used to indicate its priority,数字越小,优先级越高.每个MXThe record should have a correspondingA记录.
NAME:当前区域的区域名称
VALUE:The hostname of a mail server in the current region
例如:
sfn.cn. IN MX 5 mail1.sfn.cn.
sfn.cn. IN MX 20 mail2.sfn.cn.
A记录:
FQDN–>IPv4
NAME:某FQDN,如:web.sfn.cn.
VALUE:某IPv4地址
例如:
web.sfn.cn. IN A 1.1.1.1
web.sfn.cn. IN A 1.1.1.2
bbs.sfn.cn. IN A 1.1.1.2
There can be more than one host quotaIP,一个IPThere can also be multiple hostnames
*.sfn.cn. IN A 10.1.32.1
Indicates that everything that is not previously defined separately will be parsed10.1.32.1
sfn.cn. IN A 10.1.32.1
Indicates when the user accesses the domain name without any characters before it,That is, direct accesssfn.cn.The address resolved to is 10.1.32.1
G E N E R A T E 1 − 254 s e r v e r GENERATE 1-254 server GENERATE1−254server IN A 1.1.1.$
表示将server1.sfn.cn. 解析的地址为1.1.1.1
server2.sfn.cn. 解析的地址为1.1.1.2
server3.sfn.cn. 解析为1.1.1.3
….
server254.sfn.cn. 解析为1.1.1.254
同理:
G E N E R A T E 5 − 20 t e s t GENERATE 5-20 test GENERATE5−20test IN A 1.1.1.2$
表示将test5.sfn.cn. 解析的地址为1.1.1.25
test6.sfn.cn. 解析的地址为1.1.1.26
test7.sfn.cn. 解析为1.1.1.27
….
test20.sfn.cn. 解析为1.1.1.220
AAAA记录:
FQDN–>IPv6地址,定义方式与A记录类似
PTR记录:
反向解析记录
NAME:IP地址,有特定格式,IP反过来写,And to add a specific suffix,如:192.168.1.2The records should be written2.1.168.192.in-addr.arpa.
VALUE:为FQDN
例如:
2.1.168.192.in-addr.arpa. IN PTR bbs.sfn.cn.
CNAME记录:
别名记录
FQDN格式的别名;
VALUE:FQDNThe formal name of the format
例如:
web.sfn.cn. IN CNAME www.sfn.cn.
表示web.sfn.cn.是www.sfn.cn.的别名
注意:
<1>TTLValues can be inherited from the global,It is not necessary to define each record individually
<2>@Can be used to indicate the name of the current region
<3>two adjacent records,其NAME相同时,The latter recordNAME可以省略
<4>任何MX、NSand other types of recordsvalue为一个FQDN,此FQDN应该有一个A记录
边栏推荐
猜你喜欢
[CVA Valuation Training Camp] Financial Modeling Guide - Lecture 1
Flutter启动流程(Skia引擎)介绍与使用
[Cultivation of internal skills of memory operation functions] memcpy + memmove + memcmp + memset (4)
Ab3d.PowerToys and Ab3d.DXEngine Crack
jenkins发送邮件系统配置
golang 协程的实现原理
【SSR服务端渲染+CSR客户端渲染+post请求+get请求+总结】
Develop a SpaceX website based on the Appian low-code platform
Security software Avast and Symantec NortonLifeLock merge with UK approval, market value soars 43%
三、实战---爬取百度指定词条所对应的结果页面(一个简单的页面采集器)
随机推荐
The market value of 360 has evaporated by 390 billion in four years. Can government and enterprise security save lives?
what is MVCC
容联云发送短信验证码
[CVA Valuation Training Camp] Financial Modeling Guide - Lecture 1
2022年华数杯数学建模
IDEA 文件编码修改
【软件测试】常用ADB命令
建模师经验分享:模型学习方法
KT148A语音芯片怎么烧录语音进入芯片里面通过串口和电脑端的工具
一点点读懂regulator(二)
【七夕快乐篇】Nacos是如何实现服务注册功能的?
[QNX Hypervisor 2.2用户手册]10.5 vdev ioapic
uniapp 分享功能-分享给朋友群聊朋友圈效果(整理)
Will we still need browsers in the future?(feat. Maple words Maple language)
The role of the annotation @ EnableAutoConfiguration and how to use
Kernel函数解析之kernel_restart
[Cultivation of internal skills of memory operation functions] memcpy + memmove + memcmp + memset (4)
jenkins发送邮件系统配置
SQL关联表更新
d枚举生成位