Domain Name System (DNS)
The Domain Name System is a naming system for the internet. It was originally invented to assign names to IPs, because names are more easy to remember than the numbers in IP addresses. meanwhile, DNS has more purposes than to translate names in numbers. There are various types of records with a variety of functions. The most important ones are:
Name | Purpose | Lookup result example |
---|---|---|
A | Assigns an IPv4 address to a name | $ host -t a example.com example.com has address 192.168.10.34 |
AAAA | Assigns an IPv6 address to a name | host -t aaaa example.com example.com has IPv6 address fe80::1ff:fe23:4567:890a |
MX | Assigns mail exchangers with priorities to a name | $ host -t mx example.com example.com mail is handled by 10 mx2.example.com. example.com mail is handled by 5 mx1.example.com. |
CNAME | Causes this domain to be an alias of another domain | $ host -t cname aliasdomain.example.net aliasdomain.example.net is an alias for example.com. |
TXT | Holds a piece of text | $ host -t txt _spf.example.com _spf.example.com descriptive text "v=spf1 ip4:192.168.10.34 ip6:fe80::1ff:fe23:4567:890a include:email.example.com ~all" |
PTR | Reverse DNS assigns a name to an IP | $ host -t ptr 192.168.10.34 34.10.168.192.in-addr.arpa domain name pointer example.com. |