A Simple Guide to How the Internet Operates

A Simple Guide to How the Internet Operates

How It Works and Why It Matters(Start With OSI Layers)

The internet works in 7 layers. The 7 layers called OSI Layers (Open Systems Interconnection) also known as OSI Models this 7 layers helps internet to works properly.

The OSI Model

LayerDescriptionExamplesKey Protocols/Concepts
7. ApplicationUser interaction & servicesWeb browsers, emailHTTP, HTTPS, SMTP, DNS
6. PresentationData translation & encryptionFile formats, SSL/TLSJPEG, PNG, SSL/TLS
5. SessionSession managementLogging in, file transferNetBIOS, RPC
4. TransportReliable communicationPort numbers, data segmentationTCP, UDP
3. NetworkRouting & addressingRouters, IP addressesIPv4, IPv6, ICMP
2. Data LinkFrame transfer & error handlingSwitches, MAC addressesIPv4, IPv6, ICMP
1. PhysicalHardware & raw data transferCables, wireless signalsIEEE 802.3, 802.11

The 7 OSI Layers

  1. Physical Layer

    • Function: Deals with the physical connection between devices and the transmission of raw binary data (0s and 1s) over physical mediums like cables or wireless signals.

    • Examples: Ethernet cables, fiber optics, switches, hubs, radio frequencies.

    • Key Protocols/Standards: IEEE 802.3 (Ethernet), IEEE 802.11 (Wi-Fi).

  1. Data Link Layer

    • Function: Ensures reliable data transfer between two devices connected on the same network. It handles error detection, correction, and framing of data.

    • Examples: MAC (Media Access Control) addresses, switches, and network adapters.

    • Key Protocols: Ethernet (Layer 2), ARP (Address Resolution Protocol), PPP (Point-to-Point Protocol).

  1. Network Layer

    • Function: Responsible for routing data packets between devices across different networks. It assigns logical addresses (IP addresses) to identify devices.

    • Examples: Routers, IP addresses, subnetting.

    • Key Protocols: IPv4, IPv6, ICMP (Internet Control Message Protocol).

  1. Transport Layer

    • Function: Ensures end-to-end communication, reliability, and proper data sequencing. It also manages error recovery and flow control.

    • Examples: Port numbers, segmentation, reassembly of data.

    • Key Protocols: TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

  1. Session Layer

    • Function: Manages and controls sessions or connections between two devices. It establishes, maintains, and terminates sessions.

    • Examples: Logging into websites, opening a file from a server.

    • Key Protocols: NetBIOS, RPC (Remote Procedure Call).

  1. Presentation Layer

    • Function: Translates data between the application layer and the network. It handles encryption, compression, and formatting of data.

    • Examples: JPEG, PNG (image formats), SSL/TLS (encryption protocols).

    • Key Tasks: Data formatting, encryption, and decryption.

  1. Application Layer

    • Function: The layer closest to the user. It provides network services to applications like email, file transfer, and web browsing.

    • Examples: Web browsers, email clients, file transfer software.

    • Key Protocols: HTTP/HTTPS, FTP, SMTP, DNS.

Internet Work Flow

The internet is a vast network of interconnected devices that enables communication and data exchange across the globe. At its core, it operates based on several key components and principles:

  1. Infrastructure:

    • Physical Layer: The internet relies on physical infrastructure, such as fiber optic cables, satellites, and cellular networks, to transmit data.

    • Servers and Data Centers: Large data centers store and process the information we access online, hosted on web servers.

  2. Data Transmission:

    • Packets: Data is broken into small units called packets, which travel independently across the network.

    • Protocols: Communication is governed by protocols like TCP/IP (Transmission Control Protocol/Internet Protocol). TCP ensures reliable transmission, while IP determines how packets are routed.

  3. Routing:

    • Packets travel through routers, which direct data to its destination using the most efficient path. This involves a combination of private networks, public networks, and undersea cables.

  4. DNS (Domain Name System):

    • DNS translates human-readable web addresses (e.g., www.google.com) into IP addresses that machines use to locate servers.

  5. Client-Server Model:

    • Devices (clients) request data from servers, which respond with the requested information. For example, when you type a URL, your browser (client) fetches the webpage from a server.

Why the Internet Matters

The internet has revolutionized almost every aspect of human life, making it indispensable. Here's why it matters:

  1. Global Connectivity:

    • The internet connects billions of people worldwide, facilitating instant communication through emails, video calls, and social media.
  2. Access to Information:

    • Knowledge is no longer limited by geography. Search engines, digital libraries, and online courses democratize education and learning.
  3. Economic Impact:

    • E-commerce platforms like Amazon and Shopify have transformed retail, while remote work and online freelancing have created new job opportunities.
  4. Innovation:

    • The internet fosters technological innovation, supporting fields like artificial intelligence, IoT (Internet of Things), and cloud computing.
  5. Social and Cultural Exchange:

    • Social media and streaming platforms bridge cultural gaps, enabling people to share and experience diverse perspectives.
  6. Healthcare and Emergency Response:

    • Telemedicine and health apps connect patients with doctors, while emergency communication systems ensure safety during crises.
  7. Political and Social Activism:

    • The internet amplifies voices, allowing people to organize movements, raise awareness, and advocate for change.

The Journey of Your Data

Imagine you’re sending a letter to a friend. The same kind of journey happens when you type something in your browser. Let’s see how it works step by step:

1. You Type a Website Address (URL)

When you type something like www.example.com into your browser:

  • The browser figures out where to go by breaking the address into parts. It learns:

    • The protocol: Is it http (basic) or https (secure)?

    • The website's name (example.com).

    • Which specific page you want (like /about for "About Us").

2. Finding the Website (DNS Lookup)

Your browser needs to find the computer (server) where the website lives. Since computers talk using numbers (called IP addresses), it asks a "phonebook for the internet" (called DNS) to translate example.com into something like 192.168.1.1.

3. Connecting to the Website

Once the browser knows the server’s address, it knocks on the door and says, "Hey, can I talk to you?"

  • If it’s a secure connection (HTTPS), they shake hands first to ensure the connection is private and safe.

  • If not, the browser just starts chatting right away.

4. Asking for the Webpage

The browser sends a request to the server. It’s like writing a letter that says:

  • "I’d like the homepage, please (GET request)."

  • "Here’s some info about me (like the browser I’m using or any saved cookies)."

5. The Server Prepares the Answer

The server receives your letter and starts working on a response:

  • If it’s a simple website, it just sends back the webpage.

  • If the page has dynamic content (e.g., your profile), the server might check a database or run some code first to get the right data.

6. Sending the Response

The server writes back to your browser:

  • It includes a status code like:

    • 200 OK (Everything’s fine!)

    • 404 Not Found (Oops, the page doesn’t exist.)

  • Along with the status, it sends the content of the page (like text, images, and links).

7. Your Browser Builds the Page

The browser gets the response and starts building the page for you:

  1. It reads the HTML (the structure of the page, like the skeleton).

  2. It loads CSS (the styles, like colors and fonts).

  3. It runs JavaScript (making the page interactive, like a button that works when you click).

8. Extra Requests for Stuff

If the webpage needs more things (like images, videos, or icons), the browser sends more little requests to the server and adds them to the page as they arrive.

9. You Interact with the Page

Now, the webpage is ready, and you can start using it! When you click on links or fill out forms, the browser might:

  • Send more requests to the server (e.g., when submitting a form).

  • Use JavaScript to show or hide things without refreshing the page.

For Newbies

Think of It Like a Conversation:

  1. You (Browser): “Hey DNS, where’s example.com?”

  2. DNS: “It’s at 192.168.1.1.”

  3. You: “Hi server at 192.168.1.1, can I get the homepage?”

  4. Server: “Sure! Here’s the page you wanted.”

Putting It All Together: The Journey of Data

Let’s break down the full journey:

  1. Start the Trip: You (browser) want to visit a friend’s house (website).

  2. Find the Address: You use a GPS (DNS) to find their location.

  3. Pack Your Bags: You pack everything securely (data formatting/encryption).

  4. Choose Your Vehicle: You pick a car (TCP) or bike (UDP) depending on your priority (safety or speed).

  5. Follow the Roads: You drive through highways (routers) and local streets (networks).

  6. Reach the Destination: You finally arrive at your friend’s house (the server), where the door is opened (server response).

  7. Enjoy the Visit: Your friend shows you around (webpage loads).

Why is This Cool?

This entire process unfolds in just a matter of seconds every time you visit a website! It's quite fascinating, almost like magic, but in reality, it's a complex system of computers and networks working seamlessly together to enhance your browsing experience. Each step, from finding the website's address to loading the page, involves sophisticated technology and coordination. The DNS acts like a digital directory, quickly translating domain names into IP addresses. Meanwhile, data is securely packed and transmitted across vast networks, navigating through numerous routers and servers. All these elements collaborate to ensure that you can effortlessly access information, connect with others, and explore the vast digital world with ease. This intricate dance of technology not only makes your life easier but also opens up endless possibilities for communication, learning, and entertainment.

DNS reassociation

The DNS reassociation is broken down into 9 parts.

  1. User

    • It starts with typing your domain name.

    • After typing the domain name, it sends a request to the browser.

  2. Browser Request

    • The request is sent by the browser after the DNS local cache finds the IP address in local storage. If it's available, it gives it back to the user via the browser.

    • If it's not found, it goes to the next step.

  3. DNS Resolver

    • Then the DNS sends a query to the Root NameServer, sending the last part of the domain name like .com, .in.

    • Then it goes to the next step.

  4. TLD NameServer

    • A top-level domain (TLD) server is a Domain Name System (DNS) nameserver that keeps all the information for all domain names that share a common domain extension. For example, the .com TLD nameserver contains all the data related to all the .com domains. If you want to access facebook.com, your browser needs to contact the .com TLD server.

    • After getting the name, the TLD server refers to the ANS Server, known as the Authoritative NameServer.

  5. ANS

    • After getting the information, the ANS finds the server IP in its database and then sends it back to the DNS Resolver.
  6. IP Address

    • The IP address sent by the DNS goes to the browser.
  7. Browser Part

    • After getting the IP, the browser displays the output of your page.