Linux DNS Resolution Flashcards
/etc/hosts
Text file containing local hosts entry to loop back address in ipv4 or v6. Can also be used to map other hostname to IP address.
/etc/hostname
Used for system hostname. Hostnamectl file write system hostname to file.
/etc/resolv.conf
IP address of DNS name servers host will use for name resolution.
/etc/nsswitch.conf
Among others, used to determine order of name resolution.
host
Resolve down names to IP address. When querying outside, obtain email resolution with numbers for priority (mail exchange records.)
dig
Query’s DNS servers for specific DNS records. @ to reference specific DNS server for website.
-t: DNS record type. Ex: MX for mail server, A for address record, any for any records possible.
getent
Directly queries /etc/nsswitch.conf file and database locations.