Basic Networking Concepts: Part 4

💡
Inspired by Kunal Kushwaha's YouTube tutorials, this article explores networking protocols and internet infrastructure.

DNS (Domain Name System):

  • DNS is essentially a distributed database that translates human-readable domain names (like google.com) into IP addresses (like 172.217.7.206).

  • It operates at the application layer of the Internet protocol suite (TCP/IP).

  • It's crucial because remembering IP addresses for every website would be impractical.

Domain Structure:

Domains are structured hierarchically: ads.google.com

  • subdomain (ads)

  • second-level domain (google)

  • top-level domain (.com, .org, etc.)

DNS Servers:

  • Root DNS servers maintain the directory of top-level domains (.com, .org, etc.).

  • There are many DNS servers globally to handle the volume of domain queries and ensure reliability.

Caching:

  • When you visit a website, your device caches the IP address locally to speed up future requests.

  • If not cached locally, DNS queries progress to servers closer to your network until reaching authoritative DNS servers.

ICANN and Domain Registration:

  • ICANN (Internet Corporation for Assigned Names and Numbers) oversees domain name registration and IP address allocation globally.

TCP Three-Way Handshake:

  • The process involves a client sending a synchronization (SYN) flag to initiate a connection request.

  • The server responds with an acknowledgment (ACK) flag along with its own synchronization flag.

  • Finally, the client acknowledges the server's SYN flag, completing the handshake.

Networking Layers:

  • Transport Layer: Deals with segments (e.g., TCP, UDP).

  • Network Layer: Involves packets (e.g., IP).

  • Data Link Layer: Uses frames (e.g., Ethernet).

Network Layer (IP):

  • Subnetting: Dividing a larger network into smaller subnets for better management and efficiency.

Routing:

  • Routers: Devices that forward data packets between networks based on routing tables.

  • Forwarding Table: Contains information about routes and next hops for data packets.

Addressing:

  • Static Addressing: Manually assigning IP addresses, which can be time-consuming.

  • Dynamic Routing: Automatically adjusting routes based on network conditions using algorithms like Bellman-Ford or Dijkstra.

IP Address Classes:

  • A: 0.0.0.0 to 127.255.255.255

  • B: 128.0.0.0 to 191.255.255.255

  • C: 192.0.0.0 to 223.255.255.255

  • D: 224.0.0.0 to 239.255.255.255

  • E: 240.0.0.0 to 255.255.255.255

IP address classes (A, B, C, D, E) efficiently allocate the IPv4 address space for different network sizes and purposes, aiding in routing and addressing.

Subnet Masking:

  • Determines which part of an IP address is the network portion and which is the host portion.

  • Represented as a 32-bit binary number where 1s indicate the network portion and 0s indicate the host portion.

  • Written in CIDR notation (e.g., X.X.X.X/24 where 24 indicates the number of network bits).

An IP address of 192.168.1.100/24 has a subnet mask of 255.255.255.0, where the first 24 bits (192.168.1) represent the network portion and the last 8 bits (100) represent the host portion.

IPv4 and IPv6:

  • IPv4: Uses 32-bit addresses, allowing for approximately 4.3 billion unique addresses.

  • IPv6: Uses 128-bit addresses, providing significantly more addresses (about 3.4 × 10^38).

TCP/IP Packet Structure:

  • Includes fields like length, identification, checksum, and TTL (Time To Live) to manage packet delivery and ensure proper routing.

  • TTL prevents packets from circulating indefinitely by setting a limit on the number of hops they can make.

DHCP (Dynamic Host Configuration Protocol):

  • Automatically assigns IP addresses and other network configuration parameters (subnet mask, default gateway, DNS servers) to devices on a network.

DHCP makes setting up devices on a network easy. It automatically gives each device an IP address and other important settings. This is super helpful for big networks where manually configuring every device would be a pain.

Understanding NAT

NAT modifies IP addresses of packets passing through a router or firewall, allowing devices on a private network to communicate with the outside world using a single public IP address. For example, a host with a private IP address of 10.0.0.1 will have its IP address changed to a public address, such as 150.150.0.1, when communicating with the outside world. This modification occurs at the router.

Why Do We Use NAT?

NAT is used to slow down the consumption of public IP addresses by allowing multiple devices on a private network to share a single public IP address.

  • Responsible for transferring data between nodes on a network segment across physical links.

  • Uses MAC addresses (Data Link Layer addresses) to identify devices uniquely on a local network segment.

  • The ARP (Address Resolution Protocol) cache maps IP addresses to MAC addresses.

  • Devices use ARP to resolve IP addresses to MAC addresses when necessary.

  • Frames at the data link layer (Layer 2) include source and destination MAC addresses, but not IP addresses.

  • IP addresses are used at the network layer (Layer 3) and are not part of the frame's header at Layer 2.

  • IP addresses enable global communication by identifying devices across networks, while MAC addresses facilitate local communication within a specific network segment by identifying devices on the same local network.

  • MAC addresses are specific to network interfaces (like WiFi or Bluetooth) rather than whole devices.

Conclusion

Understanding basic networking concepts is essential for anyone involved in IT or related fields. From the intricacies of the Domain Name System (DNS) to the importance of the TCP three-way handshake, each component plays a crucial role in ensuring seamless communication across networks. The hierarchical structure of domains, the role of DNS servers, and the significance of caching all contribute to the efficiency and reliability of internet navigation. Additionally, grasping the fundamentals of IP addressing, subnetting, and the differences between IPv4 and IPv6 can greatly enhance network management and troubleshooting skills. Protocols like DHCP and NAT further simplify network configuration and address allocation, making it easier to manage large networks. Finally, the data link layer's role in local communication and the use of MAC addresses underscore the layered approach to networking, ensuring both local and global connectivity. By mastering these concepts, one can build a solid foundation for more advanced networking topics and practical applications.

#InternetHistory #NetworkingProtocols #TCP_IP #ModemVsRouter #DataTransmission