Skip to content

The Internet and how data travels

Python for AP CS Principles Lesson 12 2:15 English narration · English + 中文 subtitles burned in

space play · ←/→ 5s · j/l 10s · f fullscreen · ,/. speed

Chapters

Transcript
The Internet is an enormous network of computers joined together, and no single one of them is in charge. 互联网是一张巨大的、把计算机连在一起的网络, 而其中没有任何一台是"总管"。
When you send something across it, the data does not travel in one piece. 当你往上面发送东西时,数据并不是整块走的。
It is cut into small pieces called packets. 它被切成一小块一小块,叫作"分组"。
And each packet carries three things: a slice of the data, the address it is going to, and a number giving its order. 而每个分组都带着三样东西: 一小片数据、它要去的地址, 以及一个表明它次序的编号。
Each packet then has to find its way, through computers called routers. 然后每个分组都要自己找路,穿过一台台叫作"路由器"的计算机。
Choosing that path is routing, and different packets can take different paths to the same place. 选择这条路的过程就是路由, 而去往同一个地方的不同分组,可以走不同的路。
Now watch why that matters. 现在看看这为什么要紧。
If router B breaks, the top path is gone — but the packets simply travel through C and D instead and still arrive. 如果路由器 B 坏了,上面那条路就断了—— 但分组只是改走 C 和 D,照样能到。
Having more than one path is redundancy, and still working when one fails is fault tolerance. 有不止一条路,这叫冗余; 一条断了还照样运转,这叫容错。
But if the pieces take different routes, they arrive whenever they arrive — maybe out of order. 但如果这些小块走的是不同的路, 它们就是什么时候到就什么时候到——很可能是乱序的。
That is what the protocols are for. 协议就是为这个而存在的。
A protocol is simply a set of agreed rules. 协议不过是一套约定好的规则。
I P gives every computer an address and helps send each packet. IP 给每台计算机一个地址,并帮忙把每个分组送出去。
T C P checks that all of them arrived and puts them back in order, using those numbers. TCP 负责检查它们是不是都到齐了, 再靠那些编号把它们重新排好顺序。
Three, one, two becomes HELLO FRIEND. 3、1、2 变回了 HELLO FRIEND。
One distinction the exam asks for directly: the Internet and the World Wide Web are not the same thing. 有一个区分是考试会直接问的: 互联网和万维网不是一回事。
The Internet is the network itself — the cables, the routers, T C P and I P. 互联网是那张网络本身——线缆、路由器、TCP 和 IP。
The web is one thing that runs on top of it: pages and links, carried by a protocol called H T T P. 而万维网是跑在它上面的"其中一样东西": 网页和链接,由一个叫 HTTP 的协议来承载。
Your browser sends an H T T P request, and the server sends the page back. 你的浏览器发出一个 HTTP 请求, 服务器就把页面送回来。
Four things to take with you. 带走四点。
One: data is split into packets that travel separately. 第一:数据被切成分组,各走各的路。
Two: routing sends packets by different paths. 第二:路由让分组走不同的路径。
Three: redundancy gives fault tolerance, so the network routes around a failure. 第三:冗余带来容错,所以网络能绕开故障。
Four: the Internet and the World Wide Web are not the same. 第四:互联网和万维网不是一回事。
Now model the journey in the tasks below. 现在去下面的题里把这段旅程模拟一遍。

Log in or create account

IGCSE, A-Level & AP