诗人做的网站,wordpress 观点评价插件,营销型网站建设+课程,手机上做整蛊网站unit5.DNS域名解析服务的部署及优化方案
1. (问答题) 1.配置2台服务器要求如下#xff1a; a#xff09;服务器1#xff1a; 主机名#xff1a;dns-master.timinglee.org ip地址#xff1a; 172.25.254.100 配置好软件仓库 b#xff09;服务器2#xff1a; 主机名…unit5.DNS域名解析服务的部署及优化方案
1. (问答题) 1.配置2台服务器要求如下 a服务器1 主机名dns-master.timinglee.org ip地址 172.25.254.100 配置好软件仓库 b服务器2 主机名dns-slave.timinglee.org ip地址172.25.254.200 配置好软件仓库
2.dns-master是一台权威dns次dns要具备一下功能 a可以解析timinglee.org域中的主机此域中的主机列表为 172.25.254.100 bbs.timinglee.org 172.25.254.200 login.timinglee.org b可以为timinglee.org这个域提供邮件解析记录邮件服务器的地址为172.25.254.10 c可以为172.25.254.0/24网段提供反向解析记录反向解析记录为 172.25.254.100 bbs.timinglee.org 172.25.254.200 login.timinglee.org
3.dns-slave主机是dns-master主机的辅助dns当master主机中的数据发生变化后其内容自动发生改变
一, a服务器1dns-master.timinglee.org配置
1.设置主机名 [rootserver ~]# hostnamectl set-hostname dns-master.timinglee.org [rootserver ~]# reboot 结果: [rootdns-master ~]#
2.配置网络 [rootdns-master ~]# ifconfig ens160: [rootdns-master ~]# vim /etc/NetworkManager/system-connections/ens160.nmconnection [rootdns-master ~]# systemctl restart NetworkManager 在vim中: ... [ipv4] address1192.168.187.131/24,192.168.187.2 address2172.25.254.100/24 methodmanual ...
3.安装BIND [rootdns-master ~]# yum install bind -y
4.启动BIND [rootdns-master ~]# systemctl enable --now named [rootdns-master ~]# firewall-cmd --permanent --add-servicedns [rootdns-master ~]# firewall-cmd --reload 结果: Created symlink /etc/systemd/system/multi-user.target.wants/named.service → /usr/lib/systemd/system/named.service. success success
b服务器2为1在配置前的克隆dns-slave.timinglee.org配置
1.设置主机名 [rootnote ~]# hostnamectl set-hostname dns-slave.timinglee.org [rootnote ~]# reboot [rootdns-slave ~]#
2.配置网络 [rootdns-slave ~]# vim /etc/NetworkManager/system-connections/ens160.nmconnection [rootdns-slave~]# systemctl restart NetworkManager 在vim中: ... [ipv4] address1192.168.187.132/24,192.168.187.2 address2172.25.254.200 methodmanual ...
3.安装BIND [rootdns-slave ~]# yum install bind -y 4.启动BIND [rootdns-slave ~]# systemctl enable --now named [rootdns-slave ~]# firewall-cmd --permanent --add-servicedns [rootdns-slave ~]# firewall-cmd --reload 结果: Created symlink /etc/systemd/system/multi-user.target.wants/named.service → /usr/lib/systemd/system/named.service. success success 二, a)b)c) [rootdns-master ~]# vim /etc/named.rfc1912.zones 在vim中 ... // 正向维护的域 zone timinglee.org IN { type master; file timinglee.org.zone; allow-update { none; }; also-notify { 172.25.254.200; }; };
// 反向维护的域 zone 254.25.172.in-addr.arpa IN { type master; file 172.25.254.ptr; allow-update { none; }; }; ... [rootdns-master ~]# cd /var/named 生成正向解析A记录文件 [rootdns-master named]# cp -p named.localhost timinglee.org.zone [rootdns-master named]# vim timinglee.org.zone 在vim中: ... IN SOA dns.timinglee.org. root.timinglee.org. ( ... NS dns.timingless.org. dns A 172.25.254.100 www CNAME bbs.timinglee.org. bbs.timinglee.org. A 172.25.254.100 login.timinglee.org. A 172.25.254.200 timinglee.org. MX 1 172.25.254.100
... 生成反向解析A记录文件 [rootdns-master named]# cp -p named.localhost 172.25.254.ptr [rootdns-master named]# vim 172.25.254.ptr 在vim中: ... NS dns.timingless.org. dns A 172.25.254.100 100 PTR bbs.timinglee.org. 200 PTR login.timinglee.org. ... 三, [rootdns-slave named]# vim /etc/named.rfc1912.zones 在vim中: ... zone timinglee.org IN { type slave; file slaves/timinglee.org.zone; masters{172.25.254.100}; allow-update { none; }; }; ... 测试: 服务重启: [rootdns-master named]# systemctl restart named 正向解析: [rootdns-master named]# dig -t A www.timinglee.org 172.25.254.100
; DiG 9.16.23-RH -t A www.timinglee.org 172.25.254.100 ;; global options: cmd ;; Got answer: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 37416 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: 6284fdc316a458ec01000000663a5ffaab319d9a34f6e30e (good) ;; QUESTION SECTION: ;www.timinglee.org. IN A
;; ANSWER SECTION: www.timinglee.org. 86400 IN CNAME bbs.timinglee.org. bbs.timinglee.org. 86400 IN A 172.25.254.100
;; Query time: 1 msec ;; SERVER: 172.25.254.100#53(172.25.254.100) ;; WHEN: Wed May 08 01:08:10 CST 2024 ;; MSG SIZE rcvd: 108 邮件解析: [rootdns-master named]# dig -t MX timinglee.org 172.25.254.100
; DiG 9.16.23-RH -t MX timinglee.org 172.25.254.100 ;; global options: cmd ;; Got answer: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 7445 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: 3b15c838a778927301000000663a611aad06a8b1e6f1f29b (good) ;; QUESTION SECTION: ;timinglee.org. IN MX
;; ANSWER SECTION: timinglee.org. 86400 IN MX 1 172.25.254.10.timinglee.org.
;; Query time: 1 msec ;; SERVER: 172.25.254.100#53(172.25.254.100) ;; WHEN: Wed May 08 01:12:58 CST 2024 ;; MSG SIZE rcvd: 113
反向解析: [rootdns-master named]# dig -x 172.25.254.200 172.25.254.100
; DiG 9.16.23-RH -x 172.25.254.200 172.25.254.100 ;; global options: cmd ;; Got answer: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 61968 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: fc96105ee08c255201000000663a6093606625f73287f01a (good) ;; QUESTION SECTION: ;200.254.25.172.in-addr.arpa. IN PTR
;; ANSWER SECTION: 200.254.25.172.in-addr.arpa. 86400 IN PTR login.timinglee.org.
;; Query time: 2 msec ;; SERVER: 172.25.254.100#53(172.25.254.100) ;; WHEN: Wed May 08 01:10:43 CST 2024 ;; MSG SIZE rcvd: 117