Computer Networking

Module 01 - Networking Basics
1. What is Computer Networking?2. Types of Computer Networks3. Internet vs Computer Network4. How Does The Internet Work?5. Network Architectures (Client...6. Host vs Node7. Network Interface Card (NIC)8. MAC Address9. IP Address
ProfileProfile
Akkal DhamiFull Stack Developer

Building modern web experiences with a focus on performance, scalability, and clean architecture.

© 2026 | Akkal Dhami | All rights reserved

Built with
byAkkal Dhami

Navigation

  • Projects
  • Dev Setup
  • Playbook
  • Templates
  • Networking
  • SQL - MySQL
  • SQL Playground
  • System Design
  • DSA
AKKAL DHAMIAKKAL DHAMIAKKAL DHAMI

Module 01 - Networking Basics

Learn the foundational concepts of computer networking.


1. What is Computer Networking?

Computer Networking is the process of connecting two or more computing devices (called nodes) so they can communicate with each other, exchange data, and share resources such as files, information, applications, and hardware devices over a network.

Learn more

Example:

Laptop  ───┐
Phone   ───┼── WiFi Router ─── Internet
TV      ───┘

2. Types of Computer Networks

1. PAN (Personal Area Network)

PAN is the smallest type of network that connects personal devices within a few meters, such as smartphones, smartwatches, and wireless earbuds.

Example: Bluetooth connection between a phone and smartwatch.


2. LAN (Local Area Network)

LAN connects devices within a small area like a home, office, or building. It provides fast communication and resource sharing between connected devices.

Example: Home Wi-Fi network or office network.


3. CAN (Campus Area Network)

CAN connects multiple LANs within a limited campus or organization area, such as universities, companies, or research centers.

Example: University network connecting different departments.


4. MAN (Metropolitan Area Network)

MAN connects multiple LANs across a city or metropolitan area. It is larger than LAN but smaller than WAN.

Example: City-wide ISP network.


5. WAN (Wide Area Network)

WAN connects networks across large geographical areas such as countries and continents. It is used for long-distance communication.

Example: The Internet is the largest WAN.


6. WLAN (Wireless Local Area Network)

WLAN is a wireless version of LAN that connects devices using Wi-Fi signals instead of physical cables.

Example: Home or office Wi-Fi network.

Learn more

Quick Memory Trick

PAN  → Personal Devices
LAN  → Local Building
CAN  → Campus Area
MAN  → City Area
WAN  → Worldwide Network
WLAN → Wireless LAN

3. Internet vs Computer Network

A Network is a group of two or more devices connected together so they can communicate and share resources.

The Internet is the world's largest computer network.

Learn More

FeatureComputer NetworkInternet
DefinitionA group of interconnected devices that communicate and share resources.A global network that connects millions of smaller computer networks.
CoverageCan range from a few meters (PAN) to a city (MAN) or larger.Worldwide, connecting networks across countries and continents.
PurposeEnable communication and resource sharing between connected devices.Provide global communication and access to online services and information.
OwnershipUsually owned and managed by an individual, organization, or company.No single owner; it is made up of networks owned by many organizations and Internet Service Providers (ISPs).
Internet Connection Required❌ No. A network can function without Internet access.✅ Yes. The Internet itself is the global communication system.
Communication ScopeUsually local or within a specific organization.Global communication between networks worldwide.
ExamplesHome Wi-Fi, School Computer Lab, Office Network.Google, YouTube, Facebook, ChatGPT, Amazon.
Can Work Offline?✅ Yes. Devices can communicate locally without Internet.❌ No. Internet services require an Internet connection.
RelationshipA network can exist independently.The Internet is a network of networks.

4. How the Internet Works?

The Internet connects millions of smaller networks around the world, allowing computers, smartphones, and other devices to communicate with each other. Whenever you open a website, send an email, or watch a video online, your device exchanges data with another device over the Internet.

When you type a website address (such as google.com) into your browser and press Enter, your computer sends a request through your local network to your Internet Service Provider (ISP). The ISP then forwards your request through multiple routers and networks until it reaches the server where the website is hosted.

The server receives your request, processes it, and prepares the required data, such as HTML, CSS, JavaScript, images, and videos. It then sends this data back through the Internet to your device.

Finally, your browser receives the data, puts all the pieces together, and displays the webpage on your screen. This entire process usually happens in just a few milliseconds, making websites appear to load almost instantly.

Behind the scenes, technologies such as DNS, TCP/IP, HTTP/HTTPS, routers, and servers work together to ensure that your data reaches the correct destination quickly, reliably, and securely.

Learn More


5. Network Architectures (Client-Server vs Peer-to-Peer)

A Network Architecture defines how devices (computers, servers, phones, printers, etc.) are organized and how they communicate with each other over a network.

Client-Server Architecture

A Client-Server Architecture is a network model where one or more clients request services or resources from a central server, and the server processes the requests and sends back responses.

  • Client sends a request.
  • Server processes it.
  • Server sends a response.

Peer-to-Peer (P2P) Architecture

A Peer-to-Peer (P2P) Architecture is a network model where every device (called a peer) can act as both a client and a server.

There is no central server.

Peers communicate directly with each other.


  • Network architecture defines how devices communicate and share resources.
  • Client-Server Architecture uses a central server to provide services to clients.
  • Peer-to-Peer Architecture allows devices to communicate directly without a central server.
  • Client-Server is widely used for websites, cloud platforms, banking systems, and social media.
  • Peer-to-Peer is commonly used for file sharing, blockchain, and distributed applications.
  • Choosing the right architecture depends on factors such as scalability, security, cost, and management requirements.

Learn More


6. Difference Between Host and Node

A Node is any device connected to a computer network.

If a device can participate in the network in any way, it is considered a node.

A Host is a node that has an IP address and can directly communicate with other devices on the network.

Hosts are usually end devices used by people or applications.


FeatureNodeHost
DefinitionAny device connected to a network.A node that has an IP address and can communicate as an endpoint.
ScopeBroader term.Subset of nodes.
IP AddressMay or may not have one.Always has an IP address.
PurposeCan send, receive, or forward network traffic.Primarily sends and receives data for users or applications.
Acts as EndpointNot always.Yes.
ExamplesRouter, Switch, Firewall, Laptop.Laptop, Smartphone, Server, Printer.

  • A node is any device connected to a network, including end devices and networking equipment.
  • A host is a node that acts as an endpoint, typically with an IP address, and can send or receive data for users or applications.
  • Every host is a node, but not every node is a host.
  • Devices such as laptops, servers, smartphones, and printers are common hosts.
  • Devices such as routers, switches, and firewalls are nodes that primarily forward or manage network traffic.

7. Network Interface Card (NIC)?

A Network Interface Card (NIC) is a hardware component that allows a computer to send and receive data over a network.

  • A Network Interface Card (NIC) is the hardware that connects a device to a network.
  • Every network-enabled device has at least one NIC.
  • A NIC sends and receives data between the device and the network.
  • Each NIC has a unique MAC address, which identifies it on the local network.
  • NICs can be wired (Ethernet) or wireless (Wi-Fi).
  • Without a NIC, a device cannot communicate with other devices or access the Internet.

8. MAC Address

A MAC address is a unique identifier assigned to a network interface controller (NIC) for communications at the data link layer of a network segment.

Example: 00:1A:2B:3C:4D:5E

  • It splits into an OUI (manufacturer) and a device-specific portion.
  • The first byte's low-order bits tell you if it's unicast/multicast and universal/local.
  • MAC addresses operate at Layer 2 and are essential for local delivery, ARP, and switching.
  • Modern devices randomize MAC addresses for privacy, and MACs can be spoofed in software.

Learn More


9. IP Address

  • IP address: Identifies and locates a device on a network.
  • IPv4: 32-bit, e.g., 192.168.1.1.
  • IPv6: 128-bit, e.g., 2001:db8::1.
  • Public IP: Reachable on the internet.
  • Private IP: Used within local networks.
  • Static IP: Fixed address.
  • Dynamic IP: Assigned automatically by DHCP.
  • Subnet mask: Separates network and host portions.
  • Gateway: Router used to reach other networks.
  • Loopback: 127.0.
  • MAC address: Physical device address; IP address Logical network address.