Day 1: Internet Basics


How Does Internet Work?




IP Address




MAC Address

A MAC (Media Access Control) Address is a unique, permanent identifier given to every network-enabled device (like your laptop’s Wi-Fi card, phone, or smart TV). It’s often called the hardware address or the device’s fingerprint on a local network.

Format: A MAC address is a 48-bit number, shown as 12 hexadecimal digits.

Example formats:

Purpose: Used to uniquely identify devices within a local network. Unlike IP addresses, MAC addresses don’t change.

Finding Your MAC Address:




Port Number

A Port Number is a numerical identifier (0-65535) used alongside an IP address to direct network traffic to a specific application or service on a device. Think of it like an apartment number in a building — the IP is the building, and the port is the apartment. Port numbers are 16-bit unsigned integers, which gives 65,536 possible ports.

To organize them, the Internet Authority (IANA) divides ports into three main categories:

  1. Well-Known (0-1023): Reserved for standard services.

    Examples: 22 (SSH), 53 (DNS), 80 (HTTP), 443 (HTTPS)

  2. Registered (1024-49151): Used by apps and databases.

    Examples: 3000 (React/Node.js), 3306 (MySQL), 27017 (MongoDB)

  3. Dynamic/Ephemeral (49152-65535): Temporary ports chosen automatically for client connections.




DNS (Domain Name System)

DNS is like the phonebook of the internet. It converts human-friendly domain names (like google.com) into computer-friendly IP addresses (like 142.250.72.206). Without DNS, we’d have to remember numbers instead of names.

How DNS Works:

  1. Check Cache: Your browser, OS, or router first checks if it already knows the IP (faster loading).

  2. Ask Recursive Resolver: If not cached, your computer asks a DNS resolver (usually your ISP’s or public ones like Google 8.8.8.8).

  3. Root Servers: Resolver asks the root servers, which direct it to the right Top-Level Domain (TLD) servers (like .com).

  4. TLD Servers: These point to the Authoritative Name Servers for the domain (e.g., Google’s servers).

  5. Authoritative Server: The final source of truth gives the exact IP of the domain.

  6. Return & Connect: The answer travels back → Resolver caches it → Your browser finally connects to the IP.