Logo

dev-resources.site

for different kinds of informations.

How the Internet Works: OSI Model, DNS, TCP vs. UDP, and Essential Concepts for Beginners

Published at
1/15/2025
Categories
tutorial
networking
network
top7
Author
rayan2228
Categories
4 categories in total
tutorial
open
networking
open
network
open
top7
open
Author
9 person written this
rayan2228
open
How the Internet Works: OSI Model, DNS, TCP vs. UDP, and Essential Concepts for Beginners

The internet has become an integral part of our lives, but how does it actually work? For beginners, understanding the fundamentals—like the OSI Model, DNS, and protocols such as TCP and UDP—can be a game-changer. In this article, we’ll explain these topics in simple terms with practical examples and diagrams to help you get started.


How the Internet Works (Simplified)

At its core, the internet is a global network that connects billions of devices, allowing them to communicate. Here’s a simple overview:

  1. Devices like computers and smartphones connect to the internet via networks (e.g., Wi-Fi or mobile data).
  2. Data is broken into small packets and sent across the internet using protocols like IP (Internet Protocol).
  3. These packets travel through devices like routers and servers before reaching their destination.
  4. Once all packets arrive, they are reassembled to display a webpage, send an email, or perform other tasks.

The internet uses layers of protocols to manage these processes, which is best explained through the OSI Model.


INTERNET WORKING

Understanding the OSI Model

The OSI (Open Systems Interconnection) Model is a framework that describes how data travels between devices. It has 7 layers, each with a specific role:

  1. Physical Layer: Deals with physical connections like cables or Wi-Fi signals.
  2. Data Link Layer: Ensures data transfer between devices on the same network.
  3. Network Layer: Routes data packets between different networks (e.g., IP addresses).
  4. Transport Layer: Ensures data is delivered accurately (e.g., TCP, UDP).
  5. Session Layer: Manages communication sessions between devices.
  6. Presentation Layer: Converts data into formats that applications can understand (e.g., encryption).
  7. Application Layer: Interfaces directly with user applications (e.g., web browsers).

Visualizing the OSI Model

OSI MODEL


TCP and UDP: Protocols at the Transport Layer

The Transport Layer (Layer 4) is responsible for transferring data between devices. Two primary protocols operate here:

TCP (Transmission Control Protocol)

  • Reliable: Ensures all data packets are delivered in the correct order.
  • Connection-Oriented: Establishes a connection before sending data.
  • Use Cases: Web browsing, emails, file transfers.

Example: When you load a webpage, TCP ensures all the data arrives so the page displays correctly.

TCP MODEL

UDP (User Datagram Protocol)

  • Unreliable: Faster but doesn’t guarantee all packets will arrive.
  • Connectionless: Sends data without establishing a connection.
  • Use Cases: Online gaming, video streaming, DNS queries.

Key Differences Between TCP and UDP:

TCP VS UDP

What is DNS (Domain Name System)?

DNS (Domain Name System) acts like the internet’s phonebook. It translates human-readable domain names (e.g., google.com) into IP addresses (e.g., 172.217.12.206) that computers use to communicate.

How DNS Works

  1. You type a URL into your browser (e.g., www.google.com).
  2. The browser queries a DNS resolver to find the corresponding IP address.
  3. The DNS resolver checks its cache or contacts other DNS servers.
  4. The IP address is returned, and the browser loads the webpage.

TCP VS UDP

DNS Root Servers

There are 13 DNS root servers, labeled A through M, which are managed by different organizations worldwide. These servers are critical for directing queries to the appropriate TLD (Top-Level Domain) servers.

DNS Root Server Map

The 13 root servers are distributed globally to ensure reliability and speed. Each root server has multiple instances (using Anycast) for redundancy and efficiency.

Common TLDs and Their Purpose

  • .com: Commercial websites.
  • .org: Non-profit organizations.
  • .edu: Educational institutions.
  • .gov: Government websites.
  • .net: Network-related sites.
  • Country Code TLDs (ccTLDs): Examples include .uk (United Kingdom), .bd (Bangladesh), .in (India).

How TLDs Work

  1. A DNS resolver queries a root server to find the TLD server (e.g., for .com).
  2. The TLD server directs the query to the authoritative server for the domain (e.g., google.com).
  3. The authoritative server provides the IP address, allowing the user to access the website.

DNS MODEL

Common DNS Records Beginners Should Know

  • A Record: Links a domain to an IPv4 address.
  • AAAA Record: Links a domain to an IPv6 address.
  • CNAME: Redirects one domain to another.
  • MX: Directs email to mail servers.
  • TXT: Stores text, often for verification purposes.

TLD MODEL

Additional Key Concepts

CDNs (Content Delivery Networks)

CDNs store copies of website content on servers worldwide, speeding up load times by serving content from servers closest to users.

DNS Security

  • DNS Spoofing: Hackers redirect users to malicious websites.
  • DNSSEC: A protocol that secures DNS queries by verifying their authenticity.

Conclusion

Understanding how the internet works—from the OSI Model to DNS and protocols like TCP and UDP—is crucial for beginners. These concepts form the foundation of web development and networking, helping you troubleshoot and build better systems.

If you’re new to these topics, start exploring practical tools like ping, traceroute, and nslookup. Got questions? Share them in the comments below—we’re here to help you learn!

tutorial Article's
30 articles in total
Tutorials offer step-by-step instructions to help learners grasp concepts and complete tasks in various domains.
Favicon
Creating a live HTML, CSS and JS displayer
Favicon
Build Your First AI Application Using LlamaIndex!
Favicon
Creating Arrays with Reference Variables
Favicon
How To Build Beautiful Terminal UIs (TUIs) in JavaScript 2: forms!
Favicon
Chronicles of Supermarket website
Favicon
Easy development environments with Nix and Nix flakes!
Favicon
ruby -run
Favicon
Основы изучения Python: Руководство для начинающих
Favicon
How to Use JavaScript to Reduce HTML Code: A Simple Example
Favicon
SQL Performance Tuning: Best Practices for Faster Queries
Favicon
Php Base64 encode/decode – best practices and use cases
Favicon
10 Must-Bookmark Open Source Projects for Developers
Favicon
Easy 301 Redirects For SEO
Favicon
ruby -run, again
Favicon
🚀 New Book Release: "Navigate the Automation Seas" – A Practical Guide to Building Automation Frameworks
Favicon
Top Kubernetes CI/CD Tools in 2025
Favicon
340+ Websites every developer should know
Favicon
Survival Manual: How to Create and Manage a Project in Git
Favicon
Strong Female Role Models in the Sector: Oya Narin
Favicon
Test Scenarios vs. Test Cases: Understanding the Differences
Favicon
Angular validation common functions
Favicon
KDE vs GNOME vs Others: Choosing the Best Linux Desktop Environment in 2025
Favicon
NXP i.MX8MP Platform Porting Driver Tutorial
Favicon
Response Handling Best Practices
Favicon
Why AWS Matters: A Beginner's View
Favicon
How the Internet Works: OSI Model, DNS, TCP vs. UDP, and Essential Concepts for Beginners
Favicon
Resolving Auto-Scroll issues for overflow container in a Nuxt app
Favicon
#131 — Use Association Table to Handle Interval Association
Favicon
Deferred loading with @defer: Optimize Your App's Performance
Favicon
Psychotherapy Technology Advancements

Featured ones: