Domain Name System (DNS) adalah distribute database system yang digunakan untuk pencarian nama komputer (name resolution) di jaringan yang mengunakan TCP/IP (Transmission Control Protocol/Internet Protocol). DNS biasa digunakan pada aplikasi yang terhubung ke Internet seperti web browser atau e-mail, dimana DNS membantu memetakan host name sebuah komputer ke IP address. Selain digunakan di Internet, DNS juga dapat di implementasikan ke private network atau intranet.
Fungsi dari DNS adalah menerjemahkan nama komputer ke IP address (memetakan). Client DNS disebut dengan resolvers dan DNS server disebut dengan name servers. Resolvers atau client mengirimkan permintaan ke name server berupa queries. Name server akan memproses dengan cara mencek ke local database DNS, menghubungi name server lainnya atau akan mengirimkan message failure jika ternyata permintaan dari client tidak ditemukan. Proses tersebut disebut dengan Forward Lookup Query, yaitu permintaan dari client dengan cara memetakan nama komputer (host) ke IP address.
Cara kerja DNS :
a) Resolvers mengirimkan queries ke name server
b) Name server mencek ke local database, atau menghubungi name server lainnya, jika ditemukan akan diberitahukan ke resolvers jika tidak akan mengirimkan failure message
c) Resolvers menghubungi host yang dituju dengan menggunakan IP address yang diberikan name server
a) Resolvers mengirimkan queries ke name server
b) Name server mencek ke local database, atau menghubungi name server lainnya, jika ditemukan akan diberitahukan ke resolvers jika tidak akan mengirimkan failure message
c) Resolvers menghubungi host yang dituju dengan menggunakan IP address yang diberikan name server
Setting DNS Server :
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file named.conf
#vi /etc/named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "suspensi.net" IN {
type master;
file "suspensi.zone";
allow-update { none; };
};
zone "30.124.219.in-addr.arpa" IN {
type master;
file "suspensi.local";
allow-update { none; };
};
include "/etc/rndc.key";
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file named.conf
#vi /etc/named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "suspensi.net" IN {
type master;
file "suspensi.zone";
allow-update { none; };
};
zone "30.124.219.in-addr.arpa" IN {
type master;
file "suspensi.local";
allow-update { none; };
};
include "/etc/rndc.key";
2. Copy-kan file localhost.zone menjadi file suspensi.zone
#cd /var/named/
#cp localhost.zone suspensi.zone
3. Copy-kan file named.local menjadi file suspensi.local
#cd /var/named/
#cp named.local suspensi.local
4. Setting file suspensi.zone
#vi /var/named/suspensi.zone
$TTL 86400
$ORIGIN suspensi.net.
@ 1D IN SOA suspensi.net. root.suspensi.net. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS suspensi.net.
1D IN A 219.124.30.219
www IN A 219.124.30.219
ftp IN A 219.124.30.219
mail IN A 219.124.30.219
5. Setting file suspensi.local
#vi /var/named/suspensi.local
$TTL 86400
@ IN SOA suspensi.net. root.suspensi.net. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS suspensi.net.
219 IN PTR suspensi.net.
219 IN PTR www.suspensi.net.
219 IN PTR ftp.suspensi.net.
6. Setting file hosts
#vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
219.124.30.219 suspensi.net server
7. Setting file resolv.conf
#vi /etc/resolv.conf
nameserver 219.124.30.219
nameserver 202.134.1.10
nameserver 202.134.0.155
search suspensi.net
domain suspensi.net
#vi /etc/resolv.conf
nameserver 219.124.30.219
nameserver 202.134.1.10
nameserver 202.134.0.155
search suspensi.net
domain suspensi.net
8. Restart service namcd
#service named restart
9. Cek DNS#service named restart
#nslookup –sil
> suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53
Name: suspensi.net
Address: 219.124.30.219
> www.suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53
Name: www.suspensi.net
Address: 219.124.30.219
> ftp.suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53
Name: ftp.suspensi.net
Address: 219.124.30.219
> mail.suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53
Name: mail.suspensi.net
Address: 219.124.30.219
Tidak ada komentar:
Posting Komentar