- Purpose is to allocate ip address to Machines connected over the network
- Resolving name with ip address is major responsibility of DNS Servers.
- DNS Servers are generally used for
- Internal DNS Servers: These servers are maintained in your organization for internal name resolutions
- Public DNS Servers: These servers are maintained by some organizations for internet domain name resolutions
- Public DNS Servers Usecase:
- We are running our application on AWS/Azure.
- When we run in cloud we get public ip address.
- To all external users, we expose applications by giving domain names
- To get domain names, you purchase them from domain sellers (Go-daddy, hostinger.in)
- We have to make Public DNs servers aware of our ip address
DNS Name Resolution
- Whenever you make a request, first name to ip resolution is checked in local hosts file (C:\Windows\System32\drivers\etc\hosts in Windows & /etc/hosts in *nix )
- The request will be made to root servers. Root servers respond with TLD server
- Request to TLD ns will result in ns
- NS will have a file called as Zone file which has records
- A or AAAA: Name to IP
- CNAME: Alias record
- PTR Record: inverse of A or AAAA
- MX Records: Mail exchange servers