????????????????????
??????????????????????????????????????????б????????????????????????????????????????????DNS????????????????
????????建???????????????????????????????????????????
????zone      "." IN {
????type hint;
????file "root.hint";
????};
????zone      "." IN {
????type hint;
????file "root.hint";
????};
????zone      "." IN {
????type hint;
????file "root.hint";
????};
????zone      "localhost" IN {
????type master;
????file "localhost.db";
????};
????????????????????????????????????????????????????????IP??????????????
????zone      "0.0.127.in-addr.arpa" IN {
????type master;
????file "127.0.0.rev";
????};
??????????????????????/etc/named.conf????????????????????????????????????????????????likegeeks.com.db?? localhost.db?? ?? 127.0.0.rev??Щ????е????????
??????Щ????????????Щ????????????DNS???????? ???????ЩDNS???????????????????????д???
????DNS???????
????????????????????SOA??NS??A??PTR??MX??CNAME??TXT????????????
????????????????????????μ????ɡ?
????SOA???????????????
????SOA??????????????????????????DNS?????
????example.com.      86400      IN      SOA      ns1.example.com.   mail.example.com.      (
????2017012604 ;serial
????86400 ;refresh?? seconds
????7200 ;retry?? seconds
????3600000 ;expire?? seconds
????86400 ;minimum?? seconds
????)
???????????????example.com????????????——??????/etc/named.conf????е???????????μ?????????????DNS??????????????????
????IN ???????????????????????????????
????SOA ??????????????????????????????????????
????ns1.example.com. ?????????????????????????????????????FQDN: Fully Qualified Domain Name)??
????mail.host.com. ???????????????????????????????????“@”?????????????????????????β???????????
??????2?????????????????????????????????????????????????????????????????????????????????????????????е??????????????????? YYYYMMDDxx ?????е? xx ??? 00 ??????
??????3?????????????????????????????????????????????????????е??????????????μ?????
??????4????????????????????????????????γ????????????????????????и??????????????????????????????????????????????????????????
??????5????????????????????????????????????????????????????????????Щ??????????????????????????????????и??£?????????????????????????????????????
??????6?и????????????????????????????????????????????????????????????á?
????NS: Name Server Records(????????????)
????NS??????????????????????????????????
???????????????д??NS?????
????IN           NS         ns1.example.com.
????IN           NS         ns2.example.com.
?????????????2??NS????????????????б??????????????
????A??AAAA: Address Records??????????
????A???????????????????IP????????support IN A 192.168.1.5??
??????????????192.168.1.5???support.example.com?????????????????????????????????????
???????????????д??????????о???
????PTR: Pointer Records?????????
????PTR?????????з??????????????????????IP??????????????????????
????????A????????????192.168.1.5 IN PTR support.example.com.
???????????????????е???????????????
????MX: Mail Exchange Records??????????????
????MX????????????????????????????????????????example.com. IN MX 10 mail.
?????????????????????????10?????????????????????????????ж????????????????н?С?????????????
????CNAME: Canonical Name Records?????????????
????CNAME??????????????????????????????????????????????????????????á?
???????????????????????????whatever-bignameis.example.com??Web????????????????????Web?????????????????????????????www??CNAME????????????
???????????????www.example.com??????????CNAME?????
????whatever-bignameis      IN           A                    192.168.1.5
????www                     IN           CNAME                whatever-bignameis
???????????DNS???????????????λ?á?????д?????????www???????
????TXT???
????????????κ?????洢??TXT????У???????????????????????????????DNS?????????????????????????
?????????????????TXT?????example.com. IN TXT ” YOUR INFO GOES HERE”.
????????RP????????????host?????????????????example.com. IN RP mail.example.com. example.com??
????DNS TTL?
??????/etc/named.conf???????????????????$TTL?????
?????????????BIND????????????TTL???time to live??????????????
???????????????λ???????????14??400??4??С????????DNS??????????????????4??С????????????DNS?????????2????
?????????????????????????????????????????????????????????
???????????????
????????д??????????????????????????????????????????
????????????????Linux DNS??????????BIND???????/var/log/messages?????????????tail????????????????????????-f???$ tail -f /var /log/messages??
?????????????д??????????/etc/named.config????????????????????????????????????????????????????
????Host????
????????????????????????????host?????????????????????
????host?????????????????????IP?????$ host example.com??
???????????????з???????$ host 192.168.1.5??
?????????this?????????в????????host??dig??????????
????Whois????
????whois????????????????????????????????e-mail?????????綽??$ whois example.com.
????Rndc????
????rndc?????????????????????????????????????????????????????????????????????
?????????????????????????????????? ???????????·?????Linux DNS????????????$ rndc status??
?????????????????κ???(zone)???????????????????????????????????????$ rndc reload example.com??
?????????????????????example.com??????? ??????????????????$ rndc reload??
?????????????????μ??????????????á? ??????????????????????????$ rndc reconfig??
????Linux DNS??????
??????????????Linux DNS?????????????????????????????????????????DNS???????????????????DNS???????????????????????IP????????????
??????Linux?????????λ??DNS???????????y?????????????/etc/resolv.conf????????????
?????????Debian????а?????????/etc/resolvconf/resolv.conf.d/????
????/etc/resolv.conf????а??????????????????DNS???????????????????
??????????????????????????????????????????(nameserver)??IP?????
??????????????и????????????????????????á? ?????BIND???????????У??????????????DNS????????
???????Linux DNS????????????? ???????????????o??????????????????