新秀篇 ##Linux企业级高速缓存DNS配置##

本文详细介绍了Linux企业环境中如何配置高速缓存DNS服务,包括服务的下载与配置、正向和反向解析、多向解析、DNS集群、远程更新及加密以及动态域名解析(如花生壳)。通过高速缓存DNS,可以显著提升DNS解析的速度,优化网络性能。同时,文章也提及了DNS排错中的常见错误类型,如NOERROR、NXDOMAIN、SERVFAIL和REFUSED。
摘要由CSDN通过智能技术生成

高速缓存DNS:
DNS 服务器可以高速缓存从其他 DNS 服务器收到的 DNS 记录。 也可以在 DNS 客户服务中使用高速缓存,将其作为 DNS 客户端保存在最近的查询过程中得到的信息高速缓存的方法。 总的来说就是提高解析速度。
DNS排错:

它显示来自 DNS 查找的详细信息 , 其中包括为什么查询失败 :
– NOERROR : 查询成功
– NXDOMAIN : DNS 服务器提示不存在这样的名称
– SERVFAIL : DNS 服务器停机或 DNSSEC 响应验证失败
– REFUSED : DNS 服务器拒绝回答 ( 也许是出于访问控制原因 )

高速缓存DNS服务下载与配置

%%在虚拟机:
[root@foundation20 ~]# rht-vmctl view desktop                 ##记得设定IP:172.25.254.120
[root@foundation20 ~]# ssh root@172.25.254.120
root@172.25.254.120's password: 
Last login: Sat May 19 03:02:32 2018
[root@localhost ~]# hostnamectl set-hostname dns-server.example.com             ##重新命名
[root@localhost ~]# cd /etc/yum.repos.d/                 ##配置yum源
[root@localhost yum.repos.d]# ls
rhel_dvd.repo
[root@localhost yum.repos.d]# vim rhel_dvd.repo               ##编写yum源文件
%%编辑内容:
  # Created by cloud-init on Thu, 10 Jul 2014 22:19:11 +0000
  [rhel_dvd]
  gpgcheck = 0
  enabled = 1
  baseurl = http://172.25.254.250/rhel7
  name = Remote classroom copy of dvd
[root@localhost yum.repos.d]# yum search dns                 ##查找DNS安装包
Loaded plugins: langpacks
rhel_dvd                                                 | 4.1 kB     00:00     
(1/2): rhel_dvd/group_gz                                   | 134 kB   00:00     
(2/2): rhel_dvd/primary_db                                 | 3.4 MB   00:00     
=============================== N/S matched: dns ===============================
dnsmasq.x86_64 : A lightweight DHCP/caching DNS server
dnssec-trigger.x86_64 : NetworkManager plugin to update/reconfigure DNSSEC
                      : resolving
kdenetwork-kdnssd.x86_64 : Kdnssd
ldns.i686 : Low-level DNS(SEC) library with API
ldns.x86_64 : Low-level DNS(SEC) library with API
perl-Net-DNS.x86_64 : DNS resolver modules for Perl
python-dns.noarch : DNS toolkit for Python
bind.x86_64 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System)
            : server
bind-chroot.x86_64 : A chroot runtime environment for the ISC BIND DNS server,
                   : named(8)
bind-libs.i686 : Libraries used by the BIND DNS packages
bind-libs.x86_64 : Libraries used by the BIND DNS packages
bind-libs-lite.i686 : Libraries for working with the DNS protocol
bind-libs-lite.x86_64 : Libraries for working with the DNS protocol
bind-license.noarch : License of the BIND DNS suite
bind-utils.x86_64 : Utilities for querying DNS name servers
c-ares.i686 : A library that performs asynchronous DNS operations
c-ares.x86_64 : A library that performs asynchronous DNS operations
seahorse-sharing.x86_64 : Sharing of PGP public keys via DNS-SD and HKP
unbound.x86_64 : Validating, recursive, and caching DNS(SEC) resolver

  Name and summary matches only, use "search all" for everything.
[root@localhost yum.repos.d]# yum install bind.x86_64                ##下载DNS安装包
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 32:9.9.4-14.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package       Arch            Version                  Repository         Size
================================================================================
Installing:
 bind          x86_64          32:9.9.4-14.el7          rhel_dvd          1.8 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 1.8 M
Installed size: 4.3 M
Is this ok [y/d/N]: y
Downloading packages:
bind-9.9.4-14.el7.x86_64.rpm                               | 1.8 MB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 32:bind-9.9.4-14.el7.x86_64                                  1/1 
  Verifying  : 32:bind-9.9.4-14.el7.x86_64                                  1/1 

Installed:
  bind.x86_64 32:9.9.4-14.el7                                                   

Complete!                                          ##下载成功
[root@localhost yum.repos.d]# rpm -qc bind         ##查找DNS服务系统文件
/etc/logrotate.d/named
/etc/named.conf                               ##DNS系统文件
/etc/named.iscdlv.key
/etc/named.rfc1912.zones
/etc/named.root.key
/etc/rndc.conf
/etc/rndc.key
/etc/sysconfig/named
/var/named/named.ca
/var/named/named.empty
/var/named/named.localhost
/var/named/named.loopback
[root@localhost yum.repos.d]# vim /etc/named.conf              ##编写DNS系统文件
            @@@@@@@@@@@编辑内容:
                      11         listen-on port 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值