当前位置:网站首页>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记录
边栏推荐
- 从单体架构迁移到 CQRS 后,我觉得 DDD 并不可怕
- KT6368A蓝牙的认证问题_FCC和BQB_CE_KC认证或者其它说明
- TypeScript - the use of closure functions
- 没有这些「伪需求」,产品经理的 KPI 怎么完成?
- The Controller layer code is written like this, concise and elegant!
- node中package解析、npm 命令行npm详解,node中的common模块化,npm、nrm两种方式查看源和切换镜像
- 一点点读懂regulator(三)
- 如何根据地址获取函数名
- 上课笔记(6)(2)——#742. 周末舞会
- @Async注解的作用以及如何实现异步监听机制
猜你喜欢

Mathematical Principles of Matrix

First, the basic concept of reptiles

大师教你3D实时角色制作流程,游戏建模流程分享

直接插入排序

Flutter启动流程(Skia引擎)介绍与使用

堪称奔驰“理财产品”,空间媲美宝马X5,采用了非常运动的外观
![[Cultivation of internal skills of string functions] strlen + strstr + strtok + strerror (3)](/img/96/946bbef52bd017ac6142c6b7485a86.png)
[Cultivation of internal skills of string functions] strlen + strstr + strtok + strerror (3)

Vscode连接远程服务器(一套配置成功)

Nuclei (2) Advanced - In-depth understanding of workflows, Matchers and Extractors
![[Cultivation of internal skills of string functions] strncpy + strncat + strncmp (2)](/img/9f/9221c081cfa86caccbbd02916a6208.png)
[Cultivation of internal skills of string functions] strncpy + strncat + strncmp (2)
随机推荐
uniapp横向选项卡(水平滚动导航栏)效果demo(整理)
golang 协程的实现原理
对“为什么一些程序员很傲慢”的解读
未上市就“一举成名”,空间媲美途昂,安全、舒适一个不落
三大技巧让你成功入门3D建模,零基础小白必看
VMware NSX 4.0 -- 网络安全虚拟化平台
使用OpenCV实现一个文档自动扫描仪
MongoDB权限验证开启与mongoose数据库配置
一点点读懂regulator(二)
统计单词(DAY 101)华中科技大学考研机试题
The Controller layer code is written like this, concise and elegant!
Linear DP (bottom)
中日颜色风格
4 - "PyTorch Deep Learning Practice" - Backpropagation
ClickHouse 二级索引
Go 语言快速入门指南:什么是 TSL 安全传输层
TypeScript - the use of closure functions
npm基本操作及命令详解
如何根据地址获取函数名
Flutter启动流程(Skia引擎)介绍与使用