Ch11.10.1: Network Basics

The OSI Model (Open Systems Interconnection)

The OSI model is a conceptual framework that standardizes the functions of a communication system into seven abstraction layers:

Layer Name Description Examples
7 Application High-level protocols for user applications HTTP, FTP, SMTP, DNS, SSH
6 Presentation Data representation, encryption, compression SSL/TLS, JPEG, MPEG
5 Session Managing sessions between applications NetBIOS, RPC
4 Transport Reliable data transfer between hosts TCP, UDP
3 Network Routing and forwarding of packets IP, ICMP, ARP
2 Data Link Node-to-node data transfer Ethernet, Wi-Fi, PPP
1 Physical Physical transmission of raw bits Ethernet cables, fiber optics, radio waves

In practice, the TCP/IP model (a simpler 4-layer model) is more commonly used:

IP Addresses: IPv4 and IPv6

An IP address uniquely identifies a device on a network. There are two versions:

IPv4

IPv6

Common Ports

A port is a 16-bit number (0–65535) that identifies a specific service on a host. Well-known ports (0–1023) are assigned by IANA:

Port Protocol Service
20–21 TCP FTP (File Transfer Protocol)
22 TCP SSH (Secure Shell)
23 TCP Telnet (unencrypted, avoid)
25 TCP SMTP (Simple Mail Transfer Protocol)
53 TCP/UDP DNS (Domain Name System)
67–68 UDP DHCP (Dynamic Host Configuration Protocol)
80 TCP HTTP (Hypertext Transfer Protocol)
110 TCP POP3 (Post Office Protocol v3)
143 TCP IMAP (Internet Message Access Protocol)
443 TCP HTTPS (HTTP Secure)
465 TCP SMTPS (SMTP over SSL)
587 TCP SMTP (submission, with STARTTLS)
993 TCP IMAPS (IMAP over SSL)
995 TCP POP3S (POP3 over SSL)
3306 TCP MySQL
3389 TCP RDP (Remote Desktop Protocol)
5432 TCP PostgreSQL
5900 TCP VNC (Virtual Network Computing)
6379 TCP Redis
8080 TCP HTTP alternate (often used for proxies)
8443 TCP HTTPS alternate
27017 TCP MongoDB

Note: Ports 0–1023 are well-known ports (require root/admin to bind). Ports 1024–49151 are registered ports. Ports 49152–65535 are dynamic/ephemeral ports (used for client-side connections).