When you browse the internet, you don’t write IP addresses to go to the pages you want; you just write the domain. In the “backstage”, every request that you do, passes through a DNS query. It first goes to your internet provider’s recursive DNS server. If it can’t find in the cache, the information needed, it will continue to other recursive servers until it gets to an authoritative DNS server who can give the IP address of the required domain. Basically, it is a name server, that is a middle-man between you, the user, and the authoritative DNS server.
Tasks of the recursive DNS server:
1. Checks if the IP address is stored in the cache memory. There is a certain period of time, pre-defined by the domain’s owner called Time to Live or TTL. It says for how long the recursive server can hold the information. If it is still there, it will return the answer fast and won’t take further actions. 2. Searches for the IP address elsewhere. If it is not in the cache, it will continue the searching process until it gets to an authoritative server which has the information.
TTL – Time to live is a value that signifies how long should the data be kept before discarding. It is commonly used in computers. In the Domain Name System, it has a value in seconds (86 400 for a day, 43 200 for 12 hours and so on) that shows for how long, should a record be kept locally, before you need to make a new query to get this information. The TTL is set separately for the different records. They are set in the authoritative DNS server and the recursive DNS will keep the information depending on the predetermined time. This process of temporary having the record is called caching and the temporary stored data – DNS cache.
There are various ways of sending data over IP – TCP, UDP, DCCP, SCTP, RSVP and more. We will focus our attention on the two that are most used – the UDP (User Datagram Protocol) and the TCP (Transmission Control Protocol).
UDP and TCP
Both protocols are used to send packets of data over the internet. They do that on top of the IP protocol, which means that they direct the packets to IP addresses. They are treated very similar on their way from the users’ computers, through the routers and all the way to the end destination.