Pdnsd adalah DNS cache proxy...Proses meminta terjemahan nama domain ke IP address ini dari komputer kita ke DNS server ISP tidak lama, rata-rata memakan waktu 500 milidetik, alias setengah detik. namun bayangkan jika DNS server ISP itu bisa kita pindahkan ke dalam jaringan lokal di rumah, maka proses penerjemahan nama domain tadi bisa disingkat sampai cuma tinggal 1 milidetik. jika seharian kita melakukan ratusan permintaan penerjemahan nama domain, banyak waktu yang bisa dihemat jika DNS server-nya ada di jaringan lokal.
untuk mengetahui berapa lama proses yang dibutuhkan untuk melakukan penerjemahan nama domain ini, di linux maupun mac bisa digunakan perintah dig.
Senang bisa selalu berbagi.... Semoga bermanfaat ^_^
untuk mengetahui berapa lama proses yang dibutuhkan untuk melakukan penerjemahan nama domain ini, di linux maupun mac bisa digunakan perintah dig.
dig google.com
; <<>> DiG 9.7.3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5015
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 160 IN A 209.85.175.104
google.com. 160 IN A 209.85.175.105
google.com. 160 IN A 209.85.175.106
google.com. 160 IN A 209.85.175.147
google.com. 160 IN A 209.85.175.99
google.com. 160 IN A 209.85.175.103
;; Query time: 370 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 29 12:06:08 2011
;; MSG SIZE rcvd: 124
lama Query bisa dilihat dari Query time...untuk keperluan DNS caching ini, saya memilih menggunakan pdnsd, dan supaya efektif, saya akan menggunakan ipkungfu agar semua kueri DNS yang terjadi di jaringan lokal saya akan selalu dilewatkan ke pdnsd, walaupun komputer klien tersebut secara eksplisit meminta server DNS yang lain. unduh paket pdnsd: ;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5015
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 160 IN A 209.85.175.104
google.com. 160 IN A 209.85.175.105
google.com. 160 IN A 209.85.175.106
google.com. 160 IN A 209.85.175.147
google.com. 160 IN A 209.85.175.99
google.com. 160 IN A 209.85.175.103
;; Query time: 370 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 29 12:06:08 2011
;; MSG SIZE rcvd: 124
sudo apt-get install pdnsd
sunting berkas pdnsd sbb; sudo gedit /etc/pdnsd.conf
Terlihat seperti ini; // Read the pdnsd.conf(5) manpage for an explanation of the options.
/* Note: this file is overriden by automatic config files when
/etc/default/pdnsd AUTO_MODE is set and that
/usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
*/
global {
perm_cache=2048;
cache_dir="/var/cache/pdnsd";
run_as="pdnsd";
server_ip = 127.0.0.1; // Use eth0 here if you want to allow other
// machines on your network to query pdnsd.
status_ctl = on;
paranoid=on;
// query_method=tcp_udp; // pdnsd must be compiled with tcp
// query support for this to work.
min_ttl=15m; // Retain cached entries at least 15 minutes.
max_ttl=1w; // One week.
timeout=10; // Global timeout option (10 seconds).
// Don't enable if you don't recurse yourself, can lead to problems
// delegation_only="com","net";
}
/* with status_ctl=on and resolvconf installed, this will work out from the box
this is the recommended setup for mobile machines */
server {
label="resolvconf";
}
/*
// This section is meant for resolving from root servers.
server {
label = "google";
root_server=on;
ip = 8.8.8.8;
, 180.131.144.144;
, 4.4.4.4;
, 180.131.145.145;
, 208.67.222.222;
, 202.134.0.61;
, 208.67.220.220;
;
timeout = 5;
uptest = ping;
interval = 30; // Test every half hour.
ping_timeout = 300; // 30 seconds.
purge_cache = off;
exclude = .localdomain;
policy = included;
preset = off;
}
*/
source {
owner=localhost;
// serve_aliases=on;
file="/etc/hosts";
}
rr {
name=localhost;
reverse=on;
a=127.0.0.1;
owner=localhost;
soa=localhost,root.localhost,42,86400,900,86400,86400;
}
/*
neg {
name=doubleclick.net;
types=domain; // This will also block xxx.doubleclick.net, etc.
}
*/
/*
neg {
name=bad.server.com; // Badly behaved server you don't want to connect to.
types=A,AAAA;
}
*/
/* vim:set ft=c: */
lalu sunting berkas /* Note: this file is overriden by automatic config files when
/etc/default/pdnsd AUTO_MODE is set and that
/usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
*/
global {
perm_cache=2048;
cache_dir="/var/cache/pdnsd";
run_as="pdnsd";
server_ip = 127.0.0.1; // Use eth0 here if you want to allow other
// machines on your network to query pdnsd.
status_ctl = on;
paranoid=on;
// query_method=tcp_udp; // pdnsd must be compiled with tcp
// query support for this to work.
min_ttl=15m; // Retain cached entries at least 15 minutes.
max_ttl=1w; // One week.
timeout=10; // Global timeout option (10 seconds).
// Don't enable if you don't recurse yourself, can lead to problems
// delegation_only="com","net";
}
/* with status_ctl=on and resolvconf installed, this will work out from the box
this is the recommended setup for mobile machines */
server {
label="resolvconf";
}
/*
// This section is meant for resolving from root servers.
server {
label = "google";
root_server=on;
ip = 8.8.8.8;
, 180.131.144.144;
, 4.4.4.4;
, 180.131.145.145;
, 208.67.222.222;
, 202.134.0.61;
, 208.67.220.220;
;
timeout = 5;
uptest = ping;
interval = 30; // Test every half hour.
ping_timeout = 300; // 30 seconds.
purge_cache = off;
exclude = .localdomain;
policy = included;
preset = off;
}
*/
source {
owner=localhost;
// serve_aliases=on;
file="/etc/hosts";
}
rr {
name=localhost;
reverse=on;
a=127.0.0.1;
owner=localhost;
soa=localhost,root.localhost,42,86400,900,86400,86400;
}
/*
neg {
name=doubleclick.net;
types=domain; // This will also block xxx.doubleclick.net, etc.
}
*/
/*
neg {
name=bad.server.com; // Badly behaved server you don't want to connect to.
types=A,AAAA;
}
*/
/* vim:set ft=c: */
sudo gedit /etc/default/pdnsd
dan buat baris ini: START_DAEMON=yes. setelah itu, aktifkan pdnsd: sudo service pdnsd start
Berkas diatas adalah hasil conf yang telah saya rubah,, jika kalian ingin merubahnya kembali silahkan; Kemudian edit dhclient; sudo gedit /etc/dhcp3/dhclient.conf
Kemudian tambahkan sbb; prepend domain-name-servers 127.0.0.1;
Jika anda memakai speedy bisa lakukan seperti berikut; subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 192.168.0.1;
option domain-name "mshome.net";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
setelah itu, restart dhcp3-server: range 192.168.0.100 192.168.0.200;
option domain-name-servers 192.168.0.1;
option domain-name "mshome.net";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
sudo service dhcp3-server restart
namun bagaimana untuk klien yang “bandel”, yang suka menentukan sendiri DNS server apa yang mau dipakai? ini bisa ditangani dengan membelokkan outgoing request di port 53 TCP/UDP ke pdnsd memanfaatkan fasilitas redirection yang ada di ipkungfu. sudo apt-get install ipkungfu
sunting berkas ipkungfu sudo gedit /etc/ipkungfu/redirect.conf
lalu tambahkan 2 baris berikut: udp:53:53:internal # dns
tcp:53:53:internal # dns
jalankan ipkungfu kembali agar dia mendeteksi perubahan konfigurasi. tcp:53:53:internal # dns
sudo ipkungfu
setelah semua terconfigurasi bisa dilihat query sbb dengan menjalankan dig google.com; ; <<>> DiG 9.7.3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1172
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 897 IN A 209.85.175.104
google.com. 897 IN A 209.85.175.105
google.com. 897 IN A 209.85.175.106
google.com. 897 IN A 209.85.175.147
google.com. 897 IN A 209.85.175.99
google.com. 897 IN A 209.85.175.103
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 29 12:23:25 2011
;; MSG SIZE rcvd: 124
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1172
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 897 IN A 209.85.175.104
google.com. 897 IN A 209.85.175.105
google.com. 897 IN A 209.85.175.106
google.com. 897 IN A 209.85.175.147
google.com. 897 IN A 209.85.175.99
google.com. 897 IN A 209.85.175.103
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 29 12:23:25 2011
;; MSG SIZE rcvd: 124
Senang bisa selalu berbagi.... Semoga bermanfaat ^_^
28 Agustus 2011
//
Label:
Speed_up
//
0
komentar
//
0 komentar to "Speed up koneksi Internet dengan "pdnsd""





Posting Komentar