Communication & Internet Technologies
Protocols Β· TCP/IP Β· Circuit vs Packet Switching
- Devices are made by different manufacturers
- Ensures data is sent/received in a compatible format
- Defines error checking, flow control, addressing
- Allows interoperability across the entire internet
Protocol implementations are modelled as layers. Each layer has specific responsibilities and only communicates with the layers directly above and below it.
HTTP (HyperText Transfer Protocol) β transfers web pages from server to browser. Stateless: each request is independent.
HTTPS adds TLS/SSL encryption β all data is encrypted in transit. Used wherever security matters (banking, login pages).
FTP (File Transfer Protocol) β transfers files between a client and server. Uses two separate connections: one for control commands, one for data. Supports authentication (username/password).
| Protocol | Purpose | Direction |
|---|---|---|
| SMTP | Simple Mail Transfer Protocol β sends email from client to server, or between servers | Outgoing |
| POP3 | Post Office Protocol 3 β downloads email to device and (by default) deletes from server | Incoming |
| IMAP | Internet Message Access Protocol β accesses email on server; stays synced across multiple devices | Incoming |
BitTorrent is a peer-to-peer (P2P) protocol β files are distributed across many users rather than downloaded from one central server.
- File is split into many small chunks/pieces
- Each downloader simultaneously uploads pieces they already have
- A tracker coordinates who has which pieces
- As more people download, the network gets faster (not slower)
There are two fundamental approaches to routing data across a network:
π Circuit Switching
- Dedicated physical path established before transmission
- Path reserved for entire duration
- Guaranteed bandwidth
- No routing delays mid-call
- Inefficient β line idle during silence
- If path fails β connection drops
π¦ Packet Switching
- Data split into independent packets
- Each packet routed independently
- Packets may take different routes
- Reassembled at destination
- Efficient β bandwidth shared dynamically
- Resilient β packets reroute around failures
Every packet contains a header with routing info, the data payload, and error-checking bits:
IP
IP
No.
sum
| Field | Purpose |
|---|---|
| Source IP | Where the packet came from |
| Destination IP | Where the packet is going |
| Sequence number | Allows reassembly in correct order |
| Data payload | The actual content (fragment of the original message) |
| Checksum | Error detection β receiver checks if data was corrupted in transit |
- Segmentation: Sending computer splits message into numbered packets
- Header added: Each packet gets source IP, dest IP, sequence number, checksum
- Routing: Each router reads destination IP and forwards to next router (packets may take different routes)
- Arrival: Packets arrive at destination, possibly out of order
- Reassembly: TCP uses sequence numbers to reassemble packets in correct order
- Error checking: If checksum fails or packet lost β TCP requests retransmission
- Know all 4 TCP/IP layers and their protocols by name
- Be able to describe the journey of a message from one host to another
- Compare circuit vs packet switching β benefits, drawbacks, use cases
- Explain the role of a router: reading headers and using routing tables
- Know what each field in a packet header is for
- BitTorrent = P2P, not client-server β know why it scales well
