/
Lecture 21 Network Programming Part 1.ass
1760 lines (1757 loc) · 178 KB
/
Lecture 21 Network Programming Part 1.ass
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[Script Info]
; Script generated by Aegisub r8942
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.601
PlayResX: 1280
PlayResY: 720
[Aegisub Project Garbage]
Last Style Storage: Default
Audio File: ../../../../Desktop/csapp/Lecture 21 Network Programming Part 1.mp4
Video File: ../../../../Desktop/csapp/Lecture 21 Network Programming Part 1.mp4
Video AR Mode: 4
Video AR Value: 1.777778
Video Zoom Percent: 1.000000
Scroll Position: 857
Active Line: 865
Video Position: 138293
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: English,Source Han Sans CN,30,&H00FFFFFF,&H00412A2C,&H00412A2C,&H00412A2C,0,0,0,0,100,100,0,0,1,2.2,1,2,10,10,10,1
Style: Chinese,Source Han Sans CN,34,&H00FBFD00,&H00FFFFFF,&H00362A28,&H00FFFFFF,0,0,0,0,100,100,0,0,1,2,0.2,2,10,10,10,1
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.80,0:00:02.02,English,,0,0,0,,Good afternoon everyone
Dialogue: 0,0:00:00.80,0:00:02.02,Chinese,,0,0,0,,大家下午好
Dialogue: 0,0:00:04.12,0:00:07.60,English,,0,0,0,,So today we're going to transition into a topic that
Dialogue: 0,0:00:04.12,0:00:07.60,Chinese,,0,0,0,,所以今天我们将转变为一个主题
Dialogue: 0,0:00:08.10,0:00:17.24,English,,0,0,0,,To me is sort of the reward for having slugged through all the low-level stuff you've done up to this point
Dialogue: 0,0:00:08.10,0:00:17.24,Chinese,,0,0,0,,对我来说,这是一种奖励,因为你已经完成了迄今为止所做的所有低级别的工作
Dialogue: 0,0:00:17.68,0:00:23.54,English,,0,0,0,,To be able to really understand and become adept at programming network software
Dialogue: 0,0:00:17.68,0:00:23.54,Chinese,,0,0,0,,能够真正理解并擅长编程网络软件
Dialogue: 0,0:00:24.12,0:00:27.20,English,,0,0,0,,Now there's a lot to networking that we're not going to cover
Dialogue: 0,0:00:24.12,0:00:27.20,Chinese,,0,0,0,,现在网络上有很多我们不会涉及的内容
Dialogue: 0,0:00:27.20,0:00:29.86,English,,0,0,0,,But at least to have some familiarity with it
Dialogue: 0,0:00:27.20,0:00:29.86,Chinese,,0,0,0,,但至少要熟悉它
Dialogue: 0,0:00:30.46,0:00:34.88,English,,0,0,0,,So I know that a lot of you are sort of in the midst of trying to figure out
Dialogue: 0,0:00:30.46,0:00:34.88,Chinese,,0,0,0,,所以我知道你很多人都想要弄明白
Dialogue: 0,0:00:34.88,0:00:37.12,English,,0,0,0,,How to make malloc run and make it run fast
Dialogue: 0,0:00:34.88,0:00:37.12,Chinese,,0,0,0,,如何使malloc运行并使其快速运行
Dialogue: 0,0:00:37.92,0:00:43.52,English,,0,0,0,,And so this topic is really more pointing toward the future
Dialogue: 0,0:00:37.92,0:00:43.52,Chinese,,0,0,0,,因此,这个主题更加注重未来
Dialogue: 0,0:00:43.52,0:00:46.70,English,,0,0,0,,But it's very relevant to the final web lab you'll do for the course
Dialogue: 0,0:00:43.52,0:00:46.70,Chinese,,0,0,0,,但它与你为该课程所做的最终网络实验室非常相关
Dialogue: 0,0:00:47.58,0:00:50.32,English,,0,0,0,,And so we're starting to get ready for that
Dialogue: 0,0:00:47.58,0:00:50.32,Chinese,,0,0,0,,所以我们开始为此做好准备
Dialogue: 0,0:00:56.90,0:01:00.58,English,,0,0,0,,So like I said this course is not really a full course in networking
Dialogue: 0,0:00:56.90,0:01:00.58,Chinese,,0,0,0,,就像我说的那样,这门课程并不是一个完整的网络课程
Dialogue: 0,0:01:00.58,0:01:03.38,English,,0,0,0,,There's many other courses at the university that are
Dialogue: 0,0:01:00.58,0:01:03.38,Chinese,,0,0,0,,大学还有很多其他课程
Dialogue: 0,0:01:03.80,0:01:07.28,English,,0,0,0,,And so what we're going to try and do is give you just a little flavor of it
Dialogue: 0,0:01:03.80,0:01:07.28,Chinese,,0,0,0,,所以我们要尝试做的就是给你一点点味道
Dialogue: 0,0:01:07.28,0:01:10.86,English,,0,0,0,,And particularly as everything in the course of programmers perspective
Dialogue: 0,0:01:07.28,0:01:10.86,Chinese,,0,0,0,,特别是作为程序员视角的一切
Dialogue: 0,0:01:11.04,0:01:20.80,English,,0,0,0,,So how you as a software developer would make use of the C level api's that are relevant to network programming
Dialogue: 0,0:01:11.04,0:01:20.80,Chinese,,0,0,0,,因此,作为软件开发人员,你将如何利用与网络编程相关的C级API
Dialogue: 0,0:01:24.44,0:01:26.74,English,,0,0,0,,And why isn't this working
Dialogue: 0,0:01:24.44,0:01:26.74,Chinese,,0,0,0,,为什么这不起作用
Dialogue: 0,0:01:31.68,0:01:32.70,English,,0,0,0,,Okay so
Dialogue: 0,0:01:31.68,0:01:32.70,Chinese,,0,0,0,,可以,然后呢
Dialogue: 0,0:01:33.68,0:01:39.92,English,,0,0,0,,The idea behind most networking systems is what's called the client-server model
Dialogue: 0,0:01:33.68,0:01:39.92,Chinese,,0,0,0,,大多数网络系统背后的想法是所谓的客户端 - 服务器模型
Dialogue: 0,0:01:40.44,0:01:44.38,English,,0,0,0,,And the idea is that there's a service out there that you want access to
Dialogue: 0,0:01:40.44,0:01:44.38,Chinese,,0,0,0,,我们的想法是,你需要访问的服务
Dialogue: 0,0:01:44.88,0:01:49.58,English,,0,0,0,,And you as a customer or a client are making a request to that server
Dialogue: 0,0:01:44.88,0:01:49.58,Chinese,,0,0,0,,而你作为客户或客户正在向该服务器发出请求
Dialogue: 0,0:01:49.72,0:01:54.14,English,,0,0,0,,So an example would be when you order something on amazon
Dialogue: 0,0:01:49.72,0:01:54.14,Chinese,,0,0,0,,所以当你在亚马逊上订购东西时就是一个例子
Dialogue: 0,0:01:54.20,0:01:56.34,English,,0,0,0,,Amazon has a bunch of servers
Dialogue: 0,0:01:54.20,0:01:56.34,Chinese,,0,0,0,,亚马逊有很多服务器
Dialogue: 0,0:01:57.10,0:02:04.12,English,,0,0,0,,And you go to your web browser and contacts the amazon a web server
Dialogue: 0,0:01:57.10,0:02:04.12,Chinese,,0,0,0,,然后你去你的网络浏览器并联系亚马逊网络服务器
Dialogue: 0,0:02:04.50,0:02:08.90,English,,0,0,0,,And you make transactions you request something you provide information
Dialogue: 0,0:02:04.50,0:02:08.90,Chinese,,0,0,0,,并且你在交易时要求提供信息
Dialogue: 0,0:02:09.32,0:02:14.56,English,,0,0,0,,And it gives you back pretty pictures of things you might want to buy
Dialogue: 0,0:02:09.32,0:02:14.56,Chinese,,0,0,0,,它会为你提供你可能想要购买的漂亮照片
Dialogue: 0,0:02:14.84,0:02:17.06,English,,0,0,0,,It acknowledges your credit card transactions
Dialogue: 0,0:02:14.84,0:02:17.06,Chinese,,0,0,0,,它承认你的信用卡交易
Dialogue: 0,0:02:17.42,0:02:21.20,English,,0,0,0,,Those are all very classic client-server types of interactions
Dialogue: 0,0:02:17.42,0:02:21.20,Chinese,,0,0,0,,这些都是非常经典的客户端 - 服务器类型的交互
Dialogue: 0,0:02:21.64,0:02:24.36,English,,0,0,0,,You as the client,amazon is the server
Dialogue: 0,0:02:21.64,0:02:24.36,Chinese,,0,0,0,,你作为客户端,亚马逊是服务器
Dialogue: 0,0:02:24.84,0:02:27.36,English,,0,0,0,,Another interesting example is a telephone
Dialogue: 0,0:02:24.84,0:02:27.36,Chinese,,0,0,0,,另一个有趣的例子是电话
Dialogue: 0,0:02:28.14,0:02:32.40,English,,0,0,0,,So if you think about it a telephone is both a client and a server in that
Dialogue: 0,0:02:28.14,0:02:32.40,Chinese,,0,0,0,,所以如果你考虑一下,电话既是客户又是服务器
Dialogue: 0,0:02:33.18,0:02:36.62,English,,0,0,0,,When I'm making a placing a call to somebody else
Dialogue: 0,0:02:33.18,0:02:36.62,Chinese,,0,0,0,,当我打电话给别人时
Dialogue: 0,0:02:37.08,0:02:41.46,English,,0,0,0,,I'm the client and that person's phone is the server right
Dialogue: 0,0:02:37.08,0:02:41.46,Chinese,,0,0,0,,我是客户端,那个人的电话就是服务器权利
Dialogue: 0,0:02:41.96,0:02:45.92,English,,0,0,0,,It's sitting there waiting for calls to come in
Dialogue: 0,0:02:41.96,0:02:45.92,Chinese,,0,0,0,,它正坐在那里等待来电
Dialogue: 0,0:02:46.44,0:02:49.42,English,,0,0,0,,And when that call comes in it makes a connection
Dialogue: 0,0:02:46.44,0:02:49.42,Chinese,,0,0,0,,当那个电话进来时它会建立联系
Dialogue: 0,0:02:49.90,0:02:54.86,English,,0,0,0,,We talk over the phone and then I hang up either side hangs up
Dialogue: 0,0:02:49.90,0:02:54.86,Chinese,,0,0,0,,我们通过电话交谈,然后我挂断了任何一方挂断电话
Dialogue: 0,0:02:54.94,0:02:59.92,English,,0,0,0,,So there's a lot of instances out there of some variation of client and server
Dialogue: 0,0:02:54.94,0:02:59.92,Chinese,,0,0,0,,因此,客户端和服务器的某些变体有很多实例
Dialogue: 0,0:02:59.92,0:03:06.76,English,,0,0,0,,And it's a much richer idea in that you can often switch back and forth the roles of those two parties
Dialogue: 0,0:02:59.92,0:03:06.76,Chinese,,0,0,0,,这是一个更丰富的想法,因为你经常可以来回切换这两方的角色
Dialogue: 0,0:03:06.88,0:03:15.18,English,,0,0,0,,But it's a pretty universal and a ubiquitous way of thinking about how to set up a network system
Dialogue: 0,0:03:06.88,0:03:15.18,Chinese,,0,0,0,,但它是一种非常普遍且无处不在的思考如何建立网络系统的方式
Dialogue: 0,0:03:16.30,0:03:21.82,English,,0,0,0,,So in general then the idea is that there's a...system working
Dialogue: 0,0:03:16.30,0:03:21.82,Chinese,,0,0,0,,所以一般来说,这个想法就是......系统正在运行
Dialogue: 0,0:03:23.44,0:03:26.90,English,,0,0,0,,The client is making some requests to the server
Dialogue: 0,0:03:23.44,0:03:26.90,Chinese,,0,0,0,,客户端正在向服务器发出一些请求
Dialogue: 0,0:03:27.70,0:03:30.96,English,,0,0,0,,The server does something locally to deal with it
Dialogue: 0,0:03:27.70,0:03:30.96,Chinese,,0,0,0,,服务器在本地执行某些操作来处理它
Dialogue: 0,0:03:31.04,0:03:37.28,English,,0,0,0,,It receive it gets information that retrieves from its database the things you might want to buy
Dialogue: 0,0:03:31.04,0:03:37.28,Chinese,,0,0,0,,它接收它获取的信息,从其数据库中检索你可能想要购买的东西
Dialogue: 0,0:03:38.34,0:03:44.38,English,,0,0,0,,And then it sends back information say a nicely formatted a web page with all kinds of shopping suggestions
Dialogue: 0,0:03:38.34,0:03:44.38,Chinese,,0,0,0,,然后它发回信息说一个格式很好的网页,上面有各种购物建议
Dialogue: 0,0:03:45.28,0:03:47.34,English,,0,0,0,,And then the client decides what to do next
Dialogue: 0,0:03:45.28,0:03:47.34,Chinese,,0,0,0,,然后客户决定下一步该做什么
Dialogue: 0,0:03:49.22,0:03:51.66,English,,0,0,0,,So from a hardware perspective the
Dialogue: 0,0:03:49.22,0:03:51.66,Chinese,,0,0,0,,所以从硬件角度来看
Dialogue: 0,0:03:52.28,0:03:56.75,English,,0,0,0,,Interface to a between the network and
Dialogue: 0,0:03:52.28,0:03:56.75,Chinese,,0,0,0,,网络与网络之间的接口
Dialogue: 0,0:03:57.44,0:04:02.92,English,,0,0,0,,Your computer is called the NIC or network interface card even though it's not always on a card
Dialogue: 0,0:03:57.44,0:04:02.92,Chinese,,0,0,0,,你的计算机称为NIC或网络接口卡,即使它并非总是在卡上
Dialogue: 0,0:04:03.66,0:04:08.90,English,,0,0,0,,And we really won't talk about hardware at all
Dialogue: 0,0:04:03.66,0:04:08.90,Chinese,,0,0,0,,我们真的不会谈论硬件
Dialogue: 0,0:04:08.90,0:04:13.16,English,,0,0,0,,But what's most interesting from it is that
Dialogue: 0,0:04:08.90,0:04:13.16,Chinese,,0,0,0,,但最令人感兴趣的是
Dialogue: 0,0:04:14.44,0:04:18.36,English,,0,0,0,,It looks to your computer like an I/O device
Dialogue: 0,0:04:14.44,0:04:18.36,Chinese,,0,0,0,,它看起来像你的计算机I / O设备
Dialogue: 0,0:04:19.00,0:04:23.92,English,,0,0,0,,And in fact the UNIX of api for dealing with networks
Dialogue: 0,0:04:19.00,0:04:23.92,Chinese,,0,0,0,,事实上,用于处理网络的api的UNIX
Dialogue: 0,0:04:24.38,0:04:25.68,English,,0,0,0,,Makes it look like a file
Dialogue: 0,0:04:24.38,0:04:25.68,Chinese,,0,0,0,,使它看起来像一个文件
Dialogue: 0,0:04:26.38,0:04:30.66,English,,0,0,0,,So in particular just as a disk sits off of a bus
Dialogue: 0,0:04:26.38,0:04:30.66,Chinese,,0,0,0,,所以特别是当磁盘离开总线时
Dialogue: 0,0:04:31.42,0:04:34.46,English,,0,0,0,,And you write data to a disk
Dialogue: 0,0:04:31.42,0:04:34.46,Chinese,,0,0,0,,并且你将数据写入磁盘
Dialogue: 0,0:04:35.08,0:04:36.60,English,,0,0,0,,Or you read it from a disk
Dialogue: 0,0:04:35.08,0:04:36.60,Chinese,,0,0,0,,或者你从磁盘上读取它
Dialogue: 0,0:04:37.12,0:04:40.74,English,,0,0,0,,Similarly the network sits of a similar bus
Dialogue: 0,0:04:37.12,0:04:40.74,Chinese,,0,0,0,,类似地,网络位于类似的总线上
Dialogue: 0,0:04:41.18,0:04:44.44,English,,0,0,0,,And when you want to send a message you actually do it by writing
Dialogue: 0,0:04:41.18,0:04:44.44,Chinese,,0,0,0,,当你想发送信息时,你实际上是通过写作来实现的
Dialogue: 0,0:04:44.92,0:04:47.92,English,,0,0,0,,To a sort of virtual file that's called the network
Dialogue: 0,0:04:44.92,0:04:47.92,Chinese,,0,0,0,,对于一种称为网络的虚拟文件
Dialogue: 0,0:04:48.72,0:04:52.14,English,,0,0,0,,And if you want...when you're receiving data you do it by reading
Dialogue: 0,0:04:48.72,0:04:52.14,Chinese,,0,0,0,,如果你想...当你收到数据时,你可以通过阅读来实现
Dialogue: 0,0:04:52.28,0:04:56.48,English,,0,0,0,,So just as several weeks ago I gave the lecture on I/O
Dialogue: 0,0:04:52.28,0:04:56.48,Chinese,,0,0,0,,就像几个星期前我就I / O进行了演讲
Dialogue: 0,0:04:57.18,0:05:00.56,English,,0,0,0,,It turns out that it's extremely relevant to network programming
Dialogue: 0,0:04:57.18,0:05:00.56,Chinese,,0,0,0,,事实证明,它与网络编程非常相关
Dialogue: 0,0:05:00.56,0:05:08.48,English,,0,0,0,,That's the basic model that was created by the early developers of the sort of standard UNIX
Dialogue: 0,0:05:00.56,0:05:08.48,Chinese,,0,0,0,,这是由标准UNIX的早期开发人员创建的基本模型
Dialogue: 0,0:05:08.98,0:05:14.02,English,,0,0,0,,And now that's carried over not just to UNIX but it's the same model for windows and other operating systems
Dialogue: 0,0:05:08.98,0:05:14.02,Chinese,,0,0,0,,现在,这不仅仅延续到UNIX,而且它与Windows和其他操作系统的模型相同
Dialogue: 0,0:05:15.50,0:05:16.74,English,,0,0,0,,So
Dialogue: 0,0:05:15.50,0:05:16.74,Chinese,,0,0,0,,所以
Dialogue: 0,0:05:19.90,0:05:24.24,English,,0,0,0,,And now let's just talk a little about what computer networking means
Dialogue: 0,0:05:19.90,0:05:24.24,Chinese,,0,0,0,,现在让我们谈谈计算机网络的意义
Dialogue: 0,0:05:24.70,0:05:31.16,English,,0,0,0,,The idea of a network is a collection of systems that are referred to as hosts
Dialogue: 0,0:05:24.70,0:05:31.16,Chinese,,0,0,0,,网络的概念是被称为主机的系统的集合
Dialogue: 0,0:05:32.08,0:05:40.18,English,,0,0,0,,That are able to communicate with each other over some kind of communication fabric let's call
Dialogue: 0,0:05:32.08,0:05:40.18,Chinese,,0,0,0,,这可以通过某种通信结构让我们彼此通信
Dialogue: 0,0:05:40.68,0:05:41.94,English,,0,0,0,,It communications system
Dialogue: 0,0:05:40.68,0:05:41.94,Chinese,,0,0,0,,它是通讯系统
Dialogue: 0,0:05:42.36,0:05:44.60,English,,0,0,0,,And they're sort of partitioned into
Dialogue: 0,0:05:42.36,0:05:44.60,Chinese,,0,0,0,,它们有点被划分为
Dialogue: 0,0:05:45.36,0:05:48.56,English,,0,0,0,,Mostly referred to as lands or local area networks
Dialogue: 0,0:05:45.36,0:05:48.56,Chinese,,0,0,0,,主要称为陆地或局域网
Dialogue: 0,0:05:48.74,0:05:51.90,English,,0,0,0,,That you establish within a small region
Dialogue: 0,0:05:48.74,0:05:51.90,Chinese,,0,0,0,,你在一个小区域内建立
Dialogue: 0,0:05:52.42,0:05:58.68,English,,0,0,0,,And then a wide area network which would be over something the size of a city or perhaps more
Dialogue: 0,0:05:52.42,0:05:58.68,Chinese,,0,0,0,,然后是一个广阔的区域网络,可能超过一个城市或更大的东西
Dialogue: 0,0:06:00.10,0:06:06.12,English,,0,0,0,,And over a enterprise such as CMU it's a very complex set of
Dialogue: 0,0:06:00.10,0:06:06.12,Chinese,,0,0,0,,而对于像CMU这样的企业来说,它是一个非常复杂的组合
Dialogue: 0,0:06:06.16,0:06:12.62,English,,0,0,0,, For example there's wireless base stations that right in this room
Dialogue: 0,0:06:06.16,0:06:12.62,Chinese,,0,0,0,,例如,这个房间里就有无线基站
Dialogue: 0,0:06:12.96,0:06:16.94,English,,0,0,0,,That you're interacting with when you're using a wireless system or your your phone
Dialogue: 0,0:06:12.96,0:06:16.94,Chinese,,0,0,0,,当你使用无线系统或手机时,你正在与之交互
Dialogue: 0,0:06:17.49,0:06:21.56,English,,0,0,0,,And then there's a whole networking infrastructure within the university
Dialogue: 0,0:06:17.49,0:06:21.56,Chinese,,0,0,0,,然后在大学里面有一个完整的网络基础设施
Dialogue: 0,0:06:21.92,0:06:24.42,English,,0,0,0,,The then goes to some commercial providers
Dialogue: 0,0:06:21.92,0:06:24.42,Chinese,,0,0,0,,然后去一些商业提供商
Dialogue: 0,0:06:25.06,0:06:31.32,English,,0,0,0,,At&t in particular that give it access to the commercial internet
Dialogue: 0,0:06:25.06,0:06:31.32,Chinese,,0,0,0,,特别是,它可以访问商业互联网
Dialogue: 0,0:06:31.66,0:06:36.40,English,,0,0,0,,And then there's another set of network connections hosted by the supercomputing center
Dialogue: 0,0:06:31.66,0:06:36.40,Chinese,,0,0,0,,然后是超级计算中心托管的另一组网络连接
Dialogue: 0,0:06:36.70,0:06:43.28,English,,0,0,0,,That give you access to what's called internet 2 which is the resource that's used for communicating among universities
Dialogue: 0,0:06:36.70,0:06:43.28,Chinese,,0,0,0,,这使你可以访问所谓的互联网2,这是用于大学之间通信的资源
Dialogue: 0,0:06:43.98,0:06:48.61,English,,0,0,0,,So underneath you know when you're doing your networking stuff
Dialogue: 0,0:06:43.98,0:06:48.61,Chinese,,0,0,0,,所以你知道什么时候你正在做你的网络工作
Dialogue: 0,0:06:48.61,0:06:52.06,English,,0,0,0,,There's this amazingly complex combination of things going on
Dialogue: 0,0:06:48.61,0:06:52.06,Chinese,,0,0,0,,这种惊人的复杂组合正在进行中
Dialogue: 0,0:06:53.02,0:06:57.78,English,,0,0,0,,The idea of an internet is supposed is refers to the idea
Dialogue: 0,0:06:53.02,0:06:57.78,Chinese,,0,0,0,,假设互联网的概念是指这个想法
Dialogue: 0,0:06:58.24,0:07:01.34,English,,0,0,0,,The general idea of a network of networks
Dialogue: 0,0:06:58.24,0:07:01.34,Chinese,,0,0,0,,网络网络的总体思路
Dialogue: 0,0:07:01.62,0:07:06.46,English,,0,0,0,,Taking for example the local area network that this base station provides
Dialogue: 0,0:07:01.62,0:07:06.46,Chinese,,0,0,0,,以该基站提供的局域网为例
Dialogue: 0,0:07:06.94,0:07:10.57,English,,0,0,0,,And connecting it up to other networks on campus and across the world
Dialogue: 0,0:07:06.94,0:07:10.57,Chinese,,0,0,0,,并将其连接到校园和世界各地的其他网络
Dialogue: 0,0:07:11.28,0:07:14.36,English,,0,0,0,,And when we refer to the capital i internet
Dialogue: 0,0:07:11.28,0:07:14.36,Chinese,,0,0,0,,当我们提到首都互联网时
Dialogue: 0,0:07:15.22,0:07:20.32,English,,0,0,0,,That refers to the one instance the most significant instance of an internet
Dialogue: 0,0:07:15.22,0:07:20.32,Chinese,,0,0,0,,这指的是互联网最重要的一个实例
Dialogue: 0,0:07:20.32,0:07:25.68,English,,0,0,0,,So i means the sort of general idea of creating a network of networks
Dialogue: 0,0:07:20.32,0:07:25.68,Chinese,,0,0,0,,所以我的意思是创建网络网络的一般概念
Dialogue: 0,0:07:26.22,0:07:31.74,English,,0,0,0,,Uppercase i(I) is the specific example that we all know and use all the time
Dialogue: 0,0:07:26.22,0:07:31.74,Chinese,,0,0,0,,大写i(I)是我们都知道并且一直使用的具体示例
Dialogue: 0,0:07:32.14,0:07:37.42,English,,0,0,0,,That's organized by a certain set of principles that uses a particular set of protocols and so forth
Dialogue: 0,0:07:32.14,0:07:37.42,Chinese,,0,0,0,,这是由一组使用特定协议等的原则组织的
Dialogue: 0,0:07:37.98,0:07:41.20,English,,0,0,0,,And of course we tend to just talk the internet
Dialogue: 0,0:07:37.98,0:07:41.20,Chinese,,0,0,0,,当然,我们倾向于只谈互联网
Dialogue: 0,0:07:41.40,0:07:49.54,English,,0,0,0,,And most people know that what that really implies is the sort of existing network structure that there is
Dialogue: 0,0:07:41.40,0:07:49.54,Chinese,,0,0,0,,大多数人都知道,真正意味着现有的网络结构
Dialogue: 0,0:07:51.44,0:07:53.84,English,,0,0,0,,And that's good enough for the purpose of this course
Dialogue: 0,0:07:51.44,0:07:53.84,Chinese,,0,0,0,,这对于本课程来说已经足够了
Dialogue: 0,0:07:53.84,0:07:57.56,English,,0,0,0,,We're not going to talk much about other possible designs one might have for a network
Dialogue: 0,0:07:53.84,0:07:57.56,Chinese,,0,0,0,,我们不打算谈论可能为网络设计的其他可能的设计
Dialogue: 0,0:07:58.60,0:08:04.76,English,,0,0,0,,So most of the low level networking is supported by something called Ethernet
Dialogue: 0,0:07:58.60,0:08:04.76,Chinese,,0,0,0,,因此大多数低级网络都被称为以太网的东西支持
Dialogue: 0,0:08:05.22,0:08:08.76,English,,0,0,0,,And the term Ethernet actually has evolved tremendously over time
Dialogue: 0,0:08:05.22,0:08:08.76,Chinese,,0,0,0,,以太网这个术语实际上随着时间的推移发展得非常迅速
Dialogue: 0,0:08:09.24,0:08:13.84,English,,0,0,0,,So that it's almost more like a brand name that it is in specific technology
Dialogue: 0,0:08:09.24,0:08:13.84,Chinese,,0,0,0,,因此它几乎更像是一个品牌名称,它在特定的技术中
Dialogue: 0,0:08:14.32,0:08:18.50,English,,0,0,0,,And the version you're familiar with the wired version of it
Dialogue: 0,0:08:14.32,0:08:18.50,Chinese,,0,0,0,,你熟悉它的有线版本的版本
Dialogue: 0,0:08:18.50,0:08:23.98,English,,0,0,0,,You have a wire to some sort of a box
Dialogue: 0,0:08:18.50,0:08:23.98,Chinese,,0,0,0,,你有一个电线到某种盒子
Dialogue: 0,0:08:24.70,0:08:28.24,English,,0,0,0,,Like that you plug the your Ethernet jacks into
Dialogue: 0,0:08:24.70,0:08:28.24,Chinese,,0,0,0,,就像你插入以太网插孔一样
Dialogue: 0,0:08:28.68,0:08:30.58,English,,0,0,0,,And historically those were called hubs
Dialogue: 0,0:08:28.68,0:08:30.58,Chinese,,0,0,0,,历史上那些被称为枢纽
Dialogue: 0,0:08:31.08,0:08:36.88,English,,0,0,0,,And the idea of a hub, it was just a repeater that whatever came into it from one computer
Dialogue: 0,0:08:31.08,0:08:36.88,Chinese,,0,0,0,,而对于一个集线器的想法,它只是一个转发器,无论从一台计算机进入它
Dialogue: 0,0:08:36.88,0:08:39.04,English,,0,0,0,,It would broadcast to all the connected machines
Dialogue: 0,0:08:36.88,0:08:39.04,Chinese,,0,0,0,,它将广播到所有连接的机器
Dialogue: 0,0:08:39.70,0:08:43.86,English,,0,0,0,,And so you only want to do this for maybe a dozen or
Dialogue: 0,0:08:39.70,0:08:43.86,Chinese,,0,0,0,,所以你只想做十几个或者那个
Dialogue: 0,0:08:43.88,0:08:49.80,English,,0,0,0,,So machines that it's like a party-line they're all hearing what everybody else is saying
Dialogue: 0,0:08:43.88,0:08:49.80,Chinese,,0,0,0,,所以机器就像派对线一样,他们都听到了其他人所说的话
Dialogue: 0,0:08:50.40,0:08:59.38,English,,0,0,0,,And in fact the original first version the Ethernet did that by everyone interacting over a single cable
Dialogue: 0,0:08:50.40,0:08:59.38,Chinese,,0,0,0,,事实上,以太网最初的第一个版本是由每个人通过单根电缆进行交互而实现的
Dialogue: 0,0:08:59.70,0:09:02.00,English,,0,0,0,,Carrying essentially radio signals and
Dialogue: 0,0:08:59.70,0:09:02.00,Chinese,,0,0,0,,基本上承载无线电信号和
Dialogue: 0,0:09:02.44,0:09:06.10,English,,0,0,0,,And similarly when you're in this room using a wireless internet
Dialogue: 0,0:09:02.44,0:09:06.10,Chinese,,0,0,0,,同样,当你在这个房间使用无线互联网时
Dialogue: 0,0:09:06.98,0:09:09.60,English,,0,0,0,,A wireless internet is sort of like a hub and that
Dialogue: 0,0:09:06.98,0:09:09.60,Chinese,,0,0,0,,无线互联网有点像集线器
Dialogue: 0,0:09:10.30,0:09:15.88,English,,0,0,0,,All the packets that you're sending all across the room
Dialogue: 0,0:09:10.30,0:09:15.88,Chinese,,0,0,0,,你在整个房间发送的所有数据包
Dialogue: 0,0:09:15.88,0:09:21.30,English,,0,0,0,,They're all sort of making use of the same radio frequencies the same communication channel
Dialogue: 0,0:09:15.88,0:09:21.30,Chinese,,0,0,0,,他们都使用相同的无线电频率和相同的通信频道
Dialogue: 0,0:09:21.64,0:09:28.80,English,,0,0,0,,And there's a protocol for how they detect when two messages get set at the same time and therefore interfere with each other
Dialogue: 0,0:09:21.64,0:09:28.80,Chinese,,0,0,0,,并且有一个协议,用于检测两个消息何时同时设置并因此相互干扰
Dialogue: 0,0:09:29.44,0:09:34.38,English,,0,0,0,,So that can only sort of scale up to maybe at most a hundred different
Dialogue: 0,0:09:29.44,0:09:34.38,Chinese,,0,0,0,,所以这只能扩展到最多可能达到一百种不同
Dialogue: 0,0:09:36.68,0:09:41.02,English,,0,0,0,,Hosts communicating because they're all sharing a single communication channel
Dialogue: 0,0:09:36.68,0:09:41.02,Chinese,,0,0,0,,主持通信,因为它们都共享一个通信通道
Dialogue: 0,0:09:41.78,0:09:46.68,English,,0,0,0,,Now in the wired world what's evolved is usually when you buy a box
Dialogue: 0,0:09:41.78,0:09:46.68,Chinese,,0,0,0,,现在在有线世界中,通常在你购买盒子时会发展
Dialogue: 0,0:09:47.48,0:09:49.32,English,,0,0,0,,Or you get one from your cable company
Dialogue: 0,0:09:47.48,0:09:49.32,Chinese,,0,0,0,,或者你从有线电视公司那里得到一个
Dialogue: 0,0:09:49.94,0:09:56.48,English,,0,0,0,,With all those ports in it, it's actually called a router or sometimes a switch in that
Dialogue: 0,0:09:49.94,0:09:56.48,Chinese,,0,0,0,,有了所有这些端口,它实际上被称为路由器或有时称为交换机
Dialogue: 0,0:09:59.16,0:10:01.68,English,,0,0,0,,It doesn't broadcast to everyone
Dialogue: 0,0:09:59.16,0:10:01.68,Chinese,,0,0,0,,它不向所有人广播
Dialogue: 0,0:10:01.70,0:10:04.38,English,,0,0,0,,It selectively tries to guess
Dialogue: 0,0:10:01.70,0:10:04.38,Chinese,,0,0,0,,它有选择地试图猜测
Dialogue: 0,0:10:05.12,0:10:08.74,English,,0,0,0,,Is this particular message bound for this particular host
Dialogue: 0,0:10:05.12,0:10:08.74,Chinese,,0,0,0,,此特定邮件是否绑定到此特定主机
Dialogue: 0,0:10:09.48,0:10:11.94,English,,0,0,0,,And only send to that one
Dialogue: 0,0:10:09.48,0:10:11.94,Chinese,,0,0,0,,只发送给那个
Dialogue: 0,0:10:12.34,0:10:14.86,English,,0,0,0,,And as you know you can take these and wire up
Dialogue: 0,0:10:12.34,0:10:14.86,Chinese,,0,0,0,,如你所知,你可以把它们连接起来
Dialogue: 0,0:10:15.36,0:10:18.82,English,,0,0,0,,I think about up to 6 levels deep in and hub
Dialogue: 0,0:10:15.36,0:10:18.82,Chinese,,0,0,0,,我认为最多有6个级别和hub
Dialogue: 0,0:10:19.48,0:10:24.66,English,,0,0,0,,And basically create a network of wired connections
Dialogue: 0,0:10:19.48,0:10:24.66,Chinese,,0,0,0,,并且基本上创建了有线连接网络
Dialogue: 0,0:10:25.18,0:10:27.60,English,,0,0,0,,And they'll all get from one to the other somehow
Dialogue: 0,0:10:25.18,0:10:27.60,Chinese,,0,0,0,,他们都会以某种方式从一个到另一个
Dialogue: 0,0:10:28.82,0:10:35.23,English,,0,0,0,,And then after that it gets more complicated you can add more sophisticated types of switching on top of it
Dialogue: 0,0:10:28.82,0:10:35.23,Chinese,,0,0,0,,然后,它会变得更加复杂,你可以在其上添加更复杂的切换类型
Dialogue: 0,0:10:35.90,0:10:40.52,English,,0,0,0,,But so the general idea of even an Ethernet is actually a fairly complex thing
Dialogue: 0,0:10:35.90,0:10:40.52,Chinese,,0,0,0,,但是,甚至以太网的总体思路实际上也是一件相当复杂的事情
Dialogue: 0,0:10:41.28,0:10:44.92,English,,0,0,0,,But it's some sort of conceptual level we can just think of it as a bunch of hosts
Dialogue: 0,0:10:41.28,0:10:44.92,Chinese,,0,0,0,,但它是某种概念层面我们可以把它想象成一堆主机
Dialogue: 0,0:10:45.48,0:10:47.26,English,,0,0,0,,That can talk directly to one another
Dialogue: 0,0:10:45.48,0:10:47.26,Chinese,,0,0,0,,这可以直接相互对话
Dialogue: 0,0:10:49.42,0:10:56.14,English,,0,0,0,,And then an internet then refers to the idea of taking those local area networks and connecting them together
Dialogue: 0,0:10:49.42,0:10:56.14,Chinese,,0,0,0,,然后互联网就是指采用这些局域网并将它们连接在一起的想法
Dialogue: 0,0:10:56.74,0:11:02.46,English,,0,0,0,,Via routers and routers obey a particular protocol based on the address
Dialogue: 0,0:10:56.74,0:11:02.46,Chinese,,0,0,0,,通过路由器和路由器遵循基于地址的特定协议
Dialogue: 0,0:11:02.70,0:11:04.42,English,,0,0,0,,That you're trying to send data to
Dialogue: 0,0:11:02.70,0:11:04.42,Chinese,,0,0,0,,你正在尝试将数据发送到
Dialogue: 0,0:11:05.34,0:11:06.18,English,,0,0,0,,And
Dialogue: 0,0:11:05.34,0:11:06.18,Chinese,,0,0,0,,和
Dialogue: 0,0:11:08.78,0:11:16.72,English,,0,0,0,,And so what you end up with conceptually is a whole bunch of hosts spread potentially all across the world
Dialogue: 0,0:11:08.78,0:11:16.72,Chinese,,0,0,0,,因此,你最终在概念上最终会在全世界范围内传播一大堆主机
Dialogue: 0,0:11:17.26,0:11:20.02,English,,0,0,0,,And then some magical system of routers
Dialogue: 0,0:11:17.26,0:11:20.02,Chinese,,0,0,0,,然后是一些神奇的路由器系统
Dialogue: 0,0:11:20.42,0:11:22.96,English,,0,0,0,,That will get a message from one place to the other
Dialogue: 0,0:11:20.42,0:11:22.96,Chinese,,0,0,0,,这将从一个地方到另一个地方收到消息
Dialogue: 0,0:11:23.24,0:11:29.08,English,,0,0,0,,Based on a mode of addressing where there's some known address of the hosts
Dialogue: 0,0:11:23.24,0:11:29.08,Chinese,,0,0,0,,基于寻址模式,其中存在一些已知的主机地址
Dialogue: 0,0:11:29.08,0:11:30.50,English,,0,0,0,,That you're trying to send to
Dialogue: 0,0:11:29.08,0:11:30.50,Chinese,,0,0,0,,那你要发送给
Dialogue: 0,0:11:30.96,0:11:36.90,English,,0,0,0,,And it will hub through multiple routers to get from one place to the other
Dialogue: 0,0:11:30.96,0:11:36.90,Chinese,,0,0,0,,它将通过多个路由器集中到一个地方到另一个地方
Dialogue: 0,0:11:36.92,0:11:38.90,English,,0,0,0,,And that's true whether it's on campus
Dialogue: 0,0:11:36.92,0:11:38.90,Chinese,,0,0,0,,这是真的,无论是在校园里
Dialogue: 0,0:11:40.88,0:11:44.35,English,,0,0,0,,Or whether it's hopping all the way around the world
Dialogue: 0,0:11:40.88,0:11:44.35,Chinese,,0,0,0,,或者它是否一直在世界各地跳跃
Dialogue: 0,0:11:45.04,0:11:50.82,English,,0,0,0,,And so again there's this huge body of information and knowledge about how that routing works
Dialogue: 0,0:11:45.04,0:11:50.82,Chinese,,0,0,0,,因此,有关该路由如何工作的大量信息和知识
Dialogue: 0,0:11:50.94,0:11:52.62,English,,0,0,0,,And how its reliable and all that
Dialogue: 0,0:11:50.94,0:11:52.62,Chinese,,0,0,0,,它的可靠性如何
Dialogue: 0,0:11:53.16,0:11:56.64,English,,0,0,0,,But we're going to just assume that somebody else has figured that out
Dialogue: 0,0:11:53.16,0:11:56.64,Chinese,,0,0,0,,但我们只是假设其他人已经想到了这一点
Dialogue: 0,0:11:57.02,0:12:01.86,English,,0,0,0,,And our job as programmers is just to be able to communicate from one host to another
Dialogue: 0,0:11:57.02,0:12:01.86,Chinese,,0,0,0,,我们作为程序员的工作就是能够从一个主机到另一个主机进行通信
Dialogue: 0,0:12:06.42,0:12:10.42,English,,0,0,0,,And so how could you design a system where all these diverse systems
Dialogue: 0,0:12:06.42,0:12:10.42,Chinese,,0,0,0,,那么你怎么能设计一个所有这些不同系统的系统
Dialogue: 0,0:12:10.42,0:12:22.00,English,,0,0,0,,Made by computers made by different manufacturers operating under different countries with different telecommunications bodies governing bodies and so forth
Dialogue: 0,0:12:10.42,0:12:22.00,Chinese,,0,0,0,,由在不同国家运营的不同制造商制造的计算机制造,具有不同的电信机构管理机构等
Dialogue: 0,0:12:22.00,0:12:23.80,English,,0,0,0,,How can they all work with each other
Dialogue: 0,0:12:22.00,0:12:23.80,Chinese,,0,0,0,,他们怎么能互相合作
Dialogue: 0,0:12:24.38,0:12:29.34,English,,0,0,0,,And the requirement is you have to have a protocol you have to have some common set of conventions
Dialogue: 0,0:12:24.38,0:12:29.34,Chinese,,0,0,0,,要求是你必须有一个协议,你必须有一些共同的约定
Dialogue: 0,0:12:30.02,0:12:33.18,English,,0,0,0,,For what messages look like how they get sent
Dialogue: 0,0:12:30.02,0:12:33.18,Chinese,,0,0,0,,对于什么消息看起来如何发送
Dialogue: 0,0:12:33.66,0:12:39.48,English,,0,0,0,,What happens if one of them doesn't make it how do you recover from that and so forth
Dialogue: 0,0:12:33.66,0:12:39.48,Chinese,,0,0,0,,如果他们中的一个没有成功,你会如何从中恢复等等会发生什么
Dialogue: 0,0:12:44.14,0:12:49.46,English,,0,0,0,,And so what does a protocol include well it has to include some way of naming things so that
Dialogue: 0,0:12:44.14,0:12:49.46,Chinese,,0,0,0,,所以协议包括什么,它必须包括一些命名事物的方式
Dialogue: 0,0:12:49.94,0:12:53.08,English,,0,0,0,,If I want to send to some host I have some way of designating
Dialogue: 0,0:12:49.94,0:12:53.08,Chinese,,0,0,0,,如果我想发送给某些主机我有一些指定方式
Dialogue: 0,0:12:53.52,0:12:54.80,English,,0,0,0,,Who that host is
Dialogue: 0,0:12:53.52,0:12:54.80,Chinese,,0,0,0,,谁是主持人
Dialogue: 0,0:12:55.32,0:13:01.82,English,,0,0,0,,And then there's the routing system has to have some reliable way of getting my data to that named host
Dialogue: 0,0:12:55.32,0:13:01.82,Chinese,,0,0,0,,然后,路由系统必须有一些可靠的方法将我的数据传送到该命名主机
Dialogue: 0,0:13:03.02,0:13:04.66,English,,0,0,0,,And that's the delivery mechanism
Dialogue: 0,0:13:03.02,0:13:04.66,Chinese,,0,0,0,,这就是交付机制
Dialogue: 0,0:13:05.54,0:13:11.70,English,,0,0,0,,And that's usually done and one of the things that we now accept as universal
Dialogue: 0,0:13:05.54,0:13:11.70,Chinese,,0,0,0,,这通常已经完成,我们现在接受的其中一项是普遍的
Dialogue: 0,0:13:11.70,0:13:17.46,English,,0,0,0,,But it really wasn't when it first came out was idea of you take all your data and you divide it into packets
Dialogue: 0,0:13:11.70,0:13:17.46,Chinese,,0,0,0,,但它真的不是第一次出现的时候就是你把所有数据都拿出来然后把它分成数据包
Dialogue: 0,0:13:17.48,0:13:21.38,English,,0,0,0,,And packets are typically about a thousand to two thousand bytes
Dialogue: 0,0:13:17.48,0:13:21.38,Chinese,,0,0,0,,数据包通常大约一千到两千字节
Dialogue: 0,0:13:22.36,0:13:27.72,English,,0,0,0,,And so if you have a longer message it chops it up into individual packets and sends it across
Dialogue: 0,0:13:22.36,0:13:27.72,Chinese,,0,0,0,,因此,如果你有更长的消息,它会将其切换为单个数据包并将其发送出去
Dialogue: 0,0:13:28.24,0:13:30.52,English,,0,0,0,,And all the communication occurs at the packet level
Dialogue: 0,0:13:28.24,0:13:30.52,Chinese,,0,0,0,,并且所有通信都发生在数据包级别
Dialogue: 0,0:13:31.16,0:13:33.76,English,,0,0,0,,That's different than the historic phone system
Dialogue: 0,0:13:31.16,0:13:33.76,Chinese,,0,0,0,,这与历史悠久的电话系统不同
Dialogue: 0,0:13:35.22,0:13:37.36,English,,0,0,0,,I was a connection based system meaning that
Dialogue: 0,0:13:35.22,0:13:37.36,Chinese,,0,0,0,,我是一个基于连接的系统,意思是
Dialogue: 0,0:13:37.76,0:13:45.30,English,,0,0,0,,If I was calling somebody there is a dedicated wire set of wires maintained by the phone company
Dialogue: 0,0:13:37.76,0:13:45.30,Chinese,,0,0,0,,如果我打电话给某人,电话公司会维护一条专用的电线
Dialogue: 0,0:13:45.78,0:13:49.16,English,,0,0,0,,That would be reserved and locked down for our own use
Dialogue: 0,0:13:45.78,0:13:49.16,Chinese,,0,0,0,,这将被保留并锁定以供我们自己使用
Dialogue: 0,0:13:49.56,0:13:51.38,English,,0,0,0,,During the entire duration of that phone call
Dialogue: 0,0:13:49.56,0:13:51.38,Chinese,,0,0,0,,在整个电话通话期间
Dialogue: 0,0:13:56.62,0:13:57.56,English,,0,0,0,,So
Dialogue: 0,0:13:56.62,0:13:57.56,Chinese,,0,0,0,,所以
Dialogue: 0,0:13:58.94,0:14:03.42,English,,0,0,0,,To get them from one host say A to B
Dialogue: 0,0:13:58.94,0:14:03.42,Chinese,,0,0,0,,从一个主人那里得到他们说A到B.
Dialogue: 0,0:14:03.80,0:14:05.86,English,,0,0,0,,What happens is we want to send a packet
Dialogue: 0,0:14:03.80,0:14:05.86,Chinese,,0,0,0,,我们想要发送一个数据包
Dialogue: 0,0:14:06.66,0:14:09.30,English,,0,0,0,,And that packet will contain some amount of data
Dialogue: 0,0:14:06.66,0:14:09.30,Chinese,,0,0,0,,该数据包将包含一些数据
Dialogue: 0,0:14:10.32,0:14:15.04,English,,0,0,0,,And the idea of a packet communication then is you put little headers on
Dialogue: 0,0:14:10.32,0:14:15.04,Chinese,,0,0,0,,然后,分组通信的想法是你把小标题放在上面
Dialogue: 0,0:14:15.34,0:14:20.80,English,,0,0,0,,That contain certain routing information see on the front of an envelope of a letter perhaps
Dialogue: 0,0:14:15.34,0:14:20.80,Chinese,,0,0,0,,包含某些信息的信封前面可能包含某些路由信息
Dialogue: 0,0:14:21.72,0:14:24.42,English,,0,0,0,,And so and at different points in the way
Dialogue: 0,0:14:21.72,0:14:24.42,Chinese,,0,0,0,,所以以及在不同的方式
Dialogue: 0,0:14:24.42,0:14:30.82,English,,0,0,0,,They'll have different numbers of headers and different protocols or formats for what those headers look like
Dialogue: 0,0:14:24.42,0:14:30.82,Chinese,,0,0,0,,它们将具有不同数量的标头和不同的协议或格式,以用于这些标头的外观
Dialogue: 0,0:14:31.58,0:14:33.74,English,,0,0,0,,So in particular within
Dialogue: 0,0:14:31.58,0:14:33.74,Chinese,,0,0,0,,所以特别是在内
Dialogue: 0,0:14:34.92,0:14:37.10,English,,0,0,0,,I want to send a message and I'll
Dialogue: 0,0:14:34.92,0:14:37.10,Chinese,,0,0,0,,我想发一条消息,我会
Dialogue: 0,0:14:37.76,0:14:42.32,English,,0,0,0,,I'll do that and then the software that runs on my machine that handles this
Dialogue: 0,0:14:37.76,0:14:42.32,Chinese,,0,0,0,,我会这样做,然后在我的机器上运行的软件处理这个
Dialogue: 0,0:14:42.76,0:14:50.06,English,,0,0,0,,Will put a header in front of that describes the internet routing
Dialogue: 0,0:14:42.76,0:14:50.06,Chinese,,0,0,0,,将前面的标题放在描述互联网路由的位置
Dialogue: 0,0:14:50.44,0:14:55.62,English,,0,0,0,,And then it will tack a header in front of that talks about the local area network routing that gets used
Dialogue: 0,0:14:50.44,0:14:55.62,Chinese,,0,0,0,,然后,在谈论前面将讨论使用的局域网路由
Dialogue: 0,0:14:56.42,0:15:02.06,English,,0,0,0,,And that's what's referred to as the a PH the packet header for the internet protocol
Dialogue: 0,0:14:56.42,0:15:02.06,Chinese,,0,0,0,,这就是所谓的互联网协议的数据包标头
Dialogue: 0,0:15:02.74,0:15:08.30,English,,0,0,0,,And FH1 the frame header for this particular message being sent within this local network
Dialogue: 0,0:15:02.74,0:15:08.30,Chinese,,0,0,0,,并且FH1在该本地网络内发送该特定消息的帧头
Dialogue: 0,0:15:10.90,0:15:15.24,English,,0,0,0,,And then the network interface card or the adapter here
Dialogue: 0,0:15:10.90,0:15:15.24,Chinese,,0,0,0,,然后是网络接口卡或适配器
Dialogue: 0,0:15:16.10,0:15:23.48,English,,0,0,0,,Is then responsible for putting that out over this local communication of capability
Dialogue: 0,0:15:16.10,0:15:23.48,Chinese,,0,0,0,,然后负责将这种能力放在本地通信上
Dialogue: 0,0:15:23.78,0:15:31.44,English,,0,0,0,,And then that gets received at the other end by the network adapter at the receivers direction
Dialogue: 0,0:15:23.78,0:15:31.44,Chinese,,0,0,0,,然后,网络适配器在接收方向接收到另一端
Dialogue: 0,0:15:32.14,0:15:40.00,English,,0,0,0,,It will put up its own frame header on it to pass it in
Dialogue: 0,0:15:32.14,0:15:40.00,Chinese,,0,0,0,,它将在其上放置自己的帧头以传递它
Dialogue: 0,0:15:40.94,0:15:42.94,English,,0,0,0,,And that then gets tripped off
Dialogue: 0,0:15:40.94,0:15:42.94,Chinese,,0,0,0,,然后被绊倒了
Dialogue: 0,0:15:43.80,0:15:48.58,English,,0,0,0,,So that all hosts be set sees is the the data that gets sent
Dialogue: 0,0:15:43.80,0:15:48.58,Chinese,,0,0,0,,因此,设置所有主机看到的是发送的数据
Dialogue: 0,0:15:49.18,0:15:55.44,English,,0,0,0,,But this idea of putting headers in front and at times sort of what they call encapsulation that
Dialogue: 0,0:15:49.18,0:15:55.44,Chinese,,0,0,0,,但是这种把头放在前面的想法有时与他们所谓的封装有关
Dialogue: 0,0:15:55.93,0:16:02.50,English,,0,0,0,,I'll take this big packet and I'll just tack some more information on top to the front of it header information
Dialogue: 0,0:15:55.93,0:16:02.50,Chinese,,0,0,0,,我将采取这个大包,我只是在它的头部信息的前面添加更多信息
Dialogue: 0,0:16:02.94,0:16:06.24,English,,0,0,0,,And I'll send through the rest of it just as a set of bytes
Dialogue: 0,0:16:02.94,0:16:06.24,Chinese,,0,0,0,,我将通过其余部分发送,就像一组字节一样
Dialogue: 0,0:16:14.24,0:16:18.92,English,,0,0,0,,So the internet that we know and love the capital I internet
Dialogue: 0,0:16:14.24,0:16:18.92,Chinese,,0,0,0,,所以我们知道并喜欢互联网的互联网互联网
Dialogue: 0,0:16:18.94,0:16:23.10,English,,0,0,0,,Then has a particular set of protocols that are you've probably heard the terms
Dialogue: 0,0:16:18.94,0:16:23.10,Chinese,,0,0,0,,然后有一组特定的协议,你可能已经听过这些术语
Dialogue: 0,0:16:23.94,0:16:26.54,English,,0,0,0,,One is called the IP the internet protocol
Dialogue: 0,0:16:23.94,0:16:26.54,Chinese,,0,0,0,,一个被称为IP的互联网协议
Dialogue: 0,0:16:26.92,0:16:33.16,English,,0,0,0,,Which is the one that defines ideas about how do you get how do you name hosts on the internet
Dialogue: 0,0:16:26.92,0:16:33.16,Chinese,,0,0,0,,哪个定义了关于如何获得如何在互联网上命名主机的想法
Dialogue: 0,0:16:33.94,0:16:36.02,English,,0,0,0,,And how do you send packets
Dialogue: 0,0:16:33.94,0:16:36.02,Chinese,,0,0,0,,你如何发送数据包
Dialogue: 0,0:16:36.64,0:16:40.76,English,,0,0,0,,And they're referred to sometimes is datagrams
Dialogue: 0,0:16:36.64,0:16:40.76,Chinese,,0,0,0,,他们有时提到的是数据报
Dialogue: 0,0:16:41.04,0:16:46.86,English,,0,0,0,,Meaning that a packet is just a single entity that gets sent from point A to point B
Dialogue: 0,0:16:41.04,0:16:46.86,Chinese,,0,0,0,,这意味着数据包只是从A点发送到B点的单个实体
Dialogue: 0,0:16:48.80,0:16:53.36,English,,0,0,0,,And the underlying IP doesn't guarantee delivery so
Dialogue: 0,0:16:48.80,0:16:53.36,Chinese,,0,0,0,,而基础知识产权并不能保证交付
Dialogue: 0,0:16:54.14,0:16:57.28,English,,0,0,0,,So it's based on what they call best
Dialogue: 0,0:16:54.14,0:16:57.28,Chinese,,0,0,0,,所以这是基于他们最好的
Dialogue: 0,0:16:58.04,0:17:01.60,English,,0,0,0,,Effort communication meaning that at each step along the way
Dialogue: 0,0:16:58.04,0:17:01.60,Chinese,,0,0,0,,努力沟通意味着在整个过程中的每一步
Dialogue: 0,0:17:02.34,0:17:06.94,English,,0,0,0,,If for example things are good then it will just send this packet along
Dialogue: 0,0:17:02.34,0:17:06.94,Chinese,,0,0,0,,例如,如果事情是好的话,它就会发送这个数据包
Dialogue: 0,0:17:06.94,0:17:08.82,English,,0,0,0,,If there's too much congestion
Dialogue: 0,0:17:06.94,0:17:08.82,Chinese,,0,0,0,,如果有太多的拥堵
Dialogue: 0,0:17:09.34,0:17:13.46,English,,0,0,0,,There's been a you know somebody's turned on their microwave oven and
Dialogue: 0,0:17:09.34,0:17:13.46,Chinese,,0,0,0,,你知道有人打开他们的微波炉和
Dialogue: 0,0:17:14.06,0:17:16.66,English,,0,0,0,,It's set up some radio frequency interface interference
Dialogue: 0,0:17:14.06,0:17:16.66,Chinese,,0,0,0,,它设置了一些射频接口干扰
Dialogue: 0,0:17:17.24,0:17:22.06,English,,0,0,0,,Then at the IP level it just drops that packet and says whoops
Dialogue: 0,0:17:17.24,0:17:22.06,Chinese,,0,0,0,,然后在IP级别,它只丢弃该数据包并说哎呀
Dialogue: 0,0:17:22.88,0:17:26.48,English,,0,0,0,,I screwed up sorry it doesn't even say sorry it just does it silently
Dialogue: 0,0:17:22.88,0:17:26.48,Chinese,,0,0,0,,我搞砸了抱歉它甚至没有说对不起只是默默地说
Dialogue: 0,0:17:28.60,0:17:32.38,English,,0,0,0,,And then you can as a programmer make use of that very global level
Dialogue: 0,0:17:28.60,0:17:32.38,Chinese,,0,0,0,,然后你可以作为一个程序员利用这个非常全球化的水平
Dialogue: 0,0:17:32.42,0:17:36.76,English,,0,0,0,,So normally as a programmer you don't really want to program at that level
Dialogue: 0,0:17:32.42,0:17:36.76,Chinese,,0,0,0,,所以通常作为一个程序员,你真的不想在那个级别编程
Dialogue: 0,0:17:36.90,0:17:39.56,English,,0,0,0,,Because you'll send packets and they will get there
Dialogue: 0,0:17:36.90,0:17:39.56,Chinese,,0,0,0,,因为你会发送数据包,他们会到达那里
Dialogue: 0,0:17:40.14,0:17:44.78,English,,0,0,0,,But you can if you want to and it's called UDP a protocol
Dialogue: 0,0:17:40.14,0:17:44.78,Chinese,,0,0,0,,但是你可以,如果你想,它被称为UDP协议
Dialogue: 0,0:17:44.86,0:17:47.76,English,,0,0,0,,It's just a small software layer over IP
Dialogue: 0,0:17:44.86,0:17:47.76,Chinese,,0,0,0,,它只是一个基于IP的小软件层
Dialogue: 0,0:17:47.76,0:17:49.16,English,,0,0,0,,And there's some applications
Dialogue: 0,0:17:47.76,0:17:49.16,Chinese,,0,0,0,,还有一些应用程序
Dialogue: 0,0:17:49.70,0:17:58.48,English,,0,0,0,,That you'll see for example in the computer game world where you want to send information really fast and if some information gets dropped it's not a big deal
Dialogue: 0,0:17:49.70,0:17:58.48,Chinese,,0,0,0,,你会在计算机游戏世界中看到你想要快速发送信息的例子,如果一些信息被丢弃,这不是什么大不了的事
Dialogue: 0,0:17:58.78,0:18:00.56,English,,0,0,0,,That people actually program at that level
Dialogue: 0,0:17:58.78,0:18:00.56,Chinese,,0,0,0,,人们实际上在那个级别编程
Dialogue: 0,0:18:01.12,0:18:02.54,English,,0,0,0,,We won't really talk about that
Dialogue: 0,0:18:01.12,0:18:02.54,Chinese,,0,0,0,,我们不会真的谈论这个
Dialogue: 0,0:18:02.54,0:18:11.78,English,,0,0,0,,The more common protocol that gets used and carries 99% of internet traffic is what's called TCP(transmission control protocol)
Dialogue: 0,0:18:02.54,0:18:11.78,Chinese,,0,0,0,,使用更常见的协议并承载99%的互联网流量就是所谓的TCP(传输控制协议)
Dialogue: 0,0:18:12.34,0:18:17.68,English,,0,0,0,,And that provides a reliable the equivalent of telephone connection
Dialogue: 0,0:18:12.34,0:18:17.68,Chinese,,0,0,0,,这提供了相当于电话连接的可靠性
Dialogue: 0,0:18:18.12,0:18:22.94,English,,0,0,0,,That I can reliably send data from point A to point B
Dialogue: 0,0:18:18.12,0:18:22.94,Chinese,,0,0,0,,我可以可靠地将数据从A点发送到B点
Dialogue: 0,0:18:24.18,0:18:25.46,English,,0,0,0,,As many bytes as I like
Dialogue: 0,0:18:24.18,0:18:25.46,Chinese,,0,0,0,,像我喜欢的那么多字节
Dialogue: 0,0:18:26.40,0:18:28.24,English,,0,0,0,,It's a guaranteed
Dialogue: 0,0:18:26.40,0:18:28.24,Chinese,,0,0,0,,这是有保障的
Dialogue: 0,0:18:28.92,0:18:32.36,English,,0,0,0,,Every it's sometimes fast and sometimes not but it's there
Dialogue: 0,0:18:28.92,0:18:32.36,Chinese,,0,0,0,,每一次它有时都很快,有时不会,但它就在那里
Dialogue: 0,0:18:32.86,0:18:36.96,English,,0,0,0,,And it's built on top of the IP of this datagram
Dialogue: 0,0:18:32.86,0:18:36.96,Chinese,,0,0,0,,它建立在这个数据报的IP之上
Dialogue: 0,0:18:37.18,0:18:41.50,English,,0,0,0,,Meaning that it has to take whatever you're sending and slice it up into these single packets
Dialogue: 0,0:18:37.18,0:18:41.50,Chinese,,0,0,0,,这意味着它必须采取你发送的任何内容并将其切片到这些单个数据包中
Dialogue: 0,0:18:42.24,0:18:46.30,English,,0,0,0,,If one of them doesn't get sent it will resend it until it gets there
Dialogue: 0,0:18:42.24,0:18:46.30,Chinese,,0,0,0,,如果其中一个没有被发送,它将重新发送它直到它到达那里
Dialogue: 0,0:18:46.84,0:18:54.02,English,,0,0,0,,They have to deal with the fact that packets can travel different paths and one can get ahead of the other in transmission
Dialogue: 0,0:18:46.84,0:18:54.02,Chinese,,0,0,0,,他们必须处理这样一个事实,即数据包可以通过不同的路径,并且可以在传输中领先于另一个
Dialogue: 0,0:18:54.04,0:18:56.40,English,,0,0,0,,And so it has to reorder them in the correct sequence
Dialogue: 0,0:18:54.04,0:18:56.40,Chinese,,0,0,0,,所以它必须按正确的顺序重新排序
Dialogue: 0,0:18:56.98,0:18:59.24,English,,0,0,0,,And so there's a lot of stuff under it but
Dialogue: 0,0:18:56.98,0:18:59.24,Chinese,,0,0,0,,所以它下面有很多东西但是
Dialogue: 0,0:18:59.82,0:19:01.64,English,,0,0,0,,We'll just assume that it kind of works
Dialogue: 0,0:18:59.82,0:19:01.64,Chinese,,0,0,0,,我们只是假设它有点工作
Dialogue: 0,0:19:02.40,0:19:06.34,English,,0,0,0,,And so you can just rely think about it is I have a stream connection
Dialogue: 0,0:19:02.40,0:19:06.34,Chinese,,0,0,0,,所以你可以依靠它来思考它是否有流连接
Dialogue: 0,0:19:06.78,0:19:11.56,English,,0,0,0,,I can send from A to B and B can send a stream of data back to me
Dialogue: 0,0:19:06.78,0:19:11.56,Chinese,,0,0,0,,我可以从A发送到B,B可以向我发送数据流
Dialogue: 0,0:19:12.06,0:19:13.66,English,,0,0,0,,And we're all happy
Dialogue: 0,0:19:12.06,0:19:13.66,Chinese,,0,0,0,,我们都很开心
Dialogue: 0,0:19:15.20,0:19:18.04,English,,0,0,0,,And so that's the version that looks like file I/O
Dialogue: 0,0:19:15.20,0:19:18.04,Chinese,,0,0,0,,这就是看起来像文件I / O的版本
Dialogue: 0,0:19:18.04,0:19:23.58,English,,0,0,0,,I just keep writing to a file and it's sending packets over the network to the other end
Dialogue: 0,0:19:18.04,0:19:23.58,Chinese,,0,0,0,,我只是继续写一个文件,它通过网络发送数据包到另一端
Dialogue: 0,0:19:24.24,0:19:28.18,English,,0,0,0,,And then the other side can be sending stuff to me
Dialogue: 0,0:19:24.24,0:19:28.18,Chinese,,0,0,0,,然后另一方可以向我发送东西
Dialogue: 0,0:19:28.54,0:19:31.66,English,,0,0,0,,And I'm just reading it and I'm just reading bytes of data
Dialogue: 0,0:19:28.54,0:19:31.66,Chinese,,0,0,0,,而我只是在阅读它,而我只是在阅读数据字节
Dialogue: 0,0:19:32.00,0:19:35.12,English,,0,0,0,,Not worrying about how that got broken up into individual packets
Dialogue: 0,0:19:32.00,0:19:35.12,Chinese,,0,0,0,,不用担心如何将其分解为单个数据包
Dialogue: 0,0:19:36.48,0:19:39.18,English,,0,0,0,,And so that's referred to as the sockets interface
Dialogue: 0,0:19:36.48,0:19:39.18,Chinese,,0,0,0,,所以这被称为套接字接口
Dialogue: 0,0:19:39.78,0:19:43.32,English,,0,0,0,,And you'll hear the term socket programming and that's exactly what we're talking about
Dialogue: 0,0:19:39.78,0:19:43.32,Chinese,,0,0,0,,你会听到套接字编程这个术语,这正是我们所说的
Dialogue: 0,0:19:48.58,0:19:56.00,English,,0,0,0,,And so from a sort of software system
Dialogue: 0,0:19:48.58,0:19:56.00,Chinese,,0,0,0,,从某种软件系统来看
Dialogue: 0,0:19:56.08,0:19:58.44,English,,0,0,0,,Than software hardware system then
Dialogue: 0,0:19:56.08,0:19:58.44,Chinese,,0,0,0,,然后比软件硬件系统
Dialogue: 0,0:19:58.90,0:20:03.26,English,,0,0,0,,The client and the server are both implemented as application programs
Dialogue: 0,0:19:58.90,0:20:03.26,Chinese,,0,0,0,,客户端和服务器都实现为应用程序
Dialogue: 0,0:20:03.74,0:20:07.18,English,,0,0,0,,At the respective endpoints on their hosts
Dialogue: 0,0:20:03.74,0:20:07.18,Chinese,,0,0,0,,在其主机上的相应端点
Dialogue: 0,0:20:08.18,0:20:17.82,English,,0,0,0,,And they make use of software and libraries that run at some combination of the user level and at the kernel level
Dialogue: 0,0:20:08.18,0:20:17.82,Chinese,,0,0,0,,并且他们使用在用户级别和内核级别的某种组合运行的软件和库
Dialogue: 0,0:20:18.40,0:20:20.86,English,,0,0,0,,And therefore I have access to direct resources
Dialogue: 0,0:20:18.40,0:20:20.86,Chinese,,0,0,0,,因此我可以获得直接资源
Dialogue: 0,0:20:21.56,0:20:22.78,English,,0,0,0,,And so
Dialogue: 0,0:20:21.56,0:20:22.78,Chinese,,0,0,0,,所以
Dialogue: 0,0:20:24.88,0:20:31.26,English,,0,0,0,,I is a program or an application programmer then make use of this software api
Dialogue: 0,0:20:24.88,0:20:31.26,Chinese,,0,0,0,,我是一个程序或应用程序员然后使用这个软件API
Dialogue: 0,0:20:31.54,0:20:33.64,English,,0,0,0,,That lets me do socket programming
Dialogue: 0,0:20:31.54,0:20:33.64,Chinese,,0,0,0,,这让我可以做套接字编程
Dialogue: 0,0:20:34.12,0:20:38.84,English,,0,0,0,,And it's based on gives directly supports TCP/IP
Dialogue: 0,0:20:34.12,0:20:38.84,Chinese,,0,0,0,,它基于直接支持TCP / IP
Dialogue: 0,0:20:42.90,0:20:48.04,English,,0,0,0,,So first of all we're going to talk most of the time about what's called IPV4
Dialogue: 0,0:20:42.90,0:20:48.04,Chinese,,0,0,0,,首先,我们大部分时间都会谈论所谓的IPV4
Dialogue: 0,0:20:48.80,0:20:55.80,English,,0,0,0,,A version 4 which is the one that's been running for since the 1980s I think early 1980s
Dialogue: 0,0:20:48.80,0:20:55.80,Chinese,,0,0,0,,从20世纪80年代早期开始,我认为是一个版本4,它是自20世纪80年代早期以来一直在运行的版本
Dialogue: 0,0:20:56.58,0:21:04.10,English,,0,0,0,,And is this the standard and we'll talk very only mentioned very briefly the idea of what's called IPV6
Dialogue: 0,0:20:56.58,0:21:04.10,Chinese,,0,0,0,,这是标准,我们只会简单地谈谈所谓的IPV6的想法
Dialogue: 0,0:21:04.76,0:21:07.16,English,,0,0,0,,Which is sort of a next-generation version
Dialogue: 0,0:21:04.76,0:21:07.16,Chinese,,0,0,0,,哪种是下一代版本
Dialogue: 0,0:21:08.00,0:21:12.80,English,,0,0,0,,So the idea of a IPV4 and this is now we're talking about IP
Dialogue: 0,0:21:08.00,0:21:12.80,Chinese,,0,0,0,,所以IPV4的想法现在我们正在讨论IP
Dialogue: 0,0:21:13.36,0:21:18.60,English,,0,0,0,,And and this is true of TCP as well is that an address is actually just 32 bits
Dialogue: 0,0:21:13.36,0:21:18.60,Chinese,,0,0,0,,并且TCP也是如此,地址实际上只是32位
Dialogue: 0,0:21:20.92,0:21:24.28,English,,0,0,0,,But it's usually expressed in what they call dotted decimal form
Dialogue: 0,0:21:20.92,0:21:24.28,Chinese,,0,0,0,,但它通常用他们称之为点分十进制形式表示
Dialogue: 0,0:21:24.54,0:21:26.44,English,,0,0,0,,And you've seen these addresses before
Dialogue: 0,0:21:24.54,0:21:26.44,Chinese,,0,0,0,,你以前见过这些地址
Dialogue: 0,0:21:26.86,0:21:29.86,English,,0,0,0,,That it's 4 decimal numbers
Dialogue: 0,0:21:26.86,0:21:29.86,Chinese,,0,0,0,,这是4个十进制数
Dialogue: 0,0:21:30.50,0:21:33.52,English,,0,0,0,,And they can only range between 0 and 255
Dialogue: 0,0:21:30.50,0:21:33.52,Chinese,,0,0,0,,它们只能在0到255之间
Dialogue: 0,0:21:34.32,0:21:37.74,English,,0,0,0,,Because each one of them is a single bytes worth of information
Dialogue: 0,0:21:34.32,0:21:37.74,Chinese,,0,0,0,,因为它们中的每一个都是单个字节的信息
Dialogue: 0,0:21:37.76,0:21:40.36,English,,0,0,0,,So we're used to writing things in hex now in this course
Dialogue: 0,0:21:37.76,0:21:40.36,Chinese,,0,0,0,,因此,我们习惯于在本课程中以十六进制编写内容
Dialogue: 0,0:21:40.86,0:21:44.96,English,,0,0,0,,But we're going to write it as each byte is written as a decimal digit
Dialogue: 0,0:21:40.86,0:21:44.96,Chinese,,0,0,0,,但是我们要把它写成每个字节写成十进制数字
Dialogue: 0,0:21:45.78,0:21:49.50,English,,0,0,0,,And they're actually passed and stored in
Dialogue: 0,0:21:45.78,0:21:49.50,Chinese,,0,0,0,,它们实际上是通过并存储的
Dialogue: 0,0:21:49.82,0:21:53.34,English,,0,0,0,,What's called network byte order which is big endian byte order
Dialogue: 0,0:21:49.82,0:21:53.34,Chinese,,0,0,0,,什么叫做大字节字节顺序的网络字节顺序
Dialogue: 0,0:21:54.04,0:21:58.10,English,,0,0,0,,And so we have to worry about the whole big endian vs. good endian thing
Dialogue: 0,0:21:54.04,0:21:58.10,Chinese,,0,0,0,,所以我们不得不担心整个大端和好端的事情
Dialogue: 0,0:21:58.54,0:22:00.02,English,,0,0,0,,When we're doing network programming
Dialogue: 0,0:21:58.54,0:22:00.02,Chinese,,0,0,0,,当我们进行网络编程时
Dialogue: 0,0:22:01.26,0:22:07.14,English,,0,0,0,,And you can actually learn a lot there's a whole levels of how the different bytes mean
Dialogue: 0,0:22:01.26,0:22:07.14,Chinese,,0,0,0,,实际上你可以学到很多不同字节的含义
Dialogue: 0,0:22:07.14,0:22:13.30,English,,0,0,0,,But for example any ip address it starts with 128.2. is at CMU
Dialogue: 0,0:22:07.14,0:22:13.30,Chinese,,0,0,0,,但是例如任何ip地址都以128.2开头。在CMU
Dialogue: 0,0:22:15.86,0:22:18.24,English,,0,0,0,,I think and then
Dialogue: 0,0:22:15.86,0:22:18.24,Chinese,,0,0,0,,我想,然后
Dialogue: 0,0:22:19.14,0:22:24.34,English,,0,0,0,,And so essentially CMU owns that part of the IP address space
Dialogue: 0,0:22:19.14,0:22:24.34,Chinese,,0,0,0,,因此,基本上CMU拥有IP地址空间的那部分
Dialogue: 0,0:22:26.02,0:22:29.98,English,,0,0,0,,Which if you think about that's approximately 2^64
Dialogue: 0,0:22:26.02,0:22:29.98,Chinese,,0,0,0,,如果你认为这大约是2 ^ 64
Dialogue: 0,0:22:31.02,0:22:41.52,English,,0,0,0,,2 to the...no,not 2^6,2^16 different IP addresses available for use by campus
Dialogue: 0,0:22:31.02,0:22:41.52,Chinese,,0,0,0,,2到...不,不是2 ^ 6,2 ^ 16个不同的IP地址可供校园使用
Dialogue: 0,0:22:46.96,0:22:50.62,English,,0,0,0,,And as I mentioned there's a newer version called IPv6
Dialogue: 0,0:22:46.96,0:22:50.62,Chinese,,0,0,0,,正如我所提到的那样,有一个名为IPv6的新版本
Dialogue: 0,0:22:50.86,0:22:54.84,English,,0,0,0,,That gives you a 128-bit addresses
Dialogue: 0,0:22:50.86,0:22:54.84,Chinese,,0,0,0,,这给你一个128位的地址
Dialogue: 0,0:22:55.52,0:23:01.30,English,,0,0,0,,You can imagine actually that if you think about how many nodes are there in the internet
Dialogue: 0,0:22:55.52,0:23:01.30,Chinese,,0,0,0,,实际上你可以想象,如果你想到互联网中有多少个节点
Dialogue: 0,0:23:01.42,0:23:07.10,English,,0,0,0,,If a 4 byte address is only to the 32 so that's 4 billion
Dialogue: 0,0:23:01.42,0:23:07.10,Chinese,,0,0,0,,如果一个4字节的地址只有32个那么就是40亿
Dialogue: 0,0:23:08.50,0:23:12.96,English,,0,0,0,,And I don't know about you but I have a lot of different things that use IP
Dialogue: 0,0:23:08.50,0:23:12.96,Chinese,,0,0,0,,我不了解你,但我有很多不同的东西使用IP
Dialogue: 0,0:23:12.96,0:23:18.28,English,,0,0,0,,I have a phone,I have two laptops,I have a couple desktops
Dialogue: 0,0:23:12.96,0:23:18.28,Chinese,,0,0,0,,我有一部手机,我有两台笔记本电脑,我有几台台式机
Dialogue: 0,0:23:19.10,0:23:25.86,English,,0,0,0,,So if all of..if every one of us used multiple IP addresses then actually the world would be out of them right
Dialogue: 0,0:23:19.10,0:23:25.86,Chinese,,0,0,0,,因此,如果我们每个人都使用多个IP地址,那么实际上世界将是正确的
Dialogue: 0,0:23:25.86,0:23:30.12,English,,0,0,0,,There's seven billion people in the world not all of whom have access to the internet
Dialogue: 0,0:23:25.86,0:23:30.12,Chinese,,0,0,0,,世界上有70亿人并非所有人都可以访问互联网
Dialogue: 0,0:23:30.18,0:23:31.70,English,,0,0,0,,But a large fraction of them do
Dialogue: 0,0:23:30.18,0:23:31.70,Chinese,,0,0,0,,但其中很大一部分都有
Dialogue: 0,0:23:32.40,0:23:39.58,English,,0,0,0,,And so there's a whole kind of crazy way of dealing with the multitude of possible IP addresses
Dialogue: 0,0:23:32.40,0:23:39.58,Chinese,,0,0,0,,因此,有一种处理大量可能IP地址的疯狂方式
Dialogue: 0,0:23:40.18,0:23:44.20,English,,0,0,0,,So the obvious thing would be well let's just allocate a lot more addresses
Dialogue: 0,0:23:40.18,0:23:44.20,Chinese,,0,0,0,,所以显而易见的事情就是让我们分配更多的地址
Dialogue: 0,0:23:44.46,0:23:49.92,English,,0,0,0,,And jump let's just skip 64 bits and go right to 128 and that's the idea behind IPv6
Dialogue: 0,0:23:44.46,0:23:49.92,Chinese,,0,0,0,,跳转让我们跳过64位然后直到128,这就是IPv6背后的想法
Dialogue: 0,0:23:50.58,0:23:56.44,English,,0,0,0,,But quite honestly this has been one of those technologies that's been out there for over 15 years
Dialogue: 0,0:23:50.58,0:23:56.44,Chinese,,0,0,0,,但老实说,这已经是那些已经存在超过15年的技术之一
Dialogue: 0,0:23:57.00,0:24:01.48,English,,0,0,0,,And still has a very low level of adoption so
Dialogue: 0,0:23:57.00,0:24:01.48,Chinese,,0,0,0,,并且仍然具有非常低的采用率
Dialogue: 0,0:24:02.52,0:24:05.08,English,,0,0,0,,It's still a future technology
Dialogue: 0,0:24:02.52,0:24:05.08,Chinese,,0,0,0,,它仍然是未来的技术
Dialogue: 0,0:24:06.40,0:24:12.36,English,,0,0,0,,People have basically figured out all these crazy schemes to make use of just stick within the 4 byte limit
Dialogue: 0,0:24:06.40,0:24:12.36,Chinese,,0,0,0,,人们基本上已经找到了所有这些疯狂的方案,只使用4字节限制
Dialogue: 0,0:24:20.04,0:24:26.80,English,,0,0,0,,Okay so let's start talking the program the sort of programmer perspective on this
Dialogue: 0,0:24:20.04,0:24:26.80,Chinese,,0,0,0,,好的,让我们开始讨论程序员对此的看法
Dialogue: 0,0:24:27.74,0:24:34.32,English,,0,0,0,,And this is one area where you'll wish you weren't programming in C
Dialogue: 0,0:24:27.74,0:24:34.32,Chinese,,0,0,0,,这是一个你希望你不用C语言编程的领域
Dialogue: 0,0:24:34.42,0:24:35.56,English,,0,0,0,,But you are
Dialogue: 0,0:24:34.42,0:24:35.56,Chinese,,0,0,0,,但你是
Dialogue: 0,0:24:36.10,0:24:38.72,English,,0,0,0,,So there's a lot of really crufty stuff
Dialogue: 0,0:24:36.10,0:24:38.72,Chinese,,0,0,0,,所以有很多非常苛刻的东西
Dialogue: 0,0:24:38.72,0:24:46.83,English,,0,0,0,,And it was all developed most of the software protocols were conceived before C even was what it is today
Dialogue: 0,0:24:38.72,0:24:46.83,Chinese,,0,0,0,,所有开发的大部分软件协议都是在C甚至是今天之前构思出来的
Dialogue: 0,0:24:47.58,0:24:51.40,English,,0,0,0,,So like the Kernighan and Ritchie book you have is called the second edition
Dialogue: 0,0:24:47.58,0:24:51.40,Chinese,,0,0,0,,所以像Kernighan和Ritchie这本书一样被称为第二版
Dialogue: 0,0:24:51.40,0:24:55.14,English,,0,0,0,,And it's based on what was called ANSI C or ISO C
Dialogue: 0,0:24:51.40,0:24:55.14,Chinese,,0,0,0,,它基于所谓的ANSI C或ISO C.
Dialogue: 0,0:24:55.76,0:25:00.50,English,,0,0,0,,But these all date before that they date back to the original Kernighan and Ritchie
Dialogue: 0,0:24:55.76,0:25:00.50,Chinese,,0,0,0,,但是这些都是在他们追溯到最初的Kernighan和Ritchie之前
Dialogue: 0,0:25:00.50,0:25:04.42,English,,0,0,0,,So for example void* did not exist in that era
Dialogue: 0,0:25:00.50,0:25:04.42,Chinese,,0,0,0,,因此,例如在那个时代不存在void *
Dialogue: 0,0:25:04.80,0:25:07.48,English,,0,0,0,,And so you use char * as a generic pointer
Dialogue: 0,0:25:04.80,0:25:07.48,Chinese,,0,0,0,,所以你使用char *作为通用指针
Dialogue: 0,0:25:08.24,0:25:11.36,English,,0,0,0,,And so there's just a lot of stuff in this programming
Dialogue: 0,0:25:08.24,0:25:11.36,Chinese,,0,0,0,,所以这个编程中有很多东西
Dialogue: 0,0:25:11.76,0:25:16.72,English,,0,0,0,,Interface where you go wow that is really crufty and that that truth is yes you're right
Dialogue: 0,0:25:11.76,0:25:16.72,Chinese,,0,0,0,,你哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇
Dialogue: 0,0:25:17.64,0:25:20.80,English,,0,0,0,,So in particular there's a lot of different structures that are defined and
Dialogue: 0,0:25:17.64,0:25:20.80,Chinese,,0,0,0,,所以特别是定义了很多不同的结构
Dialogue: 0,0:25:20.80,0:25:23.98,English,,0,0,0,,One of them is called an in_addr which means internet address
Dialogue: 0,0:25:20.80,0:25:23.98,Chinese,,0,0,0,,其中一个叫做in_addr,意思是互联网地址
Dialogue: 0,0:25:24.64,0:25:28.12,English,,0,0,0,,And it's just defined to be a 32-bit unsigned number
Dialogue: 0,0:25:24.64,0:25:28.12,Chinese,,0,0,0,,它只是被定义为32位无符号数
Dialogue: 0,0:25:30.00,0:25:32.88,English,,0,0,0,,And in general as I mentioned there
Dialogue: 0,0:25:30.00,0:25:32.88,Chinese,,0,0,0,,就像我在那里提到的那样
Dialogue: 0,0:25:33.02,0:25:39.78,English,,0,0,0,,The so called network byte order whoever designed the original protocols was a fan of big endian addressing
Dialogue: 0,0:25:33.02,0:25:39.78,Chinese,,0,0,0,,所谓的网络字节顺序无论谁设计了原始协议,都是大端寻址的粉丝
Dialogue: 0,0:25:39.90,0:25:46.40,English,,0,0,0,,And so that's what it is even though actually most of the machines that are out there in this world are little endian
Dialogue: 0,0:25:39.90,0:25:46.40,Chinese,,0,0,0,,事实就是如此,即使实际上这个世界上大多数机器都是小端的
Dialogue: 0,0:25:46.96,0:25:50.86,English,,0,0,0,,And so there's a set of standard library functions
Dialogue: 0,0:25:46.96,0:25:50.86,Chinese,,0,0,0,,所以有一套标准的库函数
Dialogue: 0,0:25:50.86,0:25:54.46,English,,0,0,0,,That you use to convert between network order and host order
Dialogue: 0,0:25:50.86,0:25:54.46,Chinese,,0,0,0,,你用于在网络订单和主机订单之间进行转换
Dialogue: 0,0:25:55.00,0:26:01.64,English,,0,0,0,,And the idea of it is now if I run my software on a little endian or a big endian machine
Dialogue: 0,0:25:55.00,0:26:01.64,Chinese,,0,0,0,,如果我在一个小端或大端机器上运行我的软件,那么它的想法就是现在
Dialogue: 0,0:26:02.10,0:26:04.44,English,,0,0,0,,These functions will do the right thing
Dialogue: 0,0:26:02.10,0:26:04.44,Chinese,,0,0,0,,这些功能将做正确的事情
Dialogue: 0,0:26:04.46,0:26:07.10,English,,0,0,0,,So if I just use these standard libraries
Dialogue: 0,0:26:04.46,0:26:07.10,Chinese,,0,0,0,,所以,如果我只是使用这些标准库
Dialogue: 0,0:26:07.50,0:26:12.62,English,,0,0,0,,Then I don't have to worry about porting it every time I change the word ordering of a machine
Dialogue: 0,0:26:07.50,0:26:12.62,Chinese,,0,0,0,,然后,每次我更改机器的字顺序时,我都不必担心移植它
Dialogue: 0,0:26:13.46,0:26:16.08,English,,0,0,0,,One of the things you'll notice here is
Dialogue: 0,0:26:13.46,0:26:16.08,Chinese,,0,0,0,,你会注意到的一件事是
Dialogue: 0,0:26:16.48,0:26:25.24,English,,0,0,0,,There is no function to convert 64-bit data between a network order and host order so
Dialogue: 0,0:26:16.48,0:26:25.24,Chinese,,0,0,0,,没有在网络订单和主机订单之间转换64位数据的功能
Dialogue: 0,0:26:25.98,0:26:31.40,English,,0,0,0,,I don't know what people do when I do it I just write my own saw,my own to do it
Dialogue: 0,0:26:25.98,0:26:31.40,Chinese,,0,0,0,,我不知道人们在做什么时会做什么我只是写自己的锯,我自己做
Dialogue: 0,0:26:32.92,0:26:35.86,English,,0,0,0,,Or I don't because I know my other end is a little endian machine
Dialogue: 0,0:26:32.92,0:26:35.86,Chinese,,0,0,0,,或者我没有,因为我知道我的另一端是一个小端机器
Dialogue: 0,0:26:37.42,0:26:47.06,English,,0,0,0,,So anyways these are already some functions you'll start seeing for that look like network conversion software
Dialogue: 0,0:26:37.42,0:26:47.06,Chinese,,0,0,0,,所以无论如何,这些已经是你将开始看到的一些功能,就像网络转换软件一样
Dialogue: 0,0:26:50.70,0:26:54.99,English,,0,0,0,,And as I mentioned the addresses are written in a dotted decimal form
Dialogue: 0,0:26:50.70,0:26:54.99,Chinese,,0,0,0,,正如我所提到的,地址是以点分十进制形式写的
Dialogue: 0,0:26:55.52,0:26:58.36,English,,0,0,0,,And it's also big endian
Dialogue: 0,0:26:55.52,0:26:58.36,Chinese,,0,0,0,,它也是大端
Dialogue: 0,0:26:58.38,0:27:03.64,English,,0,0,0,,So if I were to write in hex 128 is of course 0x80
Dialogue: 0,0:26:58.38,0:27:03.64,Chinese,,0,0,0,,所以如果我用十六进制写128当然是0x80
Dialogue: 0,0:27:03.68,0:27:07.32,English,,0,0,0,,So that's the most significant byte of the IP address
Dialogue: 0,0:27:03.68,0:27:07.32,Chinese,,0,0,0,,这是IP地址中最重要的字节
Dialogue: 0,0:27:11.14,0:27:18.38,English,,0,0,0,,And then there is a set of functions api calls you can use to convert between this dotted decimal format
Dialogue: 0,0:27:11.14,0:27:18.38,Chinese,,0,0,0,,然后有一组函数api调用,你可以使用它们在这个点分十进制格式之间进行转换
Dialogue: 0,0:27:18.48,0:27:23.56,English,,0,0,0,,And the actual just a 32-bit unsigned int
Dialogue: 0,0:27:18.48,0:27:23.56,Chinese,,0,0,0,,而实际只是一个32位的unsigned int
Dialogue: 0,0:27:25.16,0:27:27.46,English,,0,0,0,,And actually it used to be there is
Dialogue: 0,0:27:25.16,0:27:27.46,Chinese,,0,0,0,,实际上它曾经存在
Dialogue: 0,0:27:27.90,0:27:31.66,English,,0,0,0,,You might see some older presentations where they use different names for this
Dialogue: 0,0:27:27.90,0:27:31.66,Chinese,,0,0,0,,你可能会看到一些较旧的演示文稿,其中使用了不同的名称
Dialogue: 0,0:27:31.80,0:27:35.48,English,,0,0,0,,But the most recent version api calls this
Dialogue: 0,0:27:31.80,0:27:35.48,Chinese,,0,0,0,,但是最新版本的api称之为
Dialogue: 0,0:27:36.32,0:27:42.48,English,,0,0,0,,The presentation version the dotted decimal they referred to it as a presentation
Dialogue: 0,0:27:36.32,0:27:42.48,Chinese,,0,0,0,,演示版本点缀小数,他们称之为演示文稿
Dialogue: 0,0:27:45.32,0:27:50.92,English,,0,0,0,,Then you can look up the and it's in the book to what the calls to these look like
Dialogue: 0,0:27:45.32,0:27:50.92,Chinese,,0,0,0,,然后你可以查看书中的内容,看看它们的调用是什么样的
Dialogue: 0,0:27:53.24,0:27:56.40,English,,0,0,0,,But you probably don't or very seldom
Dialogue: 0,0:27:53.24,0:27:56.40,Chinese,,0,0,0,,但你可能不会或很少
Dialogue: 0,0:27:58.02,0:27:59.96,English,,0,0,0,,When you're thinking about I want to go to Google
Dialogue: 0,0:27:58.02,0:27:59.96,Chinese,,0,0,0,,当你想到我想去谷歌的时候
Dialogue: 0,0:27:59.98,0:28:05.26,English,,0,0,0,,You don't think about what its IP address is you just go to www.google.com
Dialogue: 0,0:27:59.98,0:28:05.26,Chinese,,0,0,0,,你只需访问www.google.com即可考虑其IP地址
Dialogue: 0,0:28:06.08,0:28:09.58,English,,0,0,0,,And for everything you do you refer to it by this
Dialogue: 0,0:28:06.08,0:28:09.58,Chinese,,0,0,0,,对于你所做的一切,你都可以参考它
Dialogue: 0,0:28:10.24,0:28:15.83,English,,0,0,0,,It would have referred called internet domain names which is a hierarchical naming system
Dialogue: 0,0:28:10.24,0:28:15.83,Chinese,,0,0,0,,它会称为互联网域名,这是一个分层命名系统
Dialogue: 0,0:28:16.40,0:28:21.74,English,,0,0,0,,Whereas you know there's .edu is for educational institutions
Dialogue: 0,0:28:16.40,0:28:21.74,Chinese,,0,0,0,,虽然你知道.edu是教育机构
Dialogue: 0,0:28:22.14,0:28:23.90,English,,0,0,0,,.com is for commercial
Dialogue: 0,0:28:22.14,0:28:23.90,Chinese,,0,0,0,,.com是商业用途
Dialogue: 0,0:28:24.08,0:28:30.66,English,,0,0,0,,.net is general networking of many countries have their own suffix
Dialogue: 0,0:28:24.08,0:28:30.66,Chinese,,0,0,0,,.net是许多国家的通用网络都有自己的后缀
Dialogue: 0,0:28:30.82,0:28:35.18,English,,0,0,0,,So you know .de is for Germany and so forth
Dialogue: 0,0:28:30.82,0:28:35.18,Chinese,,0,0,0,,所以你知道.de是德国等等
Dialogue: 0,0:28:35.70,0:28:38.50,English,,0,0,0,,And so those are called the first level domain names
Dialogue: 0,0:28:35.70,0:28:38.50,Chinese,,0,0,0,,所以那些被称为一级域名
Dialogue: 0,0:28:38.82,0:28:41.46,English,,0,0,0,,And then there's a hierarchical naming structure under that
Dialogue: 0,0:28:38.82,0:28:41.46,Chinese,,0,0,0,,然后在那下面有一个分层的命名结构
Dialogue: 0,0:28:42.50,0:28:43.40,English,,0,0,0,,And
Dialogue: 0,0:28:42.50,0:28:43.40,Chinese,,0,0,0,,和
Dialogue: 0,0:28:45.60,0:28:49.14,English,,0,0,0,,There's actually an interesting question of okay
Dialogue: 0,0:28:45.60,0:28:49.14,Chinese,,0,0,0,,实际上有一个有趣的问题
Dialogue: 0,0:28:49.14,0:28:58.72,English,,0,0,0,,How do I then map from those hierarchical names those domain names into this dotted decimal or the 32 bit IP address
Dialogue: 0,0:28:49.14,0:28:58.72,Chinese,,0,0,0,,然后,我如何从这些分层名称将这些域名映射到此点分十进制或32位IP地址
Dialogue: 0,0:29:00.24,0:29:07.94,English,,0,0,0,,And the job of that is by a very large distributed system called the DNS the domain name system
Dialogue: 0,0:29:00.24,0:29:07.94,Chinese,,0,0,0,,而这个工作就是由一个非常大的分布式系统称为DNS域名系统
Dialogue: 0,0:29:08.42,0:29:14.66,English,,0,0,0,,Where the only sort of centrally managed part of it is at the top level
Dialogue: 0,0:29:08.42,0:29:14.66,Chinese,,0,0,0,,其中唯一的集中管理部分位于顶层
Dialogue: 0,0:29:15.26,0:29:18.08,English,,0,0,0,,So for each of these first level domain names
Dialogue: 0,0:29:15.26,0:29:18.08,Chinese,,0,0,0,,因此,对于这些一级域名中的每一个
Dialogue: 0,0:29:18.20,0:29:28.60,English,,0,0,0,,There's a collection a very large collection of machines that keep track of all the IP addresses
Dialogue: 0,0:29:18.20,0:29:28.60,Chinese,,0,0,0,,有一个非常大的机器集合,可以跟踪所有IP地址
Dialogue: 0,0:29:29.22,0:29:32.60,English,,0,0,0,,That map to one of those first level domain names
Dialogue: 0,0:29:29.22,0:29:32.60,Chinese,,0,0,0,,该映射到其中一个第一级域名
Dialogue: 0,0:29:32.96,0:29:36.46,English,,0,0,0,,And then for example CMU maintains its own naming authority
Dialogue: 0,0:29:32.96,0:29:36.46,Chinese,,0,0,0,,然后例如CMU维护自己的命名权限
Dialogue: 0,0:29:36.90,0:29:41.30,English,,0,0,0,,So anything that says something .cmu.edu
Dialogue: 0,0:29:36.90,0:29:41.30,Chinese,,0,0,0,,所以任何东西都说.cmu.edu
Dialogue: 0,0:29:41.70,0:29:45.42,English,,0,0,0,,There's local DNS servers within CMU
Dialogue: 0,0:29:41.70,0:29:45.42,Chinese,,0,0,0,,CMU中有本地DNS服务器
Dialogue: 0,0:29:45.82,0:29:50.38,English,,0,0,0,,That are picking apart ok where should you know
Dialogue: 0,0:29:45.82,0:29:50.38,Chinese,,0,0,0,,这是分开确定你应该知道哪里
Dialogue: 0,0:29:51.10,0:29:57.92,English,,0,0,0,,If I say cs.cum.edu what would be the IP address for that
Dialogue: 0,0:29:51.10,0:29:57.92,Chinese,,0,0,0,,如果我说cs.cum.edu那将是什么IP地址
Dialogue: 0,0:30:00.22,0:30:05.72,English,,0,0,0,,Well and it's actually pretty interesting how this is managed because it's all it's totally decentralized
Dialogue: 0,0:30:00.22,0:30:05.72,Chinese,,0,0,0,,嗯,这实际上非常有趣,因为它完全是分散的
Dialogue: 0,0:30:05.72,0:30:12.48,English,,0,0,0,,There's a whole set of protocols that govern how naming is done
Dialogue: 0,0:30:05.72,0:30:12.48,Chinese,,0,0,0,,有一整套协议可以控制命名的完成方式
Dialogue: 0,0:30:15.84,0:30:19.28,English,,0,0,0,,But conceptually we can think of it as just this big database
Dialogue: 0,0:30:15.84,0:30:19.28,Chinese,,0,0,0,,但从概念上讲,我们可以将其视为这个大数据库
Dialogue: 0,0:30:19.40,0:30:20.74,English,,0,0,0,,That gives me a mapping
Dialogue: 0,0:30:19.40,0:30:20.74,Chinese,,0,0,0,,这给了我一个映射
Dialogue: 0,0:30:21.46,0:30:27.98,English,,0,0,0,,Where I can give a domain name and it will get back to me a one or more IP addresses
Dialogue: 0,0:30:21.46,0:30:27.98,Chinese,,0,0,0,,在哪里我可以提供一个域名,它会回复给我一个或多个IP地址
Dialogue: 0,0:30:28.44,0:30:31.92,English,,0,0,0,,I can give an IP address and it will come back with one or more domain names
Dialogue: 0,0:30:28.44,0:30:31.92,Chinese,,0,0,0,,我可以提供一个IP地址,它将返回一个或多个域名
Dialogue: 0,0:30:37.68,0:30:40.92,English,,0,0,0,,Oh and so there's actually an application you can run
Dialogue: 0,0:30:37.68,0:30:40.92,Chinese,,0,0,0,,哦,所以实际上你可以运行一个应用程序
Dialogue: 0,0:30:41.58,0:30:45.38,English,,0,0,0,,On most machines called nslookup and there's another one called dig
Dialogue: 0,0:30:41.58,0:30:45.38,Chinese,,0,0,0,,在大多数名为nslookup的机器上,还有一个名为dig的机器
Dialogue: 0,0:30:46.02,0:30:49.88,English,,0,0,0,,That you can use to find basically probe the DNS
Dialogue: 0,0:30:46.02,0:30:49.88,Chinese,,0,0,0,,你可以用来查找基本探测DNS
Dialogue: 0,0:30:50.46,0:30:56.60,English,,0,0,0,,And find in either direction you can look at the given a domain name you can find its IP address
Dialogue: 0,0:30:50.46,0:30:56.60,Chinese,,0,0,0,,并找到任何一个方向,你可以查看给定的域名,你可以找到它的IP地址
Dialogue: 0,0:30:57.14,0:30:59.56,English,,0,0,0,,Given an IP address you can find its domain name
Dialogue: 0,0:30:57.14,0:30:59.56,Chinese,,0,0,0,,给定IP地址,你可以找到其域名
Dialogue: 0,0:31:01.70,0:31:04.24,English,,0,0,0,,And we also I'll show you some code that
Dialogue: 0,0:31:01.70,0:31:04.24,Chinese,,0,0,0,,我们还会向你展示一些代码
Dialogue: 0,0:31:05.62,0:31:08.54,English,,0,0,0,,Just as an example of how you do the programming
Dialogue: 0,0:31:05.62,0:31:08.54,Chinese,,0,0,0,,就像你如何编程一样
Dialogue: 0,0:31:08.98,0:31:12.48,English,,0,0,0,,I'll just show that momentarily called hostname
Dialogue: 0,0:31:08.98,0:31:12.48,Chinese,,0,0,0,,我只是简单地说明了这个主机名
Dialogue: 0,0:31:14.12,0:31:17.04,English,,0,0,0,,So just some examples
Dialogue: 0,0:31:14.12,0:31:17.04,Chinese,,0,0,0,,所以只是一些例子
Dialogue: 0,0:31:29.72,0:31:37.68,English,,0,0,0,,You know if I look up some address like the website for the computer science school computer science
Dialogue: 0,0:31:29.72,0:31:37.68,Chinese,,0,0,0,,你知道我是否在查找计算机科学学院计算机科学网站的地址
Dialogue: 0,0:31:38.54,0:31:40.00,English,,0,0,0,,Using nslookup
Dialogue: 0,0:31:38.54,0:31:40.00,Chinese,,0,0,0,,使用nslookup
Dialogue: 0,0:31:40.70,0:31:42.72,English,,0,0,0,,It comes back can people see this okay
Dialogue: 0,0:31:40.70,0:31:42.72,Chinese,,0,0,0,,它回来后可以让人看到这个没关系
Dialogue: 0,0:31:44.16,0:31:45.62,English,,0,0,0,,Doing it bigger?It's okay
Dialogue: 0,0:31:44.16,0:31:45.62,Chinese,,0,0,0,,做得更大?没关系
Dialogue: 0,0:31:46.28,0:31:50.70,English,,0,0,0,,So this is what nslookup like and this stuff here just tells you
Dialogue: 0,0:31:46.28,0:31:50.70,Chinese,,0,0,0,,所以这就是nslookup所喜欢的,这里的内容告诉你
Dialogue: 0,0:31:51.46,0:31:59.50,English,,0,0,0,,You know who where was the actual directory entry in the which DNS server actually gave this information back
Dialogue: 0,0:31:51.46,0:31:59.50,Chinese,,0,0,0,,你知道哪个DNS服务器实际提供此信息的实际目录条目在哪里
Dialogue: 0,0:32:00.28,0:32:02.00,English,,0,0,0,,And it says that
Dialogue: 0,0:32:00.28,0:32:02.00,Chinese,,0,0,0,,它说
Dialogue: 0,0:32:03.02,0:32:15.34,English,,0,0,0,,www.cs.cum is actually a synonym for a weirder one called WEB-LB.SRV.cum.edu
Dialogue: 0,0:32:03.02,0:32:15.34,Chinese,,0,0,0,,www.cs.cum实际上是一个名为WEB-LB.SRV.cum.edu的奇怪的同义词
Dialogue: 0,0:32:15.74,0:32:19.38,English,,0,0,0,,And its IP address is 128.2 like you'd expect
Dialogue: 0,0:32:15.74,0:32:19.38,Chinese,,0,0,0,,它的IP地址是128.2,就像你期望的那样
Dialogue: 0,0:32:19.80,0:32:21.42,English,,0,0,0,,217.13
Dialogue: 0,0:32:19.80,0:32:21.42,Chinese,,0,0,0,,217.13
Dialogue: 0,0:32:23.16,0:32:25.88,English,,0,0,0,,And of course that works not just at CMU but I can
Dialogue: 0,0:32:23.16,0:32:25.88,Chinese,,0,0,0,,当然,这不仅仅适用于CMU,但我可以
Dialogue: 0,0:32:29.94,0:32:33.18,English,,0,0,0,,You know go ask about what Stanford is up to
Dialogue: 0,0:32:29.94,0:32:33.18,Chinese,,0,0,0,,你知道去问斯坦福大学的目标
Dialogue: 0,0:32:35.64,0:32:42.56,English,,0,0,0,,And it will come back and its IP addresses of something 171.64
Dialogue: 0,0:32:35.64,0:32:42.56,Chinese,,0,0,0,,它会回来,其IP地址为171.64
Dialogue: 0,0:32:45.84,0:32:49.76,English,,0,0,0,,And that's been managed by that and you'll see again it's
Dialogue: 0,0:32:45.84,0:32:49.76,Chinese,,0,0,0,,那是由那管理的,你会再次看到它
Dialogue: 0,0:32:50.38,0:32:57.03,English,,0,0,0,,I asked for www.cs.stanford.edu it said well the real name of that is cs.stanford.edu
Dialogue: 0,0:32:50.38,0:32:57.03,Chinese,,0,0,0,,我要求www.cs.stanford.edu它说得好,真正的名字是cs.stanford.edu
Dialogue: 0,0:32:57.32,0:33:00.48,English,,0,0,0,,And this actually is a point that the
Dialogue: 0,0:32:57.32,0:33:00.48,Chinese,,0,0,0,,而这实际上是一个点
Dialogue: 0,0:33:01.42,0:33:04.36,English,,0,0,0,,The mapping between domain names
Dialogue: 0,0:33:01.42,0:33:04.36,Chinese,,0,0,0,,域名之间的映射
Dialogue: 0,0:33:05.76,0:33:08.12,English,,0,0,0,,And internet addresses is not one-to-one
Dialogue: 0,0:33:05.76,0:33:08.12,Chinese,,0,0,0,,互联网地址不是一对一的
Dialogue: 0,0:33:08.22,0:33:12.02,English,,0,0,0,,You can have multiple domain names that refer to the same internet address
Dialogue: 0,0:33:08.22,0:33:12.02,Chinese,,0,0,0,,你可以拥有多个引用相同Internet地址的域名
Dialogue: 0,0:33:13.70,0:33:18.70,English,,0,0,0,,But you can also have multiple internet addresses
Dialogue: 0,0:33:13.70,0:33:18.70,Chinese,,0,0,0,,但你也可以拥有多个互联网地址
Dialogue: 0,0:33:22.66,0:33:23.36,English,,0,0,0,,Excuse me
Dialogue: 0,0:33:22.66,0:33:23.36,Chinese,,0,0,0,,打扰一下
Dialogue: 0,0:33:30.16,0:33:31.18,English,,0,0,0,,That's weird
Dialogue: 0,0:33:30.16,0:33:31.18,Chinese,,0,0,0,,这很奇怪
Dialogue: 0,0:33:36.98,0:33:42.10,English,,0,0,0,,So like twitter.com when I ask for it it comes back with four different addresses
Dialogue: 0,0:33:36.98,0:33:42.10,Chinese,,0,0,0,,就像twitter.com一样,当我要求它时,它会返回四个不同的地址
Dialogue: 0,0:33:45.88,0:33:49.56,English,,0,0,0,,And if I do the exact same thing again
Dialogue: 0,0:33:45.88,0:33:49.56,Chinese,,0,0,0,,如果我再做同样的事情
Dialogue: 0,0:33:51.46,0:33:53.28,English,,0,0,0,,Mmm came back but yeah
Dialogue: 0,0:33:51.46,0:33:53.28,Chinese,,0,0,0,,嗯回来了,但是
Dialogue: 0,0:33:53.80,0:33:55.62,English,,0,0,0,,You see it came back with
Dialogue: 0,0:33:53.80,0:33:55.62,Chinese,,0,0,0,,你看它回来了
Dialogue: 0,0:33:57.68,0:34:00.22,English,,0,0,0,,The same no not even the same addresses
Dialogue: 0,0:33:57.68,0:34:00.22,Chinese,,0,0,0,,同样没有甚至不同的地址
Dialogue: 0,0:34:02.08,0:34:08.86,English,,0,0,0,,It came back for example here the one that ends with .6 that wasn't in that first was
Dialogue: 0,0:34:02.08,0:34:08.86,Chinese,,0,0,0,,例如,它回来了以.6结尾的那个不是第一个的
Dialogue: 0,0:34:09.22,0:34:13.98,English,,0,0,0,,So it came back with a slightly different set of addresses and a somewhat different order
Dialogue: 0,0:34:09.22,0:34:13.98,Chinese,,0,0,0,,所以它回来时的地址略有不同,订单也有所不同
Dialogue: 0,0:34:14.32,0:34:17.92,English,,0,0,0,,And the idea of that is that actually has multiple servers
Dialogue: 0,0:34:14.32,0:34:17.92,Chinese,,0,0,0,,而这个想法实际上是有多个服务器
Dialogue: 0,0:34:17.96,0:34:22.18,English,,0,0,0,,So when I send to twitter.com or Google or any of these major servers
Dialogue: 0,0:34:17.96,0:34:22.18,Chinese,,0,0,0,,所以当我发送到twitter.com或Google或任何这些主要服务器时
Dialogue: 0,0:34:22.58,0:34:26.62,English,,0,0,0,,There's not just one place in the internet that's handling everybody's google traffic
Dialogue: 0,0:34:22.58,0:34:26.62,Chinese,,0,0,0,,互联网上不只有一个地方处理每个人的谷歌流量
Dialogue: 0,0:34:26.62,0:34:29.70,English,,0,0,0,,Through thousands of places spread around the world
Dialogue: 0,0:34:26.62,0:34:29.70,Chinese,,0,0,0,,通过遍布世界各地的数千个地方
Dialogue: 0,0:34:30.18,0:34:35.88,English,,0,0,0,,And the way they get you there is by playing tricks with the DNS
Dialogue: 0,0:34:30.18,0:34:35.88,Chinese,,0,0,0,,他们让你到达那里的方式是通过DNS玩弄技巧
Dialogue: 0,0:34:36.74,0:34:41.98,English,,0,0,0,,That Google is constantly sending updates to the it maintains its own DNS servers
Dialogue: 0,0:34:36.74,0:34:41.98,Chinese,,0,0,0,,Google不断向其发送更新,维护自己的DNS服务器
Dialogue: 0,0:34:42.40,0:34:43.98,English,,0,0,0,,So it's constantly changing them
Dialogue: 0,0:34:42.40,0:34:43.98,Chinese,,0,0,0,,所以它不断改变它们
Dialogue: 0,0:34:43.98,0:34:48.34,English,,0,0,0,,And it will actually give you different addresses depending on where in the world you're located as well
Dialogue: 0,0:34:43.98,0:34:48.34,Chinese,,0,0,0,,它实际上会根据你所在的世界位置为你提供不同的地址
Dialogue: 0,0:34:48.76,0:34:53.80,English,,0,0,0,,To try and provide a server that's sort of reasonably close to you geographically so
Dialogue: 0,0:34:48.76,0:34:53.80,Chinese,,0,0,0,,尝试提供一种在地理位置上合理接近你的服务器
Dialogue: 0,0:34:54.86,0:34:58.60,English,,0,0,0,,There's all just all kinds of tricks that happen through DNS
Dialogue: 0,0:34:54.86,0:34:58.60,Chinese,,0,0,0,,所有这些都是通过DNS发生的技巧
Dialogue: 0,0:34:58.68,0:35:04.62,English,,0,0,0,,That is part of the way they can sort of manage this huge set of addresses
Dialogue: 0,0:34:58.68,0:35:04.62,Chinese,,0,0,0,,这是他们管理这一大量地址的方式的一部分
Dialogue: 0,0:35:08.20,0:35:12.46,English,,0,0,0,,And then there's some other domain names that don't have any IP address
Dialogue: 0,0:35:08.20,0:35:12.46,Chinese,,0,0,0,,然后还有一些其他域名没有任何IP地址
Dialogue: 0,0:35:13.34,0:35:17.02,English,,0,0,0,,That they're somewhere in the hierarchy that hierarchical naming system
Dialogue: 0,0:35:13.34,0:35:17.02,Chinese,,0,0,0,,他们在层次结构命名系统的层次结构中
Dialogue: 0,0:35:17.02,0:35:19.80,English,,0,0,0,,But they're not actually referring to a particular host
Dialogue: 0,0:35:17.02,0:35:19.80,Chinese,,0,0,0,,但他们实际上并不是指特定的主持人
Dialogue: 0,0:35:21.10,0:35:23.96,English,,0,0,0,,So it's a multi multi mapping
Dialogue: 0,0:35:21.10,0:35:23.96,Chinese,,0,0,0,,所以这是一个多重映射
Dialogue: 0,0:35:27.13,0:35:32.14,English,,0,0,0,,In the...the api set reflects
Dialogue: 0,0:35:27.13,0:35:32.14,Chinese,,0,0,0,,在......中,api集反映出来
Dialogue: 0,0:35:40.16,0:35:44.00,English,,0,0,0,,It so this is just going what I told you they sometimes one-to-one
Dialogue: 0,0:35:40.16,0:35:44.00,Chinese,,0,0,0,,所以这就是我告诉你他们有时一对一的事情
Dialogue: 0,0:35:44.06,0:35:47.28,English,,0,0,0,,Sometimes many domain names refer to the same address
Dialogue: 0,0:35:44.06,0:35:47.28,Chinese,,0,0,0,,有时许多域名引用相同的地址
Dialogue: 0,0:35:48.20,0:35:53.12,English,,0,0,0,,Sometimes of one name maps to multiple addresses that change over time
Dialogue: 0,0:35:48.20,0:35:53.12,Chinese,,0,0,0,,有时,一个名称会映射到多个随时间变化的地址
Dialogue: 0,0:35:53.96,0:35:57.10,English,,0,0,0,,And then there's some where it's a valid name
Dialogue: 0,0:35:53.96,0:35:57.10,Chinese,,0,0,0,,然后有一些地方是有效的名字
Dialogue: 0,0:35:57.42,0:36:01.20,English,,0,0,0,,But it doesn't have an IP address it doesn't have a host associated with a question
Dialogue: 0,0:35:57.42,0:36:01.20,Chinese,,0,0,0,,但它没有IP地址,它没有与问题相关的主机
Dialogue: 0,0:36:01.34,0:36:10.52,English,,0,0,0,,[student speaking]
Dialogue: 0,0:36:10.52,0:36:12.80,English,,0,0,0,,How do I get...how do you get your own IP address
Dialogue: 0,0:36:10.52,0:36:12.80,Chinese,,0,0,0,,我怎么得到......你如何获得自己的IP地址
Dialogue: 0,0:36:13.66,0:36:17.48,English,,0,0,0,,Well all you have to beg borrow or you have to either borrow or buy them
Dialogue: 0,0:36:13.66,0:36:17.48,Chinese,,0,0,0,,那么你只需要借钱,或者你必须借或买它们
Dialogue: 0,0:36:17.70,0:36:24.36,English,,0,0,0,,So for example at CMU there is some number of what they call statically allocated ip addresses
Dialogue: 0,0:36:17.70,0:36:24.36,Chinese,,0,0,0,,因此,例如在CMU,有一些他们称之为静态分配的IP地址
Dialogue: 0,0:36:24.38,0:36:31.20,English,,0,0,0,,Where it's just fixed assigned to that machine and you can register form and request them through computing services
Dialogue: 0,0:36:24.38,0:36:31.20,Chinese,,0,0,0,,只需将其固定分配给该机器,你就可以注册表单并通过计算服务请求它们
Dialogue: 0,0:36:32.76,0:36:38.44,English,,0,0,0,,But most you don't have that most you get one that's I signed dynamically
Dialogue: 0,0:36:32.76,0:36:38.44,Chinese,,0,0,0,,但大多数人没有那么多,你得到的是我动态签名的那个
Dialogue: 0,0:36:38.52,0:36:43.42,English,,0,0,0,,So there's a pool of addresses that you basically they call them leasing
Dialogue: 0,0:36:38.52,0:36:43.42,Chinese,,0,0,0,,所以有一个地址池,你基本上他们称之为租赁
Dialogue: 0,0:36:43.42,0:36:45.62,English,,0,0,0,,That you are assigned with for a while
Dialogue: 0,0:36:43.42,0:36:45.62,Chinese,,0,0,0,,你被分配了一段时间
Dialogue: 0,0:36:46.26,0:36:49.92,English,,0,0,0,,And then but it could possibly be reassigned to someone else
Dialogue: 0,0:36:46.26,0:36:49.92,Chinese,,0,0,0,,然后它可能会被重新分配给其他人
Dialogue: 0,0:36:53.06,0:36:54.68,English,,0,0,0,,And that's part of the way it can manage
Dialogue: 0,0:36:53.06,0:36:54.68,Chinese,,0,0,0,,这是它可以管理的方式的一部分
Dialogue: 0,0:36:55.30,0:36:57.54,English,,0,0,0,,You know somewhat limited set of IP addresses
Dialogue: 0,0:36:55.30,0:36:57.54,Chinese,,0,0,0,,你知道一些有限的IP地址
Dialogue: 0,0:37:03.24,0:37:07.88,English,,0,0,0,,So the idea of like I said that the main
Dialogue: 0,0:37:03.24,0:37:07.88,Chinese,,0,0,0,,所以这个想法就像我说的那样主要
Dialogue: 0,0:37:15.02,0:37:19.50,English,,0,0,0,,A way we'll think about it is in terms of what's called TCP
Dialogue: 0,0:37:15.02,0:37:19.50,Chinese,,0,0,0,,我们将考虑的方式就是所谓的TCP
Dialogue: 0,0:37:20.18,0:37:22.36,English,,0,0,0,,And it says connection oriented protocol
Dialogue: 0,0:37:20.18,0:37:22.36,Chinese,,0,0,0,,它说面向连接的协议
Dialogue: 0,0:37:22.36,0:37:27.42,English,,0,0,0,,Where I establish a connection from one host establishes a connection to another host
Dialogue: 0,0:37:22.36,0:37:27.42,Chinese,,0,0,0,,我从一个主机建立连接的位置建立与另一个主机的连接
Dialogue: 0,0:37:28.18,0:37:34.52,English,,0,0,0,,And they can communicate to each other sending arbitrarily long streams of bytes to each other
Dialogue: 0,0:37:28.18,0:37:34.52,Chinese,,0,0,0,,并且它们可以相互通信,相互之间发送任意长的字节流
Dialogue: 0,0:37:35.30,0:37:39.44,English,,0,0,0,,And so the connection is then two hosts that can talk to each other
Dialogue: 0,0:37:35.30,0:37:39.44,Chinese,,0,0,0,,因此,连接是两个可以相互通信的主机
Dialogue: 0,0:37:39.78,0:37:42.86,English,,0,0,0,,And each of those endpoints is referred to as a socket
Dialogue: 0,0:37:39.78,0:37:42.86,Chinese,,0,0,0,,每个端点都称为套接字
Dialogue: 0,0:37:46.42,0:37:50.26,English,,0,0,0,,And so I can and a socket is both an IP address
Dialogue: 0,0:37:46.42,0:37:50.26,Chinese,,0,0,0,,所以我可以和一个套接字都是一个IP地址
Dialogue: 0,0:37:51.24,0:37:52.82,English,,0,0,0,,And what's called a port number
Dialogue: 0,0:37:51.24,0:37:52.82,Chinese,,0,0,0,,什么叫做端口号
Dialogue: 0,0:37:52.92,0:37:58.22,English,,0,0,0,,So there's a 16 byte, 16 bit number for every connection
Dialogue: 0,0:37:52.92,0:37:58.22,Chinese,,0,0,0,,因此每个连接都有一个16字节,16位的数字
Dialogue: 0,0:37:58.66,0:38:00.50,English,,0,0,0,,That's referred to as its port
Dialogue: 0,0:37:58.66,0:38:00.50,Chinese,,0,0,0,,那被称为它的端口
Dialogue: 0,0:38:00.96,0:38:04.98,English,,0,0,0,,And the reason for that is just because I'm talking to a particular machine
Dialogue: 0,0:38:00.96,0:38:04.98,Chinese,,0,0,0,,原因只是因为我正在和一台特定的机器交谈
Dialogue: 0,0:38:05.44,0:38:08.12,English,,0,0,0,,That machine can support different services
Dialogue: 0,0:38:05.44,0:38:08.12,Chinese,,0,0,0,,该机器可以支持不同的服务
Dialogue: 0,0:38:08.12,0:38:14.06,English,,0,0,0,,It can provide SSH connections it can provide FTP connections
Dialogue: 0,0:38:08.12,0:38:14.06,Chinese,,0,0,0,,它可以提供SSH连接,可以提供FTP连接
Dialogue: 0,0:38:14.06,0:38:18.04,English,,0,0,0,,It can host a mail server,it can host a web server
Dialogue: 0,0:38:14.06,0:38:18.04,Chinese,,0,0,0,,它可以托管邮件服务器,它可以托管Web服务器
Dialogue: 0,0:38:18.62,0:38:22.68,English,,0,0,0,,So a particular machine might have a multitude of different services
Dialogue: 0,0:38:18.62,0:38:22.68,Chinese,,0,0,0,,因此,特定的机器可能具有多种不同的服务
Dialogue: 0,0:38:23.10,0:38:26.88,English,,0,0,0,,And so those are differentiated from each other with what are called port numbers
Dialogue: 0,0:38:23.10,0:38:26.88,Chinese,,0,0,0,,因此,这些与所谓的端口号相互区别
Dialogue: 0,0:38:27.44,0:38:33.04,English,,0,0,0,,And similarly isaac client might have connections to dozens of hosts going at any given time
Dialogue: 0,0:38:27.44,0:38:33.04,Chinese,,0,0,0,,同样,isaac客户端可能会在任何给定时间与数十台主机建立连接
Dialogue: 0,0:38:33.56,0:38:38.12,English,,0,0,0,,I'm cruising the web I'm you know doing all that different stuff
Dialogue: 0,0:38:33.56,0:38:38.12,Chinese,,0,0,0,,我正在巡航网络我知道你正在做所有不同的事情
Dialogue: 0,0:38:38.52,0:38:42.40,English,,0,0,0,,And that's all differentiated the client end that there's different ports
Dialogue: 0,0:38:38.52,0:38:42.40,Chinese,,0,0,0,,这就是客户端区别于不同的端口
Dialogue: 0,0:38:42.40,0:38:46.72,English,,0,0,0,,Associated with your different programs that are running
Dialogue: 0,0:38:42.40,0:38:46.72,Chinese,,0,0,0,,与你正在运行的不同程序相关联
Dialogue: 0,0:38:47.92,0:38:51.52,English,,0,0,0,,And so a port then is a 16-bit integer
Dialogue: 0,0:38:47.92,0:38:51.52,Chinese,,0,0,0,,所以端口则是16位整数
Dialogue: 0,0:38:51.94,0:38:56.74,English,,0,0,0,,That identifies which particular endpoint is
Dialogue: 0,0:38:51.94,0:38:56.74,Chinese,,0,0,0,,这标识了哪个特定端点
Dialogue: 0,0:38:56.88,0:39:00.40,English,,0,0,0,,Being communicated with it either the client side of the server side
Dialogue: 0,0:38:56.88,0:39:00.40,Chinese,,0,0,0,,与服务器端的客户端进行通信
Dialogue: 0,0:39:01.06,0:39:04.10,English,,0,0,0,,And typically at the client side these are assigned dynamically
Dialogue: 0,0:39:01.06,0:39:04.10,Chinese,,0,0,0,,通常在客户端,这些是动态分配的
Dialogue: 0,0:39:04.50,0:39:06.80,English,,0,0,0,,And the referred to as ephemeral ports meaning
Dialogue: 0,0:39:04.50,0:39:06.80,Chinese,,0,0,0,,而称为短暂的港口意义
Dialogue: 0,0:39:06.80,0:39:11.96,English,,0,0,0,,They only are assigned for the limited duration that you have a connection with that
Dialogue: 0,0:39:06.80,0:39:11.96,Chinese,,0,0,0,,它们仅在与你有连接的有限时间内分配
Dialogue: 0,0:39:12.60,0:39:14.76,English,,0,0,0,,That you're maintaining that connection
Dialogue: 0,0:39:12.60,0:39:14.76,Chinese,,0,0,0,,你正在维持这种联系
Dialogue: 0,0:39:15.38,0:39:19.18,English,,0,0,0,,And then there has to be some way if I'm going to contact
Dialogue: 0,0:39:15.38,0:39:19.18,Chinese,,0,0,0,,如果我要联系,那么必须有一些方法
Dialogue: 0,0:39:19.50,0:39:26.38,English,,0,0,0,,And I want to know the dns will tell me what the IP address is of say google.com
Dialogue: 0,0:39:19.50,0:39:26.38,Chinese,,0,0,0,,我想知道dns会告诉我google.com的IP地址是什么
Dialogue: 0,0:39:26.92,0:39:28.88,English,,0,0,0,,But I have to know that
Dialogue: 0,0:39:26.92,0:39:28.88,Chinese,,0,0,0,,但我必须知道
Dialogue: 0,0:39:29.62,0:39:38.42,English,,0,0,0,,Am I communicating with its web service which is port 80 or https secure socket is a different report number
Dialogue: 0,0:39:29.62,0:39:38.42,Chinese,,0,0,0,,我与其Web服务进行通信,即端口80或https安全套接字是不同的报告编号
Dialogue: 0,0:39:38.80,0:39:40.84,English,,0,0,0,,So which service I'm asking for
Dialogue: 0,0:39:38.80,0:39:40.84,Chinese,,0,0,0,,那我要求的服务
Dialogue: 0,0:39:41.30,0:39:44.38,English,,0,0,0,,And there's a standard list what are called well-known ports
Dialogue: 0,0:39:41.30,0:39:44.38,Chinese,,0,0,0,,还有一个标准列表,称为众所周知的端口
Dialogue: 0,0:39:45.08,0:39:52.58,English,,0,0,0,,That are that I can contact at the server end to get the particular service I'm looking for
Dialogue: 0,0:39:45.08,0:39:52.58,Chinese,,0,0,0,,那就是我可以在服务器端联系以获得我正在寻找的特定服务
Dialogue: 0,0:39:54.14,0:39:58.38,English,,0,0,0,,And those are assigned there's a big waste of port assignments
Dialogue: 0,0:39:54.14,0:39:58.38,Chinese,,0,0,0,,那些被分配在那里是一个很大的浪费端口分配
Dialogue: 0,0:40:00.20,0:40:05.50,English,,0,0,0,,And so the again that's part of the sort
Dialogue: 0,0:40:00.20,0:40:05.50,Chinese,,0,0,0,,所以这又是那种类型的一部分
Dialogue: 0,0:40:06.22,0:40:11.30,English,,0,0,0,,Of a whole set of internet standards is the identifiers for the different ports
Dialogue: 0,0:40:06.22,0:40:11.30,Chinese,,0,0,0,,一整套互联网标准是不同端口的标识符
Dialogue: 0,0:40:11.88,0:40:15.70,English,,0,0,0,,What services those are and how those particular protocols work
Dialogue: 0,0:40:11.88,0:40:15.70,Chinese,,0,0,0,,这些是什么服务以及这些特定协议如何工作
Dialogue: 0,0:40:20.42,0:40:22.64,English,,0,0,0,,So when I have a connection then
Dialogue: 0,0:40:20.42,0:40:22.64,Chinese,,0,0,0,,所以,当我有一个连接然后
Dialogue: 0,0:40:28.38,0:40:32.06,English,,0,0,0,,As I mentioned I'll think of it as a connection then is as
Dialogue: 0,0:40:28.38,0:40:32.06,Chinese,,0,0,0,,正如我所提到的,我会把它视为连接然后就是这样
Dialogue: 0,0:40:32.88,0:40:39.70,English,,0,0,0,,A link between two machines based on some known port typically at the server end
Dialogue: 0,0:40:32.88,0:40:39.70,Chinese,,0,0,0,,两台计算机之间的链接,基于通常位于服务器端的某些已知端口
Dialogue: 0,0:40:40.12,0:40:44.24,English,,0,0,0,,And a dynamically assigned or ephemeral port assigned at the client in
Dialogue: 0,0:40:40.12,0:40:44.24,Chinese,,0,0,0,,并在客户端分配动态分配或临时端口
Dialogue: 0,0:40:45.00,0:40:50.90,English,,0,0,0,,And I can refer to then that connection then is identified by the combination of the hosts at the two ends
Dialogue: 0,0:40:45.00,0:40:50.90,Chinese,,0,0,0,,然后我可以参考那个连接然后通过两端主机的组合来识别
Dialogue: 0,0:40:51.38,0:40:52.70,English,,0,0,0,,And the ports that they're using
Dialogue: 0,0:40:51.38,0:40:52.70,Chinese,,0,0,0,,以及他们正在使用的端口
Dialogue: 0,0:40:59.00,0:41:08.74,English,,0,0,0,,And in general then it's the job of the kernel to differentiate the different connections that are coming into a machine
Dialogue: 0,0:40:59.00,0:41:08.74,Chinese,,0,0,0,,通常情况下,内核的工作是区分进入机器的不同连接
Dialogue: 0,0:41:08.74,0:41:13.20,English,,0,0,0,,And figure out which software which process to wake up
Dialogue: 0,0:41:08.74,0:41:13.20,Chinese,,0,0,0,,并找出哪个软件处理唤醒
Dialogue: 0,0:41:13.78,0:41:20.54,English,,0,0,0,,When a data you know when some data arrives from another machine
Dialogue: 0,0:41:13.78,0:41:20.54,Chinese,,0,0,0,,当某些数据从另一台机器到达时你知道的数据
Dialogue: 0,0:41:20.54,0:41:26.36,English,,0,0,0,,In which actual program running on that machine will make use of that data
Dialogue: 0,0:41:20.54,0:41:26.36,Chinese,,0,0,0,,在该机器上运行的实际程序将使用该数据
Dialogue: 0,0:41:26.78,0:41:35.56,English,,0,0,0,,And that's done by associating for each of the ports, a particular process executing program
Dialogue: 0,0:41:26.78,0:41:35.56,Chinese,,0,0,0,,这是通过关联每个端口,特定进程执行程序来完成的
Dialogue: 0,0:41:35.98,0:41:38.10,English,,0,0,0,,That's going to handle those particular requests
Dialogue: 0,0:41:35.98,0:41:38.10,Chinese,,0,0,0,,这将处理这些特定请求
Dialogue: 0,0:41:41.80,0:41:50.62,English,,0,0,0,,And it's totally possible for a client to be interacting with a single server over different ports
Dialogue: 0,0:41:41.80,0:41:50.62,Chinese,,0,0,0,,并且客户端完全可以通过不同的端口与单个服务器进行交互
Dialogue: 0,0:41:51.06,0:41:54.46,English,,0,0,0,,But those are considered to be different connections and
Dialogue: 0,0:41:51.06,0:41:54.46,Chinese,,0,0,0,,但那些被认为是不同的联系和
Dialogue: 0,0:41:56.06,0:41:59.28,English,,0,0,0,,And so they don't really interfere with each other
Dialogue: 0,0:41:56.06,0:41:59.28,Chinese,,0,0,0,,所以他们并没有真正互相干扰
Dialogue: 0,0:42:05.08,0:42:10.44,English,,0,0,0,,So that's what I mentioned is this is what we refer to as sockets programming or the sockets interface
Dialogue: 0,0:42:05.08,0:42:10.44,Chinese,,0,0,0,,所以我所提到的是这就是我们所说的套接字编程或套接字接口
Dialogue: 0,0:42:11.94,0:42:17.42,English,,0,0,0,,It was developed sort of as the internet was evolving in the late 70s and early 80s
Dialogue: 0,0:42:11.94,0:42:17.42,Chinese,,0,0,0,,它的开发有点像互联网在70年代末和80年代初期不断发展
Dialogue: 0,0:42:20.48,0:42:24.34,English,,0,0,0,,So socket then as I said is certain logically one end
Dialogue: 0,0:42:20.48,0:42:24.34,Chinese,,0,0,0,,所以socket就像我说的那样在某种程度上是逻辑上的一端