当前位置:网站首页>DNS域名解析
DNS域名解析
2022-07-28 05:28:00 【花生味花生米】
前言
DNS(Domain Name System,域名系统),因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。通过主机名,最终得到该主机名对应的IP地址的过程叫做域名解析(或主机名解析)。DNS协议运行在UDP协议之上,使用端口号53。
一.DNS系统的作用
正向A记录:域名解析ip
反向P记录:ip解析域名
DNS系统的分布式数据结构
根. 根域
.com .net .org .edu .cn .uk 顶级域
.com.cn .net.cn .edu.cn 二级域
.zol.com.cn .sina.cn 子域
www mail news 主机名或者三级域
二.本地解析顺序
1.本地DNS缓存
2./etc/hosts
3./etc/resolv.conf找本地域名服务器
三.迭代查询
DNS服务器另外一种查询方式为迭代查询,但客户机发送查询请求时,DNS服务器并不直接回复
查询结果,而是告诉客户机另一台DNS服务器地址,客户机在向这台DNS服务器提交请求,依次
循环直到返回查询的结果为止。
客户机的请求需要自己挨个去查询才能得到结果,服务器没有结果时只会给你提供其他
服务器地址,而不会帮你请求查询,这与递归截然相反
1.找根域名服务器“.”
2.找顶级域名服务器.cn.
3.找二级域名服务器.com.cn.\
4.找三级域名服务器.baidu.com.cn
5.找主机名www.baidu.com.cn.
6.确认了解关系:192.168.226.129
7.返回给本地DNS服务器
8.本地DNS服务器返回给客户端
9.客户端访问baidu的同时,将解析关系缓存在本地
三.递归查询
递归查询是一种DNS服务器的查询模式,该模式下DNS服务器接收到客户机请求,必须使用一个
准确的查询结果回复客户机,如果DNS服务器本地没有存储查询DNS信息,那么该服务器会询问
其他服务器,并将返回的查询结果提交给客户机。
客户机发送请求后只需等待,中间具体交给服务器实现
四.DNS配置
1.安装DNS
2.vim /etc/named.conf
设置本地监听端口
3.vim /etc/named.rfc1912.zones
设置正向解析为主区域
4.复制到指定目录下
5.vim gwk.com.zone
记录当前DNS服务器名称
6.启动DNS![]()
7.测试结果
另一台主机将服务器的IP加入到DNS中
边栏推荐
猜你喜欢

shell脚本——正则表达式

技术分享 | 接口测试价值与体系

Vmware workstation configuration net mode

DHCP principle and configuration

shell脚本——sort、uniq、tr、数组排序、cut、eval命令配置

MOOC翁恺C语言 第六周:数组与函数:1.数组2.函数的定义与使用3.函数的参数和变量4.二维数组

Applet navigator cannot jump (debug)

Applet custom components - data, methods, and properties

Technology sharing | detailed explanation of actual combat interface test request methods get, post

Which is the best air conduction Bluetooth headset? Air conduction Bluetooth headset ranking
随机推荐
Test life | second tier cities with an annual salary of more than 40W? How did you achieve 100% salary increase under the epidemic?
QT使用MSVC编译器输出中文乱码问题
Repair the faulty sector
It is recommended to wear air conduction earphones, which do not need to wear in ear
小甲鱼C(第五章循环控制结构程序567)break和continue语句
MOOC翁恺C语言 第四周:进一步的判断与循环:3.多路分支4.循环的例子5.判断和循环常见的错误
Life cycle (process) of software testing
How about air conduction Bluetooth headset? It's the most worthwhile air conduction headset to start with
On cookies and session
Build php7 private warehouse
1、 PXE overview and installation
MOOC翁恺C语言 第四周:进一步的判断与循环:1.逻辑类型与运算2.级联和嵌套的判断
FTP service
手把手教你三步完成测试监控系统搭建
Which is the best and most cost-effective air conduction headset recommended
NFS 共享存储服务
Ubuntu18.04+Centos7配置redis主从【学习笔记】
技术分享 | 实战详解接口测试请求方式Get、post
OSI seven layer model
What is the good brand of air conduction Bluetooth headset and the best brand recommendation of air conduction headset