What is IP and how DNS works ?π
get all the information about IP and how DNS resolves the request!
πΊReady to get all about IP and how DNS works? well then hold your seats you will surely enjoy it !!
What is IP?
At a high level, IP is a protocol designed to facilitate the transfer of data between devices over the Internet. The protocol operates at the network layer of the OSI (Open System Interconnection) model, which is layers 3 and 4, the network and transport layers. Essentially, IP is responsible for routing and addressing data packets or internet datagrams from one device to another.
IP was developed in the 1970s as part of the Defense Advanced Research Projects Agency's (DARPA) project to create a packet-switched network called ARPANET that allowed different types of computers to communicate with each other. Over time this evolved into the internet that we know today, with IP being one of the key technologies that underpin it.
How does IP work?
IP's primary function is to provide logical addressing and routing of data packets between connected devices. Every device connected to the internet has a unique IP address, which is a 32-bit numeric address. These addresses are used to identify the source and destination of packets of data being transmitted over the internet.
When a device wants to send data over the internet, it divides the data into smaller packets of data, each of which is addressed with the destination IP address. Once the packets are ready, they are then sent to the next intermediate device (router) along the path to the destination. The router then reads the destination IP address in the packet and uses its routing table to determine the next-hop router to which the packet should be forwarded. The process is repeated until the packets reach their final destination.
IP is an unreliable protocol because it does not guarantee that packets will arrive at their destination correctly, nor does it guarantee that packets will arrive at all. At the transport layer, protocols like TCP (Transmission Control Protocol) are used to provide reliability by retransmitting packets that were lost.
if you want to know more about the OSI model checkout my article π
πlink
Types of IP addresses
IP addresses are classified into two types - IPv4 and IPv6. IPv4 stands for Internet Protocol Version 4, and it is the most commonly used version of IP. It's a 32-bit address, which means there are 2^32 or approximately 4.3 billion possible unique addresses. Unfortunately, due to the explosive growth of the internet and connected devices, these addresses are quickly running out π¨!!.
IPv6, on the other hand, is the newer version of the protocol and was introduced in the late 1990s. It uses a 128-bit address, which means there are approximately 3.4 x 10^38 unique addresses. This was primarily to address the address exhaustion that is seen with IPv4.
IP address classes
IPv4 addresses are divided into classes A, B, C, D, and E, with each class having a different network size and the number of possible hosts. The classes' ranges are as follows:
Class A: This class is designated for large organizations and networks, as it has a range from 1.0.0.0 to 127.255.255.255. It provides one network address and 16,777,214 host addresses.
Class B: This class is designated for moderately sized networks, and the range is from 128.0.0.0 to 191.255.255.255. It provides 16,384 network addresses and 65,534 host addresses.
Class C: This class is designated for small networks, and the range is from 192.0.0.0 to 223.255.255.255. It provides 2,097,152 network addresses and 254 host addresses.
Class D: This class does not have network or host addresses, but rather it is used for multicasting.
Class E: This class is reserved and unused as of now.
IPv6 addresses are expressed in 8 groups of 4 hexadecimal digits separated by colons, i.e., 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Importance of IP
IP is a critical technology that enables communication in modern networking. It ensures that data packets make it from point A to point B and, together with other protocol layers, provide a comprehensive framework for data transmission. IP's importance is further highlighted by the scarcity of IP addresses, which has led to the development of IPv6, which opens up many more possible addresses for future use.
In conclusion, internet protocol (IP) is a fundamental technology that we use without even knowing. It provides logical addressing and routing of data packets between connected devices, and, without it, the Internet as we know it today would not exist.
Why do we need DNS?
The Domain Name System (DNS) is a critical internet technology that maps human-readable domain names, such as www.example.com, to the IP addresses which computers use to communicate with each other. When a user types a domain name into their web browser, a DNS resolver converts this name into an IP address that identifies the computer hosting the corresponding web page.
DNS Overview
DNS is a hierarchical distributed database system that maps domain names to IP addresses. It comprises millions of servers all around the world that work together to resolve domain name queries. Accessing a website via a domain name requires the following steps:
A browser sends a DNS request for a specific domain name to the DNS resolver.
If the DNS resolver has the IP address of the domain name stored in its cache, it returns the IP address to the browser. Otherwise, the DNS resolver starts the resolution process.
The resolver first queries the root servers to identify the authoritative DNS server that can provide information on the domain name.
The root servers point the resolver to the top-level domain (TLD) server associated with the requested domain name (e.g. .com or .org).
The TLD server then identifies and returns the authoritative server for the requested domain name to the resolver.
The authoritative server provides the IP address for the requested domain name to the DNS resolver.
The resolver caches the IP address of the domain name for future lookups and returns it to the browser.
DNS Records
DNS operates using DNS records that contain various types of data about a domain name. Some of the common types of DNS records are:
A Record
The A record maps a hostname to an IP address. For example, the A record for the domain name "example.com" maps it to its corresponding IP address of 192.0.2.1
MX Record
The MX record specifies the mail server responsible for accepting email messages addressed to a specific domain. It contains the hostname of the mail server and its priority.
CNAME Record
A CNAME record creates an alias for a hostname. It points one domain name to another domain name. For example, www.example.com could be a CNAME record to example.com.
NS Record
The NS record specifies DNS servers that can provide authoritative information about a domain name.
DNS Security
DNS is a critical part of internet infrastructure and can be the target of cyberattacks like DNS cache poisoning or DNS spoofing. To prevent attacks, DNS servers use various security mechanisms, such as DNSSEC (DNS security extensions).
DNS security extensions involve public key encryption and signature algorithms to authenticate DNS records. Before the DNS resolver returns an IP address to the browser, DNSSEC verifies that the IP address was indeed provided by the authoritative DNS server for the domain name.
Learn How DNS Works by a Comic !! π
yes, you have heard that right!!
get the idea of how DNS works by nice comic and simple understanding stories but remember you will not get the technical terms there !!
π Click on the below image and explore it π
Quite interesting right??π₯
You can thank me by reacting to this one and make sure you follow π