Открываю для себя bind, хочу сделать кэширующий DNS.
Обнаружил долгий первый запрос к DNS.
Это особенность bind?
конфиг
options {
directory "/var/cache/bind";
forward only;
forwarders {
8.8.8.8;
208.67.222.222;
};
dnssec-validation auto;
auth-nxdomain no;
listen-on-v6 { none; };
};
Долгий ответ bind, потом в кэше будет быстрый
# dig @127.0.0.1 yandex.ru
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @127.0.0.1 yandex.ru
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60417
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;yandex.ru. IN A
;; ANSWER SECTION:
yandex.ru. 230 IN A 77.88.55.66
yandex.ru. 230 IN A 5.255.255.5
yandex.ru. 230 IN A 5.255.255.55
yandex.ru. 230 IN A 77.88.55.55
;; Query time: 357 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Apr 26 17:03:20 2016
;; MSG SIZE rcvd: 91
Быстрые ответы с DNS
dig @8.8.8.8 yandex.ru
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @8.8.8.8 yandex.ru
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57713
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;yandex.ru. IN A
;; ANSWER SECTION:
yandex.ru. 9 IN A 77.88.55.66
yandex.ru. 9 IN A 77.88.55.55
yandex.ru. 9 IN A 5.255.255.55
yandex.ru. 9 IN A 5.255.255.5
;; Query time: 29 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Apr 26 16:56:57 2016
;; MSG SIZE rcvd: 91
# dig @208.67.222.222 yandex.ru
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @208.67.222.222 yandex.ru
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36045
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;yandex.ru. IN A
;; ANSWER SECTION:
yandex.ru. 8 IN A 5.255.255.55
yandex.ru. 8 IN A 5.255.255.5
yandex.ru. 8 IN A 77.88.55.66
yandex.ru. 8 IN A 77.88.55.55
;; Query time: 69 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Tue Apr 26 16:57:33 2016
;; MSG SIZE rcvd: 91