Computer Networks – Study Notes
Subject: Networking
1. OSI Model
Layer Name Protocol/Example
7 Application HTTP, FTP, SMTP, DNS
6 Presentation SSL/TLS, JPEG, ASCII
5 Session NetBIOS, RPC
4 Transport TCP, UDP
3 Network IP, ICMP, OSPF
2 Data Link Ethernet, PPP, MAC
1 Physical Cables, Hubs, Bits
2. TCP vs UDP
TCP: Connection-oriented, reliable, ordered, flow/congestion control. Uses 3-way handshake (SYN,
SYN-ACK, ACK). Used for HTTP, FTP, email.
UDP: Connectionless, unreliable, no ordering. Faster, lower overhead. Used for DNS, VoIP, video
streaming, gaming.
3. IP Addressing & Subnetting
IPv4: 32-bit address. Classes: A ([Link]-[Link]), B (128-191.x.x.x), C (192-223.x.x.x).
CIDR: /n notation where n = number of network bits. Subnet mask: /24 = [Link] = 256 hosts
(254 usable).
Subnetting formula: Hosts per subnet = 2h - 2 where h = host bits. Subnets = 2s where s = stolen bits.
4. Routing Protocols
RIP: Distance vector, max 15 hops, uses Bellman-Ford, updates every 30s.
OSPF: Link state, uses Dijkstra, faster convergence, no hop limit, uses areas.
BGP: Path vector, used between autonomous systems (Internet backbone).
5. Application Layer Protocols
HTTP (port 80), HTTPS (443), FTP (21), SSH (22), DNS (53), DHCP (67/68), SMTP (25), POP3 (110),
IMAP (143).