Every interview I have been on
IT and InfoSec interview questions can range from basic questions to advanced questions. Something that I have been asked on every single interview was how does DNS work. It is usually phrased like how do you get from your computer to the website you are on. DNS stands for Domain Name System and is an integral part of information technology.
Let’s get started
In order to understand DNS you first must understand basic networking. Every device connected to the internet has its own IP address that is unique to it. There are exceptions to this in more advanced network environments, however for entry level jobs I didn’t need to know how they worked. In order to connect to another device, your machine needs that machines IP address. To make things human-readable, IP addresses get translated to domain names. Names are easier to remember than numbers.
Here is what happens
Let’s look at a scenario: You open your browser at home and type in infosecjon.com. Your web browser searches your computer’s DNS records for it and might not find it. It then goes to the next hop on its routing path, typically your Internet Service Provider (ISP). If their DNS records do not have the IP address, then it goes to the next hop. It will keep going all the way up to the root DNS server. Root DNS servers are the word after the last dot in a domain name. For instance, my website is on the .com root DNS server.
The root DNS server knows that my website is hosted with SiteGround. The final step is going to SiteGround’s DNS servers and asking what address infosecjon.com uses. Once the IP address is found at any level, the response gets directed back to your local machine. Your browser than saves a copy of the DNS record so the next time you visit it can skip the process.
Here is the flow of this process
Your machine makes the request -> ISP does not have the record -> local machine goes to root domain -> .com root DNS server answers with IP address of SiteGround -> local machine asks SiteGround DNS servers -> SiteGround sends infosecjon.com’s IP address to local machine -> Local machine loads page and stores DNS information.
DNS is something I have always been asked about on interviews. In fact, many IT and InfoSec interview questions are repeated across the board. I will continue this series and go over the basics of Troubleshooting, TCP/IP handshake and the basic components in an enterprise system. Any other basic terms that you feel are common? Comment below and I can add them to a future post. If you enjoyed this post, please subscribe. Thanks for reading!