当前位置:网站首页>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记录
边栏推荐
- Web安全开发 | 青训营笔记
- Literature reading ten - Detect Rumors on Twitter by Promoting Information Campaigns with Generative Adversarial Learn
- [CVA Valuation Training Camp] Financial Modeling Guide - Lecture 1
- [Cultivation of internal skills of string functions] strcpy + strcat + strcmp (1)
- 建模师经验分享:模型学习方法
- KT148A语音芯片ic工作原理以及芯片的内部架构描述
- 应用联合、体系化推进。集团型化工企业数字化转型路径
- Shell expect real cases
- 基于Appian低代码平台开发一个SpaceX网站
- KT6368A Bluetooth certification problem_FCC and BQB_CE_KC certification or other instructions
猜你喜欢

怎么将自己新文章自动推送给自己的粉丝(巨简单,学不会来打我)

Pytorch分布式训练/多卡/多GPU训练DDP的torch.distributed.launch和torchrun

truffle

KT148A语音芯片ic工作原理以及芯片的内部架构描述

MySQL的安装与卸载

Literature reading ten - Detect Rumors on Twitter by Promoting Information Campaigns with Generative Adversarial Learn

功耗控制之DVFS介绍

App测试和Web测试的区别

【软件测试】常用ADB命令

Xiaohei leetcode surfing: 94. Inorder traversal of binary tree
随机推荐
The role of @ Import annotations as well as how to use
[QNX Hypervisor 2.2用户手册]10.6 vdev mc146818
统计单词(DAY 101)华中科技大学考研机试题
uniapp横向选项卡(水平滚动导航栏)效果demo(整理)
一点点读懂cpufreq(一)
Cython
Since a new byte of 20K came out, I have seen what the ceiling is
对写作的一些感悟
怎么将自己新文章自动推送给自己的粉丝(巨简单,学不会来打我)
再肝3天,整理了90个 NumPy 例子,不能不收藏!
Develop a SpaceX website based on the Appian low-code platform
Day118.尚医通:订单列表、详情、支付
Some thoughts on writing
堪称奔驰“理财产品”,空间媲美宝马X5,采用了非常运动的外观
KT6368A蓝牙的认证问题_FCC和BQB_CE_KC认证或者其它说明
node中package解析、npm 命令行npm详解,node中的common模块化,npm、nrm两种方式查看源和切换镜像
Bidding Announcement | Operation and Maintenance Project of Haina Baichuang Official Account
一点点读懂cpufreq(二)
PZK学C语言之字符串函数(一)
【软件测试】常用ADB命令