s
DNS stands for Domain Name System and it is used in our everyday tasks without even realising it. DNS can be compared to an address book since it is a directory of mappings between names and IP addresses and allows hosts to reach endpoints such as URLs or other machines.
The full name of a server or endpoint is made of a hostname and the domain in which it sits. It is called a Fully Qualified Domain Name (FQDN) and is used for DNS resolution.
DNS uses a hierarchy to manage the different types of servers.
When using DNS, the URL or name of a server is read from right to left, the root being the highest in the hierarchy and represented by a “.”.
Based on this hierarchy, there are several types of DNS servers:
DNS resolution can be either iterative or recursive.
In an iterative resolution, the local computer DNS resolver handles the full DNS resolution journey.
In a recursive resolution, the DNS resolver/caching server handles the full DNS resolution journey.
Once bob.com is resolved, the data will be cached into the local DNS cache so that next time it is queried, the resolution does not need to happen again, until the data expires. The time length of a cached resource is called a Time-To-Live (TTL). A TTL is a setting configured on a DNS resource to allow DNS caching.
Those name/IP mappings stored in DNS servers are called resources or records.
DNS stores different types of DNS records in its mapping directory, but there are only a few common ones that you will ever used:
DHCP stands for Dynamic Host Configuration Protocol and is used to dynamically allocate IP addresses to clients in a network.
The way it works:
We call that process, DORA (Discover, Offer, Request, Acknowldge).
When a DHCP server leases an IP address, it doesn’t only provide the IP but also information around it such as the router gateway of the network and the DNS servers. In other cases where a client would require other services such as a FTP server for example, this would also be provided in the lease. These additional information are called DHCP Options, and each option corresponds to a number.
Examples:
Demonstration of a router giving IPs to multiple devices through DHCP: