当前位置:网站首页>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记录
边栏推荐
- Mathematical Principles of Matrix
- [Cultivation of internal skills of string functions] strcpy + strcat + strcmp (1)
- 2022年华数杯数学建模
- 吐槽 | 参加IT培训的正确姿势
- uniapp 分享功能-分享给朋友群聊朋友圈效果(整理)
- MongoDB权限验证开启与mongoose数据库配置
- 三、实战---爬取百度指定词条所对应的结果页面(一个简单的页面采集器)
- 为何越来越多人选择进入软件测试行业?深度剖析软件测试的优势...
- Pytest learning - fixtures
- How to burn the KT148A voice chip into the chip through the serial port and the tools on the computer
猜你喜欢
小黑leetcode冲浪:94. 二叉树的中序遍历
一点点读懂thermal(一)
Implementing class target method exception using proxy object execution
3年,从3K涨薪到20k?真是麻雀啄了牛屁股 — 雀食牛逼呀
3. Actual combat---crawl the result page corresponding to Baidu's specified entry (a simple page collector)
Ab3d.PowerToys and Ab3d.DXEngine Crack
Uniapp dynamic sliding navigation effect demo (finishing)
【七夕快乐篇】Nacos是如何实现服务注册功能的?
KT148A语音芯片ic工作原理以及芯片的内部架构描述
学会反射后,我被录取了(干货)
随机推荐
堪称奔驰“理财产品”,空间媲美宝马X5,采用了非常运动的外观
游戏3D建模入门,有哪些建模软件可以选择?
一点点读懂thermal(一)
Will we still need browsers in the future?(feat. Maple words Maple language)
d枚举生成位
Literature reading ten - Detect Rumors on Twitter by Promoting Information Campaigns with Generative Adversarial Learn
注解@EnableAutoConfiguration的作用以及如何使用
KT148A语音芯片怎么烧录语音进入芯片里面通过串口和电脑端的工具
.net(C#)获取两个日期间隔的年月日
Vscode连接远程服务器(一套配置成功)
C5750X7R2E105K230KA(电容器)MSP430F5249IRGCR微控制器资料
Basic web in PLSQL
KT6368A蓝牙的认证问题_FCC和BQB_CE_KC认证或者其它说明
没有这些「伪需求」,产品经理的 KPI 怎么完成?
The Controller layer code is written like this, concise and elegant!
First, the basic concept of reptiles
Xiaohei leetcode surfing: 94. Inorder traversal of binary tree
uniapp 分享功能-分享给朋友群聊朋友圈效果(整理)
[QNX Hypervisor 2.2用户手册]10.6 vdev mc146818
【CVA估值训练营】财务建模指南——第一讲