អាយធីខ្មែរស៊ែរ : itkhmershare.blogspot.com

Set CNAME

Monday, December 3, 20120 comments


If you'd like to set another name to your Host, define CNAME record in zone file.
[1] Set CNAME record in zone file.
root@dlp:~#
vi /etc/bind/server.world.lan
$TTL 86400
@   IN  SOA     dlp.server.world. root.server.world. (
# update serial

        2012042702  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
        IN  NS      dlp.server.world.
        IN  A       10.0.0.30
        IN  MX 10   dlp.server.world.

dlp     IN  A       10.0.0.30
# aliase IN CNAME server's name

ftp     IN  CNAME   dlp.server.world.

root@dlp:~#
rndc reload

server reload successful
root@dlp:~#
dig ftp.server.world.
; <<>> DiG 9.8.1-P1 <<>> ftp.server.world.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2569
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;ftp.server.world.              IN      A

;; ANSWER SECTION:
ftp.server.world.       86400   IN      CNAME   dlp.server.world.
dlp.server.world.       86400   IN      A       10.0.0.30

;; AUTHORITY SECTION:
server.world.           86400   IN      NS      dlp.server.world.

;; Query time: 1 msec
;; SERVER: 10.0.0.30#53(10.0.0.30)
;; WHEN: Fri Apr 27 16:00:06 2012
;; MSG SIZE  rcvd: 82
Share this article :

Post a Comment