# Edit below line in /var/named/zmailtech.com.zone file.
[root@master ~]# vim /var/named/zmailtech.com.zone
[root@master ~]# cat /var/named/zmailtech.com.zone
$TTL 1D
@ IN SOA ns1.zmailtech.com. admin.zmailtech.com. (
2017121501 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.zmailtech.com.
ns1 IN A 192.168.10.2
master IN A 192.168.10.2
;CNAME Record
www IN CNAME master.zmailtech.com.
ftp IN CNAME master.zmailtech.com.
smtp IN CNAME master.zmailtech.com.[root@master ~]#
After Edit CNAME Record we need to restart named service.
[root@master ~]# systemctl restart named
Now we test CNAME Record www.zmailtech.com via dig command
[root@master ~]# dig www.zmailtech.com
; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7 <<>> www.zmailtech.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52896
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 2
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.zmailtech.com. IN A
;; ANSWER SECTION:
www.zmailtech.com. 86400 IN CNAME master.zmailtech.com.
master.zmailtech.com. 86400 IN A 192.168.10.2
;; AUTHORITY SECTION:
zmailtech.com. 86400 IN NS ns1.zmailtech.com.
;; ADDITIONAL SECTION:
ns1.zmailtech.com. 86400 IN A 192.168.10.2
;; Query time: 2 msec
;; SERVER: 192.168.10.2#53(192.168.10.2)
;; WHEN: Thu Dec 14 13:18:19 IST 2017
;; MSG SIZE rcvd: 117
[root@master ~]#
Now we test CNAME Record ftp.zmailtech.com via dig command
[root@master ~]# dig ftp.zmailtech.com
; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7 <<>> ftp.zmailtech.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31273
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 2
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ftp.zmailtech.com. IN A
;; ANSWER SECTION:
ftp.zmailtech.com. 86400 IN CNAME master.zmailtech.com.
master.zmailtech.com. 86400 IN A 192.168.10.2
;; AUTHORITY SECTION:
zmailtech.com. 86400 IN NS ns1.zmailtech.com.
;; ADDITIONAL SECTION:
ns1.zmailtech.com. 86400 IN A 192.168.10.2
;; Query time: 0 msec
;; SERVER: 192.168.10.2#53(192.168.10.2)
;; WHEN: Thu Dec 14 13:19:01 IST 2017
;; MSG SIZE rcvd: 117
[root@master ~]#
Now we test CNAME Record smtp.zmailtech.com via dig command
[root@master ~]# dig smtp.zmailtech.com
; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7 <<>> smtp.zmailtech.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7689
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 2
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;smtp.zmailtech.com. IN A
;; ANSWER SECTION:
smtp.zmailtech.com. 86400 IN CNAME master.zmailtech.com.
master.zmailtech.com. 86400 IN A 192.168.10.2
;; AUTHORITY SECTION:
zmailtech.com. 86400 IN NS ns1.zmailtech.com.
;; ADDITIONAL SECTION:
ns1.zmailtech.com. 86400 IN A 192.168.10.2
;; Query time: 0 msec
;; SERVER: 192.168.10.2#53(192.168.10.2)
;; WHEN: Thu Dec 14 13:19:12 IST 2017
;; MSG SIZE rcvd: 118
[root@master ~]#
No comments:
Post a Comment