CSC 498 · Computer Network and Data Communications
Our notes
2 min readProtocols
A protocol is a set of rules for communication: syntax (format of messages), semantics (meaning of each field and what to do), timing (when and how fast). Standards come from ISO, ITU-T, IEEE (802 LANs) and IETF (Internet RFCs).
Why layers
A big problem is split into layers, each giving services to the layer above and using the one below. Layers can change separately (Wi-Fi replaces Ethernet without changing your browser).
The OSI reference model (ISO, 1984)
| Layer | Job | Examples |
|---|---|---|
| 7 Application | services for users | HTTP, SMTP, FTP, DNS |
| 6 Presentation | format, encryption, compression | TLS encryption, JPEG, character codes |
| 5 Session | dialogue control, checkpoints | session set-up in RPC |
| 4 Transport | end-to-end delivery, reliability, ports | TCP, UDP |
| 3 Network | addressing and routing between networks | IP, ICMP, routers |
| 2 Data link | frames on one link, MAC addresses, error detection | Ethernet, Wi-Fi MAC, PPP, switches |
| 1 Physical | bits as signals on the medium | cables, connectors, voltages, modulation |
Memory aid (top down): "All People Seem To Need Data Processing".
The TCP/IP model (the Internet's)
| TCP/IP layer | OSI layers | Protocols |
|---|---|---|
| Application | 5-7 | HTTP/HTTPS, DNS, SMTP, IMAP, SSH, DHCP |
| Transport | 4 | TCP (reliable, ordered, connection-oriented: web, email); UDP (fast, no guarantees: video calls, DNS, games) |
| Internet | 3 | IP (IPv4, IPv6), ICMP (ping), routing protocols |
| Link (network access) | 1-2 | Ethernet, Wi-Fi, 4G/5G |
Encapsulation
Each layer adds its own header to the data from above: application data → TCP segment → IP packet → Ethernet frame → bits. The receiver strips the headers layer by layer. A web request carries a TCP header (ports, sequence numbers), an IP header (addresses) and an Ethernet header (MAC addresses).
TCP in outline
- Three-way handshake: SYN → SYN-ACK → ACK.
- Sequence numbers and acknowledgements; retransmission after a timeout.
- Flow control (receiver window) and congestion control (slow start, back off when packets are lost).
- Ports identify the application: 80 HTTP, 443 HTTPS, 53 DNS, 25 SMTP, 22 SSH.
Flow control: stop-and-wait
The sender sends one frame and waits for its acknowledgement. Simple, but the line sits idle while waiting.
Link utilisation U = 1/(1 + 2a), where a = propagation time ÷ transmission time.
Worked example. 1,000-bit frames on a 1 Mbps link (transmission 1 ms) with 10 ms propagation: a = 10; U = 1/21 = 4.8%. On a short LAN (a ≈ 0.01) U ≈ 98%.
Sliding window
The sender may have up to W frames unacknowledged. U = 1 if W ≥ 1 + 2a, otherwise W/(1 + 2a).
Worked example. For the link above, W = 21 frames keeps the line fully busy. Sequence numbers must count at least as high as the window (with 3-bit numbers, W ≤ 7 for go-back-N).
- Go-back-N: on an error, resend that frame and all after it. Selective repeat: resend only the bad frame (needs buffering at the receiver).
Exams usually ask: define protocol and its elements; why layering; the OSI layers with functions and examples; compare OSI and TCP/IP; encapsulation; TCP versus UDP; stop-and-wait utilisation; sliding window size.
Common mistake: putting routers at the data link layer or switches at the network layer. Ordinary switches work with MAC addresses (layer 2); routers forward by IP address (layer 3).
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Computer Networks: A Systems Approach, 1.3 Architecture
(opens book.systemsapproach.org in a new tab)
Peterson and Davie, Computer Networks: A Systems Approach, Computer Networks: A Systems Approach, 1.3 Architecture, CC BY 4.0 · licence
-
OSI model
(opens en.wikipedia.org in a new tab)
Wikipedia, OSI model, CC BY-SA 4.0 · licence
-
Internet protocol suite
(opens en.wikipedia.org in a new tab)
Wikipedia, Internet protocol suite, CC BY-SA 4.0 · licence
Watch
-
Network Protocols & Communications (Part 1)
12 min · ≈ 54 MB · about ₦30
(opens youtube.com in a new tab)
-
The OSI Reference Model (Part 1)
8 min · ≈ 36 MB · about ₦20
(opens youtube.com in a new tab)
-
The OSI Reference Model (Part 2)
12 min · ≈ 54 MB · about ₦30
(opens youtube.com in a new tab)
-
The TCP/IP Protocol Suite
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.