Home/Learn/Computer Networks/Network Types — LAN, WAN, MAN & VPN

Network Types — LAN, WAN, MAN & VPN

Beginner
Fundamentals

Networks are classified by geographic scope: PAN (personal), LAN (local), MAN (metro), WAN (wide area). VPN extends a private network securely over a public WAN.

Overview

Network classification by scope determines the technology, speed, and ownership model. A LAN (Local Area Network) connects devices within a building or campus — typically Ethernet or Wi-Fi, owned by one organisation. A WAN (Wide Area Network) spans cities, countries, or continents — the internet is the world's largest WAN. A MAN (Metropolitan Area Network) covers a city, often used by ISPs. A PAN (Personal Area Network) covers a few metres — Bluetooth, USB. For backend engineers, the key distinction is LAN vs WAN latency: intra-datacenter communication (LAN) is ~0.1ms; cross-region (WAN) is 50–200ms. VPNs create encrypted tunnels over public WANs to simulate being on a private LAN — used for remote access and connecting cloud VPCs to on-premise networks.

Network Types Comparison

Each network type has distinct characteristics in terms of reach, speed, latency, and ownership. These directly affect distributed system design — you treat intra-datacenter calls differently from cross-region calls.

Network types comparison and microservices implication
// Network types at a glance:
// ┌────────┬─────────────────┬─────────┬──────────┬──────────────────────┐
// │ Type   │ Scope           │ Speed   │ Latency  │ Example              │
// ├────────┼─────────────────┼─────────┼──────────┼──────────────────────┤
// │ PAN    │ < 10 metres     │ ~3 Mbps │ < 1ms    │ Bluetooth, USB       │
// │ LAN    │ Building/Campus │ 1 Gbps+ │ < 1ms    │ Office Wi-Fi         │
// │ MAN    │ City            │ 100Mbps │ 1–10ms   │ ISP city ring        │
// │ WAN    │ Global          │ Varies  │ 50–300ms │ Internet, MPLS links │
// └────────┴─────────────────┴─────────┴──────────┴──────────────────────┘

// In a microservices context:
// Service A → Service B (same datacenter, LAN): ~0.5ms
// Service A → Service B (different region, WAN): ~150ms
// This is why you keep chatty services co-located and use async
// messaging for cross-region communication.

VPN — Virtual Private Network

A VPN creates an encrypted tunnel over a public network (WAN/internet) so remote clients or networks appear to be on the same private LAN. Site-to-site VPNs connect offices; client VPNs give remote employees access to internal resources.

VPN tunnel and types
// How a VPN tunnel works conceptually:
// Remote Developer → [Encrypted IPSec/TLS tunnel] → Corporate VPN Gateway → Internal LAN
//                          (public internet)

// AWS Site-to-Site VPN connects on-premise to AWS VPC:
// On-premise router ←→ AWS Virtual Private Gateway ←→ AWS VPC

// Types of VPN protocols:
// IPSec   — standard enterprise VPN, operates at Layer 3
// OpenVPN — SSL/TLS based, flexible, port 1194 UDP
// WireGuard — modern, fast, minimal codebase, UDP-based

// Cloud VPN example (AWS SDK concept):
// CreateVpnConnectionRequest to link on-prem Customer Gateway
// with AWS Virtual Private Gateway over IPSec tunnel

Key Points to Remember

  • 1LAN: local network (building/campus), < 1ms latency, Ethernet/Wi-Fi.
  • 2WAN: wide area network (internet), 50–300ms latency, leased lines or internet.
  • 3MAN: metropolitan, city-scale, used by ISPs and large enterprises.
  • 4VPN creates an encrypted Layer 3 tunnel over a public WAN.
  • 5Intra-datacenter (LAN) latency ~0.1–1ms; cross-region (WAN) ~50–200ms — design systems accordingly.
  • 6Cloud VPCs are private virtual LANs — inter-VPC traffic over a WAN requires VPC peering or VPN.

Interview Questions

Sign in to ask Aria
1

What is the difference between LAN and WAN?

EasyTCS
2

How does a VPN work at the network layer?

MediumIBM
3

Why do distributed system designers treat intra-datacenter and cross-region calls differently?

MediumAmazon
4

What is the difference between a site-to-site VPN and a client VPN?

MediumCapgemini

Ask Aria about Network Types — LAN, WAN, MAN & VPN

Your personal AI tutor — ask anything about this concept

Revision Status

Personal Notes

Sign in to save personal notes for this topic.

Discussion

Sign in to join the discussion.

Loading discussion…