A2.3.3 · Data transmissions
Packet Switching
Mailing a whole novel in one giant envelope is risky: lose it, and the entire book is gone. Split it into several smaller parcels, each numbered, and losing one parcel only means resending that one page range, not starting over. Packet switching applies exactly that idea to data.
Explainer
Packet switching works by chopping a piece of data into smaller units called packets, sending each one across the network on its own, and putting them back together into the original data once every packet has arrived.
Each packet carries two very different kinds of content: the actual data (the payload), and information ABOUT that data (the header), which is what makes independent transmission and correct reassembly possible at all.
| Header field | What it's for |
|---|---|
| Source & destination address | Tells every router along the way where the packet came from and where it still needs to go, this is the "routing header" the statement names. |
| Sequence number | Records this packet's position in the original data, so the destination can put every packet back in the right order even if they don't arrive in that order. |
| Checksum | A value calculated from the payload that lets the destination detect whether the packet arrived correctly, or was corrupted in transit and needs to be resent. |
The header, sequence number and checksum together are exactly the "control information" the statement refers to: none of it is the actual message, all of it exists purely to get the message there correctly.
Worked example
Sending a photo across a network
Amelia sends a 4200-byte photo to Jack. Their network's maximum packet size is 1500 bytes (a real limit called the MTU, maximum transmission unit), so the photo has to be split before it can be sent at all.
Segmentation. Amelia's device splits the 4200-byte photo into three packets, each carrying part of the payload, since no single packet can exceed the 1500-byte limit.
Header attached. Each packet gets its own header: Amelia's address as the source, Jack's as the destination, its sequence number, and a checksum calculated from its own payload.
Independent routing. The three packets are sent separately, and each one is free to take a different path if that's what current network conditions favour. Here, packet 2 hits congestion on its usual route and gets sent the long way round.
Arrival, out of order. Jack's device receives packets 1, 3, then 2, in that literal arrival order, not the order Amelia sent them in. This is completely normal for packet switching and has to be expected, not treated as an error.
Reassembly. Jack's device uses each packet's sequence number to put the payloads back in the correct order (1, 2, 3), and checks each checksum along the way. If any checksum had failed, Jack's device would simply request that one specific packet be resent, not the whole photo.
Explainer
Switches vs routers
Both devices forward packets, and both get confused with each other constantly, but they operate at a genuinely different scale and use a genuinely different piece of information to decide where a packet goes next.
Real example: the box on the wall connecting every desktop computer in one office to each other.
- Works within one local network (forwards packets between devices that are already on the same network, it has no concept of a different network beyond its own)
- Reads the MAC address (media access control address, a unique ID built into every device's network hardware; the switch learns which device sits on which physical port by watching traffic, then forwards each packet only to the port that specific device is actually on, not to every device)
Real example: the box that connects that same office's whole local network out to the internet.
- Connects different networks together (decides how a packet gets from one network to a genuinely different one, which is the whole reason data can travel between two different buildings, or out to the wider internet, at all)
- Reads the IP address (inspects the destination IP address and consults its own routing table to work out the best next hop toward it, a genuinely different decision to a switch's)
The one-line version worth memorising: a switch moves a packet to the right device inside one network; a router moves a packet from one network to another network entirely.
Check your understanding
A file is broken into 4 packets and sent across the internet. Packet 3 arrives corrupted, and its checksum fails. What actually happens next?
Common mistake
RecurringA genuinely documented pattern: candidates use "switch" and "router" interchangeably, or describe one device while naming the other, losing marks reserved for the specific mechanism each one actually uses.
Devices swapped: "The router connects all the computers in the office together, and the switch sends the data out to the internet." Has the two devices' jobs backwards, and never mentions the actual mechanism (MAC address vs IP address) either device uses.
Correct device, correct mechanism: "The switch reads each packet's MAC address to forward it to the right device on the same local network. The router reads the destination IP address and uses its routing table to send the packet out toward a different network, like the internet." Names the right device for each role AND the specific piece of information each one reads, which is what actually earns the marks.
Revision questions
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
[2]State two pieces of information a packet's header typically contains.
[4]Explain how a sequence number allows a large file to be correctly reassembled after being sent as separate packets.
Marking points
评分要点
- A large file is split into many packets, each carrying a sequence number recording its position in the original file.
- The packets take independent routes and can arrive in any order.
- The receiving device reads each packet's sequence number and places the payloads back in that numbered order, so the original file is rebuilt correctly regardless of arrival order.
- A missing sequence number tells the receiver which packet to request again.
- 一个大文件被切成许多数据包,每个都带一个记录它在原始文件中位置的序列号。
- 这些数据包走各自独立的路径,可能以任意顺序到达。
- 接收设备读取每个数据包的序列号,把有效载荷按那个编号顺序放回,所以不管到达顺序如何,原始文件都能被正确重建。
- 缺失的序列号告诉接收方要重新请求哪个数据包。
[3]Distinguish between the roles of a switch and a router in forwarding a packet toward its destination.
Marking points
评分要点
- A switch works within one local network and forwards a frame to the right device by reading its MAC address.
- A router connects different networks and forwards a packet toward its destination by reading the destination IP address and consulting its routing table to choose the best next hop.
- A switch moves a packet to the right device inside a network; a router moves it between networks.
- 交换机在一个局域网内工作,通过读取 MAC 地址把帧转发到正确的设备。
- 路由器连接不同的网络,通过读取目标 IP 地址并查阅路由表选择最佳下一跳,把数据包朝目的地转发。
- 交换机把数据包送到网络内正确的设备;路由器在网络之间移动它。
Flashcards
Active recall for this statement’s key terms.
Keep this statement’s practice with you
Free account: unlock every revision question and flashcard for A2.3.3, and every other IB CS 2027 statement.