hello-dns/README.md

92 lines
4.6 KiB
Markdown
Raw Permalink Normal View History

2018-03-29 16:04:20 +07:00
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**
2018-03-29 03:20:38 +07:00
2018-03-29 16:04:20 +07:00
# Hello, and welcome to DNS!
This series of documents attempts to provide a correct introduction to the
Domain Name System as of 2018. The original RFCs remain the authoritative
source of normative text, but this document tries to make this venerable
protocol more accessible, while maintaining full alignment with all relevant
and useful RFCs.
This effort is developed cooperatively on GitHub, the repository can be
found [https://github.com/ahupowerdns/hello-dns/](here) and help is highly
2018-04-02 14:48:21 +07:00
welcome! Feedback can also be sent to bert.hubert@powerdns.com or
[@PowerDNS_Bert](https://twitter.com/PowerDNS_Bert).
2018-03-29 03:20:38 +07:00
2018-10-30 15:35:24 +07:00
Contributors so far include: Michał Kępień, Jan-Piet Mens, Andrew Babichev,
Jacob Hoffman-Andrews, Peter van Dijk, Nathan Froyd, Gene McCulley,
2018-11-03 03:11:31 +07:00
Charles-Henri Bruyand, jose nazario, Warren Kumari, Patrick Cloke, and
Andrew Tunnell-Jones. Thanks!
2018-10-30 15:35:24 +07:00
2018-03-29 03:20:38 +07:00
Although we start from relatively basic principles, the reader is expected
to know what IP addresses are, what a (stub) resolver is and what an
2018-03-29 06:20:13 +07:00
authoritative server is supposed to do. When in doubt: authoritative
servers 'host' DNS data, 'resolvers' look up things over at authoritative
servers and clients run 'stub resolvers' to look things up over at
resolvers. This document is aimed at developers, but may also be of aid for
administrators.
2018-03-29 03:20:38 +07:00
2018-03-29 16:04:20 +07:00
DNS was originally written down in August 1979 in '[IEN
116](https://www.rfc-editor.org/ien/ien116.txt)', part of a parallel
series of documents describing the Internet. IEN 116-era DNS is not
compatible with today's DNS. In 1983, RFC 882 and 883 were released,
describing a version of the DNS very similar but not quite interoperable
with the one we have today.
2018-03-29 03:20:38 +07:00
2018-03-29 06:11:38 +07:00
DNS attained its modern form in 1987 when RFC 1034 and 1035 were published.
2018-03-29 16:04:20 +07:00
Although much of 1034/1035 remains valid, these standards are not that easy
to read because they were written in a very different time. There are 100s
2018-03-31 01:39:30 +07:00
of pages of updates that can only be found in later documents.
2018-03-29 03:20:38 +07:00
2018-03-31 01:39:30 +07:00
The main goal of this effort is not to contradict the DNS RFCs but to
2018-03-29 06:20:13 +07:00
provide an easier entrypoint into understanding the Domain Name System.
2018-03-29 03:20:38 +07:00
2018-03-29 06:11:38 +07:00
If you will, the goal is to be a mini "[TCP/IP
2018-03-29 16:04:20 +07:00
Illustrated](https://en.wikipedia.org/wiki/TCP/IP_Illustrated)" of DNS. For
more about the philosophy of these documents, and how to contribute, please read
2018-03-29 16:24:54 +07:00
[meta.md](meta.md.html).
2018-03-29 16:04:20 +07:00
Your help & insights are highly welcome!
2018-03-29 06:11:38 +07:00
2018-03-29 06:20:13 +07:00
I want to thank Ólafur Guðmundsson and Job Snijders for their input and
enthusiasm for improving the state of DNS.
2018-03-29 03:20:38 +07:00
## Layout
2018-03-29 06:11:38 +07:00
The content is spread out over several documents:
2018-04-01 23:31:41 +07:00
* [The core of DNS](basic.md.html)
2018-03-29 16:24:54 +07:00
* [Relevant to stub resolvers and applications](stub.md.html)
* [Relevant to authoritative servers](auth.md.html)
* [Relevant to resolvers](resolver.md.html)
* [tdns: a 'from scratch' DNS library](tdns/README.md.html)
* [tauth: a minimal but feature complete authoritative server](tdns/tauth.md.html)
* [tres: a minimal but feature complete DNS resolver](tdns/tres.md.html)
2018-10-25 21:47:33 +07:00
* [C API: a C library for doing DNS queries](tdns/c-api.md.html)
2018-03-29 16:24:54 +07:00
* Optional elements: [EDNS, TSIG, Dynamic Updates, DNAME, DNS Cookies](optional.md.html)
2018-04-01 23:31:41 +07:00
* [Privacy related](privacy.md.html): QName minimization, DNS-over-TLS, DNS-over-HTTPS, EDNS Padding
2018-03-29 16:24:54 +07:00
* [DNSSEC](dnssec.md.html)
2018-04-01 23:31:41 +07:00
* [non-IETF standards](non-ietf.md.html): RRL and RPZ
* [Rare parts of DNS](rare.md.html) - not obsolete, but not frequently encountered in production
2018-03-29 06:11:38 +07:00
2018-03-29 03:20:38 +07:00
We start off with a general introduction of DNS basics: what is a resource
2018-03-29 06:20:13 +07:00
record, what is an RRSET, what is a zone, what is a zone-cut, how are packets
2018-03-29 03:20:38 +07:00
laid out. This part is required reading for anyone ever wanting to query a
nameserver or emit a valid response.
We then specialize into what applications can expect when they send
2018-10-17 11:41:36 +07:00
questions to a resolver, or what a stub resolver can expect.
2018-03-29 03:20:38 +07:00
The next part is about what an authoritative server is supposed to do. On
top of this, we describe in slightly less detail how a resolver could
2018-03-29 06:11:38 +07:00
operate. Finally, there is a section on optional elements like EDNS, TSIG,
2018-10-17 11:41:36 +07:00
Dynamic Updates and DNSSEC.
2018-03-29 03:20:38 +07:00
2018-03-29 16:04:20 +07:00
RFCs, especially earlier ones, tend to describe servers that perform both
authoritative and resolver functions. This turns out to make both code and
troubleshooting harder. Therefore, in these documents, the authoritative and
caching functions are described separately.
2018-04-01 23:31:41 +07:00
Next up: [DNS Basics](basic.md.html).
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>