Computer Science · Topic Cheatsheet
Topic 3 · Networks
39 key results accumulated across 3 chapters.
Network
Ch 1
Two or more devices that can exchange data. Whether wired or wireless, scale doesn't matter.
PAN
Ch 1
Personal Area Network. ~10 m. Phone + earbuds.
LAN
Ch 1
Local Area Network. ~100 m. Home/office/school. One organisation.
MAN
Ch 1
Metropolitan. Kilometres. Across a city.
WAN
Ch 1
Wide Area. Countries/global. The Internet is the largest WAN.
Star topology
Ch 1
All devices → central hub/switch. Most common. Hub fail = network dead.
Bus
Ch 1
One shared cable. Cheap. One break kills all.
Ring
Ch 1
Loop. Predictable. One device down breaks ring.
Mesh
Ch 1
Many connections. Redundant + expensive. Used in backbone routers.
Client–server
Ch 1
Dedicated server provides services; clients request. Centralised. Single point of failure unless replicated.
Peer-to-peer (P2P)
Ch 1
Every peer = client + server. Decentralised. Resilient. BitTorrent, Bitcoin.
Hub vs switch vs router
Ch 1
Hub = dumb broadcast. Switch = smart, within LAN (L2, MAC). Router = between networks (L3, IP).
Internet ≠ Web
Ch 1
Internet = the network. Web (HTTP/HTML) = one service that runs on it. Email, gaming also on the Internet.
Protocol
Ch 2
Agreed RULES for communication. Specifies format + order + error handling.
Packet
Ch 2
Data fragment + header (src+dst addr, sequence) + footer (error-check).
Packet switching
Ch 2
Messages split into packets, each routed independently, reassembled by sequence.
Circuit switching
Ch 2
Dedicated line per call (old telephone). Wasteful + fragile compared to packet switching.
TCP
Ch 2
Reliable, ordered, slower. 3-way handshake (SYN/SYN-ACK/ACK). For web, email, files.
UDP
Ch 2
Fast, no guarantees. For video/voice/gaming/DNS — anywhere freshness beats reliability.
Common app protocols
Ch 2
HTTP (80) · HTTPS (443) · DNS (53) · FTP (21) · SMTP (25) · SSH (22).
OSI 7 layers
Ch 2
Physical · Data Link · Network · Transport · Session · Presentation · Application. (Please Do Not Throw Sausage Pizza Away.)
TCP/IP 4 layers
Ch 2
Link · Internet · Transport · Application. What the real Internet uses.
Encapsulation
Ch 2
Each layer wraps in own header (and sometimes footer). Reversed on receive.
Address scopes
Ch 2
MAC = same LAN. IP = whole Internet. Port = which app on the device.
Router vs Switch layer
Ch 2
Router = L3 (Network/IP). Switch = L2 (Data Link/MAC).
Bluetooth
Ch 3
~10 m, low power, 1–50 Mbps. PAN. Earbuds, peripherals. 2.4 GHz.
Wi-Fi
Ch 3
~50–100 m, medium power, 100 Mbps–9 Gbps. LAN. Home/office. 2.4/5/6 GHz.
Cellular (4G/5G)
Ch 3
km via towers, high power, 100 Mbps–Gbps. WAN. Mobile. Hand-off between cells.
Frequency trade-off
Ch 3
Higher freq = more bandwidth BUT shorter range + worse wall penetration.
CIA triad
Ch 3
Confidentiality (no peeking) · Integrity (no tampering) · Availability (reachable).
Symmetric encryption
Ch 3
Same key both sides. Fast. AES, ChaCha20. Key-distribution problem.
Asymmetric encryption
Ch 3
Public key encrypts; private key decrypts. RSA, ECC. ~1000× slower. Solves key distribution.
HTTPS hybrid
Ch 3
Asymmetric for the handshake (share session key) → symmetric AES for bulk data. Best of both.
Digital signature
Ch 3
Encrypt hash with PRIVATE key; verify with PUBLIC key. Proves origin + integrity.
TLS certificate
Ch 3
Site's public key signed by a Certificate Authority (CA). Browser verifies → green padlock.
MFA
Ch 3
Multi-factor: KNOW (password) + HAVE (phone) + ARE (fingerprint). Defeats stolen passwords.
Hashing vs encryption
Ch 3
Hashing = one-way (for passwords, with salt + bcrypt/Argon2). Encryption = reversible.
Threats
Ch 3
MITM · phishing · DoS/DDoS · malware · SQL injection · XSS · brute force.
Padlock ≠ safe site
Ch 3
HTTPS encrypts CONNECTION. Phishing sites can have valid HTTPS too. Always check URL.