2.1 · Types and methods of data transmission
2.1 · 数据传输的类型与方式
Packets, packet switching, and how bits travel
数据包、分组交换,以及比特如何传输
How a file is broken into packets and routed across a network, and the three choices made about any data link: one wire or many, one direction or both, and at the same time or not.
文件如何被拆分成数据包并在网络中被路由,以及关于任何数据链路都要做出的三项选择:一根线还是多根线、单向还是双向、同时还是不同时。
Explainer · 2.1.1
讲解 · 2.1.1
Data packets and their structure
数据包及其结构
Data sent across a network is broken down into packets: small, equal-sized blocks that are easier to route and re-send than one long stream. A packet has three parts:
通过网络发送的数据会被拆分成数据包:体积小、大小相等的数据块,比一整段连续的数据流更容易路由和重新发送。一个数据包有三个部分:
| Part | 部分 | What it holds | 包含的内容 |
|---|---|---|---|
| Packet header | 数据包头 | the destination address, the packet number (so packets can be put back in order), and the originator’s address | 目标地址、数据包编号(以便将数据包重新排序),以及发送方地址 |
| Payload | 有效载荷 | the actual data being carried | 所承载的实际数据 |
| Trailer | 包尾 | a marker for the end of the packet, and an error check so the receiver can tell whether the packet arrived intact | 标记数据包的结束,以及一项错误校验,以便接收方判断数据包是否完整无误地到达 |
Use the exact names: header, payload, trailer, not “the top”, “the main bit” or “the end”. For the packet number, say it is this packet’s number so the receiver can reorder them, not just “the sequence”.
要使用准确的名称:包头、有效载荷、包尾,而不是"顶部""主要部分"或"末尾"。对于数据包编号,要说明它是该数据包自身的编号,以便接收方据此重新排序,而不能只说"顺序"。
Try it yourself
动手试试
The packet explorer
数据包浏览器
Click each part of the packet to see what it carries.
点击数据包的每个部分,查看它所承载的内容。
Explainer · 2.1.1(c)
讲解 · 2.1.1(c)
Packet switching
分组交换
Packet switching is how those packets travel:
分组交换就是这些数据包传输的方式:
| Step | 步骤 | What happens | 发生的过程 |
|---|---|---|---|
| 1 | 1 | the file is divided into packets | 文件被划分成数据包 |
| 2 | 2 | the packets can travel by different routes to the same destination | 这些数据包可以通过不同的路径到达同一目的地 |
| 3 | 3 | a router at each node decides which route each packet takes next, reading the destination address in the header | 每个节点上的路由器会读取包头中的目标地址,决定每个数据包接下来走哪条路径 |
| 4 | 4 | the packets do not always arrive in the order they were sent, because routes differ in length and traffic | 数据包不一定按照发送的顺序到达,因为不同路径的长度和拥堵程度不同 |
| 5 | 5 | when the final packet has arrived, the receiver puts them back in order using the packet numbers | 当最后一个数据包到达后,接收方会根据数据包编号将它们重新排序 |
“The router sends the packet to its destination” is too vague. The router chooses which route the packet takes next. Different packets of the same message can travel different ways, which is exactly why they need reordering at the end.
"路由器把数据包发送到目的地"这种说法过于笼统。路由器选择数据包接下来走哪条路径。同一条消息的不同数据包可以走不同的路径,这正是为什么最后需要对它们重新排序。
Try it yourself
动手试试
Send a message by packet switching
通过分组交换发送一条消息
Four packets, one network. Step through and watch them split, take different routes, arrive out of order, and get reordered.
四个数据包,一个网络。逐步演示,观察它们被拆分、走不同的路径、乱序到达,再被重新排序的过程。
Explainer · 2.1.2
讲解 · 2.1.2
Serial, parallel, and the duplexes
串行、并行与双工方式
Every data link makes two separate choices.
每一条数据链路都要做出两项独立的选择。
How many bits at once
一次传输多少比特
| Serial | 串行 | Parallel | 并行 | ||
|---|---|---|---|---|---|
| How | 方式 | one bit at a time down a single wire | 沿单根导线一次一比特传输 | several bits at once (usually one byte) down several wires, one bit per wire | 沿多根导线(每根导线传一个比特)一次传输多个比特(通常是一个字节) |
| Speed | 速度 | slower | 较慢 | faster | 较快 |
| Distance | 距离 | works well over long distances; bits stay in order | 在长距离下表现良好;比特能保持顺序 | only over short distances; past about 20 m the wires fall out of step and bits arrive skewed (out of sync) | 只适合短距离;超过约 20 米后,各导线会不同步,比特到达时出现偏斜(不同步) |
| Cost / interference | 成本/干扰 | fewer wires, so cheaper and less interference | 导线更少,因此成本更低、干扰更小 | more wires, so more expensive and more interference | 导线更多,因此成本更高、干扰更大 |
| Used for | 应用场景 | USB, connecting devices, sending data down a telephone line | USB、连接各种设备、通过电话线发送数据 | inside a computer, on the short internal buses between components | 计算机内部,组件之间的短距离内部总线 |
Which direction, and when
方向,以及时机
| Mode | 方式 | Direction | 方向 | Example | 示例 |
|---|---|---|---|---|---|
| Simplex | 单工 | one direction only | 仅单一方向 | a computer to a printer; a sensor to a computer | 计算机到打印机;传感器到计算机 |
| Half-duplex | 半双工 | both directions, but not at the same time | 双向,但不能同时进行 | a walkie-talkie | 对讲机 |
| Full-duplex | 全双工 | both directions at the same time | 同时双向传输 | a phone call; a broadband connection | 电话通话;宽带连接 |
The two choices are independent: a link can be serial half-duplex, serial full-duplex, parallel simplex, and so on. Serial sends bits one at a time, not packets. Skew is a parallel problem, never a serial one. For full-duplex, always add “at the same time”.
这两项选择是相互独立的:一条链路可以是串行半双工、串行全双工、并行单工等等。串行一次传输的是比特,而不是数据包。偏斜是并行特有的问题,绝不会出现在串行中。谈到全双工时,一定要加上"同时"这个说法。
Try it yourself
动手试试
Watch the bits move
观察比特移动
One byte, 10011011, sent two ways. Serial pushes the bits down one wire in turn; parallel puts one bit on each of eight wires and sends them together.
一个字节 10011011,以两种方式发送。串行依次沿一根导线推送比特;并行则把每个比特分别放在八根导线上,一起发送。
Try it yourself
动手试试
Match the scenario
匹配应用场景
For each situation, choose the number of wires and the direction. Then check.
针对每种情境,选择导线数量和传输方向,然后检查答案。
Explainer · 2.1.3
讲解 · 2.1.3
The universal serial bus (USB)
通用串行总线(USB)
USB is a serial connection, and the standard way to plug a device into a computer.
USB 是一种串行连接,也是把设备接入计算机的标准方式。
| Benefits | 优点 | Drawbacks | 缺点 |
|---|---|---|---|
| the device is detected automatically and the right driver is loaded | 设备被自动检测,并加载正确的驱动程序 | the cable length is limited (about 5 m) without a hub | 若无集线器,线缆长度有限(约 5 米) |
| the connector fits only one way, preventing wrong connections | 接口只能以一种方式插入,防止接错 | slower than some alternatives such as an Ethernet connection | 比某些替代方案(如以太网连接)慢 |
| it is an industry standard, so it is widely supported | 它是行业标准,因此得到广泛支持 | the earliest versions may not be supported by newer machines | 最早期的版本可能不被较新的机器支持 |
| the cable carries power, so many devices need no separate supply | 线缆能传输电力,因此许多设备无需单独供电 | ||
| errors are detected and the data is re-sent automatically | 错误会被检测出来,数据会被自动重新发送 |
USB is short range. “It can send data a long way” is a common wrong answer. Its strengths are being universal, self-configuring and powered, not distance.
USB 是短距离连接。"它可以把数据发送到很远的地方"是一个常见的错误答案。它的优势在于通用性、自动配置以及供电能力,而不是传输距离。
Check your understanding
检验你的理解
Which of these is not found in a packet header?
以下哪一项不属于数据包头的内容?
Check your understanding
检验你的理解
Two people talk on a normal phone call, both able to speak and hear at once. Which transmission mode is this?
两人正在进行一次普通的电话通话,双方都能同时说话和听到对方。这属于哪种传输方式?
Check your understanding
检验你的理解
In serial data transmission, what travels down the wire one after another?
在串行数据传输中,沿导线一个接一个传输的是什么?
Common mistakes
常见错误
2.1.1 / 2.1.2 / 2.1.3
考官针对 2.1.1 / 2.1.2 / 2.1.3 报告了以下模式
RecurringCandidates think serial sends packets one at a time. It sends bits one at a time down a single wire. Packets are made of many bits.
反复出现考生认为串行是一次发送一个数据包。实际上它是沿一根导线一次发送一个比特。数据包是由许多比特组成的。
Full-duplex is described as “both directions” without “at the same time”, which is what separates it from half-duplex. Diagrams are drawn with two-way arrows for simplex, or arrows that do not match the label.
全双工被描述为"双向",却没有加上"同时",而这正是它与半双工的区别所在。图示中给单工画了双向箭头,或者箭头方向与标签不符。
On packets, imprecise names: “the top of the packet” for the header, “the main section” for the payload. For the packet number, “the sequence” is not enough, it is this packet’s own number, used to reorder them.
在数据包方面,名称不准确:把包头说成"数据包的顶部",把有效载荷说成"主要部分"。对于数据包编号,只说"顺序"是不够的,它是该数据包自身的编号,用来将数据包重新排序。
On the router, “it sends the packet to its destination” instead of “it decides the route the packet takes”. Skew is wrongly blamed on serial (it is a parallel effect). On USB, “it can transmit data a long way” is given as a benefit, but USB is short range. And on suitability questions, candidates describe how a method works instead of explaining why it fits the scenario.
在路由器方面,考生说"它把数据包发送到目的地",而不是"它决定数据包所走的路径"。偏斜被错误地归咎于串行(它其实是并行特有的现象)。在 USB 方面,"它能把数据传送到很远的地方"被当作一项优点,但 USB 其实是短距离连接。在适用性问题上,考生描述某种方法如何运作,而不是解释为什么它适合该情境。
Vague: “Full-duplex means data can go both ways.”
模糊:"全双工意味着数据可以双向传输。"
Precise: “Full-duplex means data can travel in both directions at the same time.”
准确:"全双工意味着数据可以同时双向传输。"
Describes, does not explain: “They chose serial because serial sends one bit at a time down one wire.”
只描述,不解释:"他们选择了串行,因为串行沿一根导线一次发送一个比特。"
Explains the choice: “They chose serial because the printer is several metres away, and serial is reliable over that distance with no risk of skew.”
解释了选择的原因:"他们选择了串行,因为打印机距离有几米远,而串行在这个距离上可靠,不存在偏斜的风险。"
Revision questions
复习题
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
采用历年真题风格。写下答案,然后展开评分要点给自己打分。
[3]Name the three parts of a data packet, and state one item held in the packet header.
[3]说出数据包的三个组成部分,并陈述数据包头中所含的一项内容。
Marking points
评分要点
- The three parts: header, payload, trailer.
- One item held in the header (any one): the destination address; the sender's / originator's address; the packet number.
- 三个部分:数据包头、有效载荷、数据包尾。
- 数据包头中的一项(任选其一):目标地址;发送方地址;数据包编号。
[4]Describe the process of packet switching, including the role of a router.
[4]描述分组交换的过程,包括路由器所起的作用。
Marking points
评分要点
- The message is split into packets.
- Each packet is sent independently; a router at each step chooses the route the packet takes next (based on traffic or the shortest available path).
- Different packets of the same message can take different routes.
- Packets may arrive out of order and are reassembled into the correct order using the packet numbers, once the last packet has arrived.
- 消息被拆分成数据包。
- 每个数据包独立发送;每一步的路由器根据流量或当前最短可用路径,选择数据包接下来走的路径。
- 同一消息的不同数据包可以走不同的路径。
- 数据包可能乱序到达,等最后一个到达后,利用数据包编号重新组装成正确的顺序。
[2]Give one difference between half-duplex and full-duplex data transmission.
[2]说出半双工与全双工数据传输之间的一项区别。
Marking points
评分要点
- Half-duplex: data can travel in both directions, but only one direction at a time.
- Full-duplex: data can travel in both directions at the same time.
- 半双工:数据可以双向传输,但同一时刻只能朝一个方向。
- 全双工:数据可以同时双向传输。
[4]A computer sends data to a device 15 metres away, and the device sends status messages back. State a suitable transmission method and justify each part of your choice.
[4]一台计算机向 15 米外的设备发送数据,该设备也会回传状态消息。请陈述一种合适的传输方式,并为你的选择的每一部分说明理由。
Marking points
评分要点
- Method: serial transmission (over 15 m, parallel would suffer skew and be unreliable).
- Direction: full-duplex, or half-duplex, because data goes both ways (computer to device, and status messages back).
- Justify each part: serial is reliable over that distance with no skew; the duplex choice is because both ends need to send.
- USB is a suitable serial connection for this.
- 方式:串行传输(超过 15 米时,并行会因时滞而不可靠)。
- 方向:全双工或半双工,因为数据是双向的(计算机到设备,以及状态信息返回)。
- 对每部分说明理由:串行在该距离上可靠且无时滞;选择双工是因为两端都需要发送。
- USB 是适合的串行连接。
[3]Give two benefits and one drawback of using a USB connection.
[3]说出使用 USB 连接的两项优点和一项缺点。
Marking points
评分要点
- Two benefits (any two): it is a universal / standard connector; the device is powered through the cable; it is self-configuring / plug and play (drivers install automatically); it is hard to connect the wrong way.
- One drawback: short cable length / limited range; (or an older USB standard is slower than some alternatives).
- 两个优点(任选两点):它是通用 / 标准的接口;设备通过线缆供电;它自动配置 / 即插即用(自动安装驱动);不易插反。
- 一个缺点:线缆长度短 / 传输距离有限;(或较旧的 USB 标准比某些替代方案慢)。
Flashcards
记忆卡片
Active recall for this subtopic’s key terms.
针对本子主题关键术语的主动回忆练习。
Keep this subtopic’s practice with you
把这个子主题的练习保存下来
Free account: unlock every revision question and flashcard for 2.1, and every other IGCSE 0478 statement.
免费账户:解锁 2.1 以及所有其他 IGCSE 0478 考纲陈述的全部复习题和记忆卡片。