linux的缓存DNS
一、 缓存DNS
作用:缓存解析结果,加快访问
虚拟机A:为真正的DNS服务器
虚拟机B:缓存DNS服务器
虚拟机B:
[root@pc207 /]# yum -y install bind bind-chroot
[root@pc207 /]# vim /etc/named.conf
options {
directory "/var/named";
forwarders { 192.168.4.7; }; #转发给192.168.4.7
};
[root@pc207 /]# systemctl restart named
[root@pc207 /]# nslookup www.lol.com 192.168.4.207
Server: 192.168.4.207
Address: 192.168.4.207#53Non-authoritative answer: Name: www.lol.com Address: 1.2.3.4





