2005/07/31 DNS Tutorial @ IETF-63
- gud@ogud.com & pk@denic.de
1
DNS Tutorial @ IETF-63
Ólafur Gudmundsson
OGUD consulting
Peter Koch
DENIC
DNS Tutorial @ IETF-63 lafur Gudmundsson OGUD consulting Peter - - PowerPoint PPT Presentation
DNS Tutorial @ IETF-63 lafur Gudmundsson OGUD consulting Peter Koch DENIC 1 2005/07/31 DNS Tutorial @ IETF-63 ogud@ogud.com & pk@denic.de Tutorial Overview Goal: Give the audience basic understanding of DNS to be able to
2005/07/31 DNS Tutorial @ IETF-63
1
OGUD consulting
DENIC
2005/07/31 DNS Tutorial @ IETF-63
2
2005/07/31 DNS Tutorial @ IETF-63
3
– does not need to match or be up-to date. – operation is global with owners of "names" responsible for serving up their own data.
– case sensitive for others
– Restricts names that can be used – IDN provides standard encoding for names in non-US_ASCII
2005/07/31 DNS Tutorial @ IETF-63
4
COM ORG
DE IS UK XXX IETF
ISOC DENIC www EDU
2005/07/31 DNS Tutorial @ IETF-63
5
– foo.bar.example. – \0231br.example.
– each string between two "." unless the dot is prefixed by \ – ie foo.bar is 2 labels foo\.bar is 1 label
– a set of names that are under the same authority – example.com and ftp.example.com, www.example.net – Zone can be deeper than one label, example .us, ENUM
– Transfer of authority for a domain
2005/07/31 DNS Tutorial @ IETF-63
6
2005/07/31 DNS Tutorial @ IETF-63
7
2005/07/31 DNS Tutorial @ IETF-63
8
– Parent is authoritative for existence of delegation, – Child is authoritative for contents.
2005/07/31 DNS Tutorial @ IETF-63
9
1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ID | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |QR| Opcode |AA|TC|RD|RA| Z|AD|CD| RCODE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | QDCOUNT == 1 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ANCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | NSCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ARCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ Query section contains: QNAME: <name in domain name format, variable length> QCLASS: 2 bytes QTYPE: 2 bytes.
2005/07/31 DNS Tutorial @ IETF-63
10
– Encoded as sequence of labels
– Length (1 byte) – Name (n bytes [1..63]) – ogud.com 04ogud03com00
– Binary blob, no TLV.
+------------------+-----+------+--------+----+-----------+ + Domain name |type | class| TTL | RL | RDATA | +------------------+-----+------+--------+----+-----------+ <variable> 2 2 4 2 <variable>
2005/07/31 DNS Tutorial @ IETF-63
11
Root Server Ietf.org Server Org Server Ask org NS Ask ietf.org NS www.ietf.org A 65.256.255.51 www.ietf.org A 65.256.255.51 Local Resolv er
www.ietf.org
2005/07/31 DNS Tutorial @ IETF-63
12
2005/07/31 DNS Tutorial @ IETF-63
13
– NS, SOA, DS, DNSKEY, RRSIG, NSEC
– CNAME, DNAME
– Server must have special processing code
– Address records
– Informational
– carry information to applications
– MX, SRV, PTR, KX, A6, NAPTR, AFSDB
– OPT, TSIG, TKEY, SIG(0)
2005/07/31 DNS Tutorial @ IETF-63
14
– servers keep in sync using information in SOA RR via AXFR, IXFR or other means.
– defined by TTL on RRset.
when looking for data, and follow delegations until a answer or negative answer is received.
– DNS packets are small – DNS transactions are fast if servers are reachable. – Tree climbing == BAD – Few applications have said that if RR does not exist at name then look for zone default at apex,
also bad due to "apex overload"
2005/07/31 DNS Tutorial @ IETF-63
15
– 512 for standard DNS, 4K+ for EDNS0 – Keeping RRsets small is good practice.
– Parent and children must stay in sync about name servers. – Secondary servers must keep up-to date with Primary.
clock synchronization, old/renumbered primary/secondary.
– DNS answer can be forged, in particular if query stream is visible – use protected channel to recursive resolvers.
– Small percentage, but persistent base
2005/07/31 DNS Tutorial @ IETF-63
16
artificial boundary for management purpose
2005/07/31 DNS Tutorial @ IETF-63
17
2005/07/31 DNS Tutorial @ IETF-63
18
2005/07/31 DNS Tutorial @ IETF-63
19
*.example. TXT "this is a wildcard" www.example. A 127.0.0.1 jon.doe.example. A 127.0.0.2
example
2005/07/31 DNS Tutorial @ IETF-63
20
across multiple addresses
2005/07/31 DNS Tutorial @ IETF-63
21
_cool._tcp.example.org SRV 0 0 5133 srv55.mega.example _cool._tcp.example.org SRV 10 20 9876 srv33.mega.example. _cool._tcp.example.org SRV 10 20 3456 srv44.mega.example. _cool._tcp.example.org SRV 10 40 6738 srv66.mega.example. “_” avoids conflicts with hostnames
– currently under discussion: separate registry – this is not too good for local service location (-> tree climbing)
2005/07/31 DNS Tutorial @ IETF-63
22
2005/07/31 DNS Tutorial @ IETF-63
23
– No local part – No variable scheme
– order 16 bit value – preference 16 bit value – flags character-string – service character-string – regexp character-string – replacement domain-name
2005/07/31 DNS Tutorial @ IETF-63
24
2005/07/31 DNS Tutorial @ IETF-63
25
2005/07/31 DNS Tutorial @ IETF-63
26
2005/07/31 DNS Tutorial @ IETF-63
27
– Unknown RR were/are dropped by some resolvers – Unknown RR were not served by authoritative servers
– RFC3597 defines that all DNS servers and resolvers MUST
– BIND-9, BIND-8.2.2, ANS, CNS, MS DNS-2003, DNSCache, NSD, PowerDNS, Net:DNS, DNSJava, etc.
2005/07/31 DNS Tutorial @ IETF-63
28
– Some Load balancers do stupid things, – Applications interfaces refuse to ask for unknown types
– is RFC3597 enabled. – has EDNS0 support
– http://stora.ogud.com/DNSSEC/unknown/index.html
2005/07/31 DNS Tutorial @ IETF-63
29
2005/07/31 DNS Tutorial @ IETF-63
30
– take your pick.
2005/07/31 DNS Tutorial @ IETF-63
31
2005/07/31 DNS Tutorial @ IETF-63
32
2005/07/31 DNS Tutorial @ IETF-63
33
2005/07/31 DNS Tutorial @ IETF-63
34
2005/07/31 DNS Tutorial @ IETF-63
35
– You cannot query for a subset of the RRSet – ... nor for partial matches (only QNAME, QTYPE, QCLASS)
given name or for only those MX RRs with priority 10 or all TXT RRs containing "money".
– KEY (the original) – NAPTR – TXT (with the RFC1464 convention)
response, potentially dumping larger parts of the RRSet, depending on one
2005/07/31 DNS Tutorial @ IETF-63
36
– (wasted bandwidth) [well, large RRsets are always a DDoS vector] – danger of truncation – TCP based re-queries
– dedicated types instead of type/subtype – selector prefixes (cf SRV)
expected and the necessity to deal with wildcards
2005/07/31 DNS Tutorial @ IETF-63
37
2005/07/31 DNS Tutorial @ IETF-63
38
– MORAL: Fight for local upgrades, do not force the whole Internet to work around your local issues.
2005/07/31 DNS Tutorial @ IETF-63
39
2005/07/31 DNS Tutorial @ IETF-63
40
2005/07/31 DNS Tutorial @ IETF-63
41
– Feature not available – Feature not supported – Use application default
2005/07/31 DNS Tutorial @ IETF-63
42
update draft.
processes
2005/07/31 DNS Tutorial @ IETF-63
43
2005/07/31 DNS Tutorial @ IETF-63
44
– Frequently Non-terminal records proposed demand that, terminal records be returned in answer ==> Additional section processing
do all work.
– Recursive Resolver has to be able to do work forever,
2005/07/31 DNS Tutorial @ IETF-63
45
2005/07/31 DNS Tutorial @ IETF-63
46
2005/07/31 DNS Tutorial @ IETF-63
47