Lesson 5.2 - DNS Flashcards
Purpose of DNS
Map human-readable names to IP addresses
-Human-readable is easier to remember but IP is needed to send traffic to intended destination
gethostbyname()
Takes domain name as arg and returns IP address
stub resolver
simple resolver handling all the DNS lookups for the OS. The resolver will send DNS queries (with recursive flag on) to a specified recursive resolver (name server) and stores the records in its cache based on their TTL (had to Google this one)
Local DNS resolver
Typically configured automatically when your host is assigned an IP address, using a protocol called domain host configuration protocol (DHCP)
Local host may have __ local DNS resolvers
2
-Tries the first one. If no response in certain preconfigured timeout, send query to second one as backup. Typically issued recursively.
Local resolver performs _____ queries
Iterative
Root of DNS hierarchy
Each fully-qualified domain name is presumed to end with a dot
-IP address for the root servers (those that are authoritative for the root) may already be configured in the local DNS resolver
Cache on local resolver
Iterative process can be slow. Cache commonly queried/repeated mappings (like google.com)
TTL
Time to live
- Indicates how long an answer can be saved (cached). Typically hours, days, or even weeks.
- Mapping of a local name (www.gatech.edu) on the other hand might change more infrequently. Thus, local TTL’s might need to be smaller.
‘A’ record
maps an IP address to a domain name
NS record
‘Name server’ record
- maps domain name to authoritative name server for that domain
- Referrals: if we ask the root for a mapping to an IP address, it doesn’t know the answer, but can issue a name server reply (NS record) referring the resolver to a different name server that could be responsible for that part of the domain namespace
DNS is implemented as a _____
hierarchy
MX record
shows the mail server for a particular domain
CNAME
Canonical name. Like an alias. Basically a pointer from an alias to another domain name that needs to be looked up.
PTR
Maps IP address to domain names (like a reverse lookup)