Introduction to Computer Networking

Welcome to your comprehensive guide on computer networking basics. This handbook will walk you through the fundamental concepts that power the internet and modern digital communication.

Learning Objectives

By the end of this handbook, you will understand:

  • How the TCP/IP protocol suite enables internet communication
  • The role of DNS in translating domain names to IP addresses
  • How load balancing distributes traffic across multiple servers
  • Real-world applications of these technologies

Basic Network Components

Client
Router
Server

This simple diagram shows the basic flow of data from a client through a router to a server.

Real-World Analogy

Think of computer networking like a postal system:

  • IP Addresses are like street addresses
  • DNS is like a phone book that maps names to addresses
  • TCP ensures your package arrives intact and in order
  • Load Balancers are like multiple post offices working together to handle high volumes of mail

TCP/IP Protocol Suite

The TCP/IP protocol suite is the foundation of modern internet communication. It consists of four layers that work together to transmit data across networks.

4

Application Layer

HTTP, FTP, SMTP – Protocols for specific applications

3

Transport Layer

TCP, UDP – Manages end-to-end communication

2

Internet Layer

IP, ICMP – Handles addressing and routing

1

Network Interface Layer

Ethernet, Wi-Fi – Physical connection to the network

TCP vs UDP

Feature TCP UDP
Connection Connection-oriented Connectionless
Reliability High (acknowledgments, retransmissions) Low (no guarantees)
Speed Slower due to overhead Faster with less overhead
Use Cases Web browsing, email, file transfer Video streaming, DNS, gaming

TCP Three-Way Handshake

When establishing a TCP connection, your computer and the server perform a “three-way handshake”:

  1. SYN: Client sends a synchronization packet to the server
  2. SYN-ACK: Server responds with synchronization-acknowledgment
  3. ACK: Client sends final acknowledgment

This process ensures both devices are ready to communicate before data transfer begins.

Domain Name System (DNS)

DNS is often called the “phonebook of the internet” because it translates human-friendly domain names (like google.com) into IP addresses that computers use to identify each other.

DNS Resolution Process

User
Resolver
Root Server
TLD Server
Authoritative Server

DNS resolution involves multiple servers working together to find the correct IP address.

DNS Record Types

Record Type Purpose Example
A Maps domain to IPv4 address example.com → 192.0.2.1
AAAA Maps domain to IPv6 address example.com → 2001:db8::1
CNAME Alias of one domain to another www.example.com → example.com
MX Directs email to mail servers example.com → mail.example.com

DNS in Action: Visiting a Website

When you type “www.amazon.com” in your browser:

  1. Your computer checks its local DNS cache
  2. If not found, it queries your ISP’s DNS resolver
  3. The resolver queries root servers to find .com TLD servers
  4. TLD servers direct to Amazon’s authoritative name servers
  5. Authoritative servers provide the actual IP address
  6. Your browser connects to the IP address to load the website

This entire process typically happens in milliseconds!

Load Balancing

Load balancing distributes network traffic across multiple servers to ensure no single server becomes overwhelmed, improving reliability and performance.

Load Balancer Architecture

Users
Load Balancer
Server 1
Server 2
Server 3

A load balancer distributes incoming requests across multiple backend servers.

Load Balancing Algorithms

Algorithm How It Works Best For
Round Robin Cycles through servers in sequence Servers with similar specifications
Least Connections Sends traffic to server with fewest active connections Long-lasting connections (e.g., database, FTP)
IP Hash Uses client IP to determine server assignment Maintaining user sessions
Weighted Round Robin Round Robin with capacity-based weighting Servers with different capabilities

Load Balancing in E-commerce

During Black Friday sales, e-commerce sites experience massive traffic spikes:

  • A load balancer distributes thousands of simultaneous users across multiple web servers
  • If one server fails, the load balancer redirects traffic to healthy servers
  • Session persistence ensures users stay on the same server during checkout
  • Geographic load balancing directs users to the nearest data center

This ensures the website remains responsive even under extreme load.

TCP Three-Way Handshake Demo

This interactive demonstration shows how TCP establishes a connection using the three-way handshake.

TCP Connection Establishment

Client
Server
Click “Start Handshake” to begin the TCP connection process.

DNS Resolution Demo

See how DNS translates a domain name to an IP address through multiple steps.

DNS Lookup Process

Client
Resolver
Root
TLD
Auth
Click “Start DNS Lookup” to see how domain resolution works.

Load Balancing Demo

Visualize how a load balancer distributes requests across multiple servers.

Request Distribution

Users
Load Balancer
Server 1
Server 2
Server 3
Click “Send Request” to see how load balancing distributes traffic.

Scenario 1: E-commerce Website

An online store needs to handle thousands of concurrent users, especially during peak shopping seasons.

The Challenge

During Black Friday, the website experiences:

  • 10x normal traffic volume
  • Spikes of 50,000+ concurrent users
  • Critical need for 99.99% uptime
  • Secure handling of payment information

Networking Solution

The e-commerce platform implements:

  • Global Load Balancing: Distributes users to nearest data centers
  • TCP Optimization: Fast connection establishment and keep-alives
  • DNS-based Failover: Automatic rerouting if a data center fails
  • SSL Offloading: Load balancers handle encryption to reduce server load

Architecture Diagram

Customers
Global Load Balancer
US Data Center
EU Data Center
Asia Data Center

Each data center has its own local load balancer distributing traffic to multiple application servers.

Scenario 2: Video Streaming Service

A platform like Netflix needs to deliver high-quality video to millions of users simultaneously.

The Challenge

Streaming services must handle:

  • Massive bandwidth requirements
  • Varied connection speeds (mobile vs broadband)
  • Global content delivery with low latency
  • Adaptive bitrate streaming

Networking Solution

The streaming service uses:

  • Content Delivery Network (CDN): Caches videos at edge locations
  • UDP-based Protocols: For real-time video delivery
  • Anycast DNS: Directs users to nearest CDN node
  • TCP for Control: Manages authentication and browsing

Data Flow

  1. User opens the streaming app and authenticates (TCP)
  2. App requests video manifest file (HTTP/TCP)
  3. DNS directs to nearest CDN edge server
  4. Video segments stream via UDP-based protocol
  5. Adaptive bitrate algorithms adjust quality based on network conditions

Scenario 3: Global Company Network

A multinational corporation with offices worldwide needs secure, reliable connectivity.

The Challenge

The company faces:

  • Secure communication between offices
  • Centralized access to corporate resources
  • Reliable connectivity for remote workers
  • Consistent performance across continents

Networking Solution

The IT infrastructure includes:

  • VPN Connections: Secure tunnels between offices
  • Global Load Balancers: For internal applications
  • Split-horizon DNS: Internal vs external resolution
  • Quality of Service (QoS): Prioritizing business traffic

Network Architecture

HQ
Cloud Network
Office EU
Office Asia
Office US

All offices connect through a secure cloud network with centralized authentication and policy enforcement.