Reverse, cache, master-slave, and separate domain name resolution experiments

Reverse analysis

Edit zone configuration file
yum install -y bind
systemctl stop firewalld.service      //关闭防火墙
vim /etc/named.conf                //更改主配值文件

Insert picture description here


Insert picture description here


Insert picture description here
[[email protected]lhost named]# cp -p named.localhost test.com.zone
[[email protected] named]# vim test.com.zone

Insert picture description here
Modify the DNS server IP address on win10
Test on win10
Insert picture description here


Insert picture description here
[[email protected] named]# nslookup 192.168.43.100   //解析ip

Cache server

[[email protected] home]# ifconfig ens33
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.43.135  netmask 255.255.255.0  broadcast 192.168.43.255
        inet6 fe80::b99f:450f:f461:751d  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:7f:e2:cf  txqueuelen 1000  (Ethernet)
        RX packets 617488  bytes 921706213 (879.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 268897  bytes 16324895 (15.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[[email protected] home]# yum install -y bind  
[[email protected] ~]# systemctl start named        //开启named

Insert picture description here
DNS server configuration:
[[email protected] slaves]# ifconfig ens33
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.43.129  netmask 255.255.255.0  broadcast 192.168.43.255
        inet6 fe80::5fa0:eef1:92e9:a987  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:62:71:0f  txqueuelen 1000  (Ethernet)
        RX packets 627957  bytes 927366002 (884.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 283225  bytes 17278824 (16.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[[email protected] home]# yum install -y bind 
[[email protected] slaves]# vim /etc/named.conf

Insert picture description here
[[email protected] ~]# vim /etc/named.rfc1912.zones

Insert picture description here
[[email protected] ~]# cd /var/named
[[email protected] named]# ls
data  dynamic  named.ca  named.empty  named.localhost  named.loopback  slaves
[[email protected] named]# cp -p named.localhost test.com.zone 
[[email protected] named]# vim test.com.zone

Insert picture description here
[[email protected] named]# systemctl start named
[[email protected] named]# netstat -anup | grep named
udp        0      0 192.168.122.1:53        0.0.0.0:*                           80197/named         
udp        0      0 192.168.43.129:53       0.0.0.0:*                           80197/named         
udp        0      0 127.0.0.1:53            0.0.0.0:*                           80197/named         
udp6       0      0 ::1:53                  :::*                                80197/named    

win10 client configuration
Insert picture description here
Test on win10
Insert picture description here

Primary domain name server

The authoritative server of a specific DNS zone, with uniqueness
Responsible for maintaining all domain name->IP address mapping records in the zone
Need to create the address data file of the area in charge by yourself
From the domain name server
Also known as the secondary domain name server, it is a hot backup to the primary domain name server
The domain name -> IP address record maintained by it comes from the main domain name server
Need to automatically synchronize the regional address database from the main domain name server
1. Edit the configuration file from the domain name server and start the service
vim /etc/named.conf

Insert picture description here
vim /etc/named.rfc1912.zones

Insert picture description here
named-checkconf 检查
systemctl restart named  重启 
rndc reload  

linux master configuration
Insert picture description here
linux slave configuration
Insert picture description here
named-checkconf 检查
systemctl restart named  重启 
rndc reload  

The files parsed from the domain name are in l /var/named/slaves/
ll /var/named/slaves/

Insert picture description here

Separation analysis