Circuit switching and packet switching · 电路交换与分组交换
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| circuit switching/ˈsɜːkɪt ˈswɪtʃɪŋ/ | 电路交换 | diàn lù jiāo huàn |
| packet switching/ˈpækɪt ˈswɪtʃɪŋ/ | 分组交换 | fēn zǔ jiāo huàn |
| dedicated path/ˈdedɪkeɪtɪd pæθ/ | 专用路径 | zhuān yòng lù jìng |
| bandwidth/ˈbændwɪdθ/ | 带宽 | dài kuān |
| sequence number/ˈsiːkwəns ˈnʌmbə/ | 序号 | xù hào |
| router/ˈruːtə/ | 路由器 | lù yóu qì |
| multiplexed/ˌmʌltɪˈplekst/ | 多路复用 | duō lù fù yòng |
| variable latency/ˈveərɪəbl ˈleɪtənsi/ | 延迟 | yán chí |
The network built to survive its own destruction
- In 1964 Paul Baran was asked how a communications network could keep working after a nuclear strike. Every existing network failed the test, because a telephone call reserved one path and cutting that path ended the call.
- His answer was to stop reserving paths. Chop each message into small blocks, address every block, and let each one find its own way; if a link disappears, the next block simply goes round it.
- The idea was rejected as unworkable for years. It is now how essentially all data moves, and it is why the internet has no centre to cut.
- This lesson is circuit switching 电路交换 and packet switching 分组交换: how each works, what each costs, and which suits which traffic.
为在自身被摧毁后仍能运转而建的网络
- 1964 年,Paul Baran 被问到:一个通信网络怎样才能在核打击之后继续工作。当时所有的网络都通不过这个测试,因为一通电话要预留一条路径,切断那条路径,通话就结束了。
- 他的答案是不再预留路径。把每条消息切成小块,给每一块加上地址,让每一块自己找路;如果某条链路消失了,下一块绕过去就是。
- 这个想法有好几年被认为不可行。如今几乎所有数据都是这样流动的,这也是互联网没有一个可以被切断的中心的原因。
- 这一课讲电路交换(circuit switching)和分组交换(packet switching):各自怎样工作、各自的代价,以及哪种适合哪种流量。
Circuit switching
- A dedicated path 专用路径 is set up between the two ends before any data is sent, held for the whole conversation, and released at the end.
- Benefits: the bandwidth 带宽 is reserved, so the rate is guaranteed and constant, and data arrives in order with a predictable delay.
- Drawbacks: it is inefficient, because during silences the reserved line sits idle and nobody else may use it, and it is slow to set up, because the path must be established first. One broken link cuts the circuit and the conversation ends.
- The classic example is the traditional telephone network.
Reserved for the whole call, used or not
电路交换
- 在发送任何数据之前,先在两端之间建立一条专用路径(dedicated path),整个会话期间一直占用,结束时释放。
- 好处:带宽(bandwidth)被预留,所以速率有保证且恒定,数据按序到达,延迟可预测。
- 坏处:它低效,因为在沉默期间被预留的线路空闲着,别人也不能用;而且建立慢,因为必须先把路径建起来。一条链路断了就切断电路,会话结束。
- 典型例子是传统电话网。

整通电话期间被预留,用不用都一样
In circuit switching: · 在电路交换中:
Circuit switching reserves one path end-to-end (reserved bandwidth) — but it wastes the line during silences. · 电路交换端到端预留一条路径(预留的带宽)——但它在沉默期间浪费线路。
What is the main drawback of circuit switching? · 电路交换的主要缺点是什么?
Reserving the path guarantees the rate and the order, and that is exactly what makes it wasteful. The other three describe packet switching. · 预留路径保证了速率和顺序,而这恰恰是它浪费的原因。另外三项描述的是分组交换。
Packet switching
- The message is split into packets, each sent independently. Every packet carries the destination and source addresses and a sequence number 序号.
- Each router 路由器 makes a per-packet decision about the next hop, so packets may take different routes and arrive out of order. The destination uses the sequence numbers to reassemble the message, and missing packets can be requested again.
- Benefits: efficient, because one link is multiplexed 多路复用 across many conversations and carries data only when there is data; robust, because traffic reroutes around a failed link.
- Drawbacks: variable latency 延迟, since packets queue at routers, and packets can be lost, so reliability must be added above, by TCP.
Same message, many paths, reassembled at the end
分组交换
- 消息被切成数据包,每个独立发送。每个数据包带着目的地址和源地址以及一个序列号(sequence number)。
- 每台路由器(router)对每个数据包单独决定下一跳,所以数据包可能走不同的路线并乱序到达。目的端用序列号重组消息,丢失的数据包可以再次请求。
- 好处:高效,因为一条链路被许多会话多路复用(multiplexed),只在有数据时才承载数据;健壮,因为流量会绕过失效的链路重新选路。
- 坏处:延迟(latency)可变,因为数据包在路由器排队;数据包可能丢失,所以可靠性必须由上层的 TCP 添加。

同一条消息,多条路径,末端重组
A packet's journey across the internet · 一个数据包穿越互联网的旅程
Step through packet switching. The message is split up, each packet finds its own way, and the destination puts them back together — which is why the internet is so efficient and hard to break. · 逐步走过分组交换。消息被拆开,每个数据包找到它自己的路,目的地把它们重新组合起来——这就是为什么互联网如此高效且难以破坏。
A key advantage of packet switching is that it is: · 分组交换的一个关键优点是它:
Sharing links is efficient and rerouting makes it resilient. The trade-off is variable latency and possible loss (TCP fixes that). · 共享链路是高效的,重新路由使它有弹性。权衡是可变的延迟和可能的丢失(TCP 修复那个)。
Because each packet carries a sequence number, the destination can reassemble the message in the right order and re-request any missing packet. · 因为每个数据包携带一个序列号,目的地能以正确的顺序重组消息并重新请求任何丢失的数据包。
Packets may arrive out of order or be lost; the sequence numbers (and TCP) put everything right. · 数据包可能乱序到达或丢失;序列号(和 TCP)把一切弄对。
What a router does
- A router joins two or more networks. For each packet it reads the destination IP address, looks it up in its routing table, and forwards the packet out of the appropriate interface towards the destination.
- It holds no memory of the conversation: two packets of the same message may leave by different interfaces if the table has changed between them.
- That per-packet decision is exactly what makes rerouting around a failure automatic.
路由器做什么
- 路由器连接两个或更多网络。对每个数据包,它读取目的 IP 地址,在路由表中查找,然后从合适的接口把数据包转发向目的地。
- 它不记住这次会话:同一条消息的两个数据包,如果两次之间路由表变了,可能从不同接口离开。
- 正是这种逐包决策,让绕过故障重新选路自动发生。
Put the stages of sending a message by packet switching in order. · 把用分组交换发送一条消息的各阶段按顺序排列。
Split, address, route, arrive, reassemble. That is the five-mark answer to "explain how packet switching passes a message". · 切分、寻址、选路、到达、重组。这就是"解释分组交换怎样传送消息"的五分答案。
Worked example: describe packet switching
- Explain how packet switching is used to pass a message across the internet. [5]
- The message is broken into small packets. Each packet carries the destination address, the source address and a sequence number.
- Each packet travels through the network independently, with routers choosing the next hop for each one, so packets may take different paths and arrive out of order.
- The destination uses the sequence numbers to reassemble the message in the right order, and any missing packet can be requested again.
- Five sentences, five marks. Leaving out the sequence numbers or the reassembly loses two of them.
例题:描述分组交换
- 解释分组交换怎样把一条消息送过互联网。[5]
- 消息被切成小的数据包。每个数据包带着目的地址、源地址和一个序列号。
- 每个数据包独立地穿过网络,路由器为每一个选择下一跳,所以数据包可能走不同路径、乱序到达。
- 目的端用序列号按正确顺序重组消息,任何丢失的数据包都可以再次请求。
- 五句话,五分。漏掉序列号或重组会丢掉其中两分。
A router reads the destination address of every ____ and forwards it towards its destination. · 路由器读取每个____的目的地址,并把它转发向目的地。
The decision is made per packet, with no memory of the conversation, which is what lets traffic reroute around a failure automatically. · 决策是逐包做出的,不记住会话,这让流量能自动绕过故障重新选路。
Side by side
| Aspect | Circuit switching | Packet switching |
|---|---|---|
| path | dedicated, reserved end to end | shared, chosen per packet |
| setup | slow, before any data | none |
| bandwidth use | inefficient, idle during silences | efficient, multiplexed |
| order | always in order | may arrive out of order |
| on a failure | the circuit is cut | reroute around it |
| delay | constant and predictable | variable |
| suits | constant-rate flows, voice | bursty flows, web and email |
并排对比
| 方面 | 电路交换 | 分组交换 |
|---|---|---|
| 路径 | 端到端专用、预留 | 共享、逐包选择 |
| 建立 | 慢,在任何数据之前 | 无 |
| 带宽利用 | 低效,沉默时空闲 | 高效,多路复用 |
| 顺序 | 总是按序 | 可能乱序到达 |
| 出故障时 | 电路被切断 | 绕过它重新选路 |
| 延迟 | 恒定且可预测 | 可变 |
| 适合 | 恒定速率的流,语音 | 突发性的流,网页和邮件 |
Match each term to what it means. · 把每个术语与它的含义配对。
Circuit = one reserved path; packet = independent packets reordered by sequence number — what the internet uses. · 电路 = 一条预留的路径;分组 = 由序列号重新排序的独立数据包——互联网用的。
The modern internet uses: · 现代互联网用:
The internet uses packet switching for its efficiency and resilience. · 互联网为了它的高效和弹性用分组交换。
Worked example: which method for which traffic
- A phone call and a large file download share a network. Which switching method suits each, and why?
- The phone call needs a steady stream at a constant rate with low, predictable delay, and it would suffer badly if pieces arrived late or out of order. Circuit switching suits it: a path is reserved for the whole call and its capacity is guaranteed.
- The file download does not care about the order of arrival or short delays, since the file is reassembled before it is used, and it is bursty. Packet switching suits it: the link is shared with other traffic and used only when data is flowing.
- Name the method, name the property of the traffic, and connect them.
例题:哪种流量用哪种方法
- 一通电话和一次大文件下载共享一个网络。各适合哪种交换方法,为什么?
- 电话需要恒定速率的稳定流,延迟低且可预测,如果片段迟到或乱序会严重受影响。电路交换适合它:整通电话预留一条路径,容量有保证。
- 文件下载不在意到达顺序和短暂延迟,因为文件在使用前会被重组,而且它是突发性的。分组交换适合它:链路与其他流量共享,只在有数据流动时才占用。
- 说出方法、说出流量的性质,并把两者连起来。
Which properties make circuit switching a good fit for a telephone call? Select all · 所有 that apply. · 哪些性质让电路交换适合一通电话?选出所有适用的。
Efficient sharing is packet switching's advantage, and it is the thing circuit switching gives up in exchange for the guarantees. · 高效共享是分组交换的优点,也是电路交换为换取那些保证而放弃的东西。
Marks that slip away
- Packets can arrive out of order, and the sequence numbers are what fix that. Both halves are needed.
- Circuit switching's drawback is the idle reserved line, not "it is old".
- The router's decision is made per packet, which is what makes rerouting automatic.
- Packet switching does not guarantee delivery on its own; TCP adds that above it.
容易丢掉的分
- 数据包可能乱序到达,而序列号正是解决这个问题的东西。两半都要有。
- 电路交换的缺点是被预留却空闲的线路,不是"它太老了"。
- 路由器的决策是逐包做出的,这正是重新选路能自动发生的原因。
- 分组交换本身不保证送达;TCP 在它之上添加了这一点。
You've got it
- circuit switching reserves a dedicated path before sending: guaranteed bandwidth and order, but idle during silences, slow to set up, and cut by one failure
- packet switching splits the message into independently routed packets carrying addresses and sequence numbers, reassembled at the destination
- a router decides the next hop per packet, so traffic reroutes around failures automatically
- packet switching is efficient and robust with variable latency; circuit switching suits constant voice flows, packet switching suits bursty data
你掌握了
- 电路交换在发送前预留一条专用路径:带宽和顺序有保证,但沉默时空闲、建立慢,一处故障就被切断
- 分组交换把消息切成独立选路的数据包,携带地址和序列号,在目的端重组
- 路由器对每个数据包决定下一跳,所以流量会自动绕过故障重新选路
- 分组交换高效、健壮但延迟可变;电路交换适合恒定的语音流,分组交换适合突发的数据