-
Notifications
You must be signed in to change notification settings - Fork 1
/
dns.txt
36 lines (27 loc) · 1.12 KB
/
dns.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
resolve name to IP
port 53
zones
/ / /
bob.sales.example.com
| | | +-- top-level domain (on root nameservers)
| | +-- subdomain of com
| +-- subdomain of example
+-- resource record (RR) part of the sales.example.com domain
Zones are defined in zone files on primary nameservers. They contain RRs such as bob.
Authoritative nameservers answer to resource records that are part of their
zones only. Recursive nameservers offer resolution services, but they are not
authoritative for any zone (ie. they don't have direct answers).
BIND
* named: nameserver
* rndc: admin utility
* dig
AWS: cli53
The mechanism for name resolution is decided in:
/etc/nsswitch.conf
hosts files DNS
| +-- use DNS servers declared in /etc/resolv.conf (often overwitten by NetworkManager or DHCP)
+-- /etc/hosts
gotcha: the host command doesn't respect /etc/nsswitch.conf, thus not /etc/hosts either
www.example.com -> 12.34.56.78
web.example.com -> CNAME to www.example.com (~symlink, target must be A/AAAA + not zone apex)
12.34.56.78 -> PTR to web.example.com (~reverse link)