Chapter 1 Computer Networks and the Internet A

  • Slides: 84
Download presentation
Chapter 1 Computer Networks and the Internet A note on the use of these

Chapter 1 Computer Networks and the Internet A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in powerpoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: q If you use these slides (e. g. , in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) q If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2002. Thanks and enjoy! JFK/KWR All material copyright 1996 -2002 J. F Kurose and K. W. Ross, All Rights Reserved Introduction 1

1. 什么是Internet: 架构上的描述 q 主机hosts或终端系统endsystems: 数以亿计的计算设备互连 m m 主机-PCs, workstations, servers 终端系统-PDAs, phones, toasters

1. 什么是Internet: 架构上的描述 q 主机hosts或终端系统endsystems: 数以亿计的计算设备互连 m m 主机-PCs, workstations, servers 终端系统-PDAs, phones, toasters router server workstation mobile local ISP 运行着各种网络应用程序 q m m q regional ISP 通信链路 光纤, 铜芯线, 无线频谱, 卫星 传输速率 = 带宽 路由器: 转发分组 (数据块) company network Introduction 5

internet信息家电—“酷-Cool” 嵌入式系�技��来了�端系�的多�化。开�后 PC�代, 嵌入式�端系�遍及人�社会生活的方方面面! IP picture frame http: //www. ceiva. com/ Web-enabled toaster+weather forecaster

internet信息家电—“酷-Cool” 嵌入式系�技��来了�端系�的多�化。开�后 PC�代, 嵌入式�端系�遍及人�社会生活的方方面面! IP picture frame http: //www. ceiva. com/ Web-enabled toaster+weather forecaster World’s smallest web server http: //www-ccs. umass. edu/~shri/i. Pic. html Introduction 6

1. 什么是Internet: 架构上的描述(续) q 协议控制发送和接收消息, m e. g. , TCP, IP, HTTP, FTP, PPP

1. 什么是Internet: 架构上的描述(续) q 协议控制发送和接收消息, m e. g. , TCP, IP, HTTP, FTP, PPP q Internet: “由网络构成的网络” m m 松散分层 Internet与intranet q Internet标准 m RFC: Request for comments 请求评注 m IETF: Internet Engineering Task Force 因特网 程小组 router server workstation mobile local ISP regional ISP company network Introduction 7

3. Internet有关的重要超链接 n IETF (Internet Engineering Task Force), http: //www. ietf. org u Internet

3. Internet有关的重要超链接 n IETF (Internet Engineering Task Force), http: //www. ietf. org u Internet Society, http: //www. isoc. org u IAB(Internet Architecture Board), http: //www. isi. edu/iab n W 3 C (The world Wide Web Consortium), www. w 3. org/consortium ACM (Association for Computing Machine), http: //www. acm. org/ u IEEE, http: //www. ieee. org u SIGCOMM, http: //www. acm. org/sigcomm u IEEE Communications Society, http: //www. comsoc. orgc/ u IEEE Computer Society, http: //www. computer. org Data Communications tutorials, http: //www. data. com Media History Project, http: //www. mediahistory. com n n n Introduction 9

例子 人类协议与计算机网络协议的对比: Hi TCP connection req Hi TCP connection response Got the time? Get

例子 人类协议与计算机网络协议的对比: Hi TCP connection req Hi TCP connection response Got the time? Get http: //www. awl. com/kurose-ross 2: 00 <file> time Q: 还可以列举出别的类比例子吗? Introduction 12

(1). 电路交换(续: TDMA and TDMA) Example: FDMA 4 users frequency time TDMA frequency time

(1). 电路交换(续: TDMA and TDMA) Example: FDMA 4 users frequency time TDMA frequency time Introduction 22

(2). 网络核心部分: 分组交换-统计多路复用 10 Mbs Ethernet A B statistical multiplexing C 1. 5 Mbs

(2). 网络核心部分: 分组交换-统计多路复用 10 Mbs Ethernet A B statistical multiplexing C 1. 5 Mbs queue of packets waiting for output link D E A & B 分组没有固定的顺序 统计多路复用。 在时分复用中,每个主机获得各TDM循环帧的固定时隙。 Introduction 24

网络的分类 Telecommunication networks Circuit-switched networks FDM TDM Packet-switched networks Networks with VCs Datagram Networks

网络的分类 Telecommunication networks Circuit-switched networks FDM TDM Packet-switched networks Networks with VCs Datagram Networks • 数据报网络既不是面向连接的也不是无连接的。 • Internet为网络应用既提供面向连接的传输服务 (TCP), 也提供无连接的传输服务(UDP)。 Introduction 31

(1). 住宅接入网络: cable modems (续) Diagram: http: //www. cabledatacomnews. com/cmic/diagram. html Introduction 36

(1). 住宅接入网络: cable modems (续) Diagram: http: //www. cabledatacomnews. com/cmic/diagram. html Introduction 36

Cable Network 体系结构: 概述 Typically 500 to 5, 000 homes cable headend cable distribution

Cable Network 体系结构: 概述 Typically 500 to 5, 000 homes cable headend cable distribution network (simplified) home Introduction 37

Cable Network Architecture: Overview cable headend cable distribution network (simplified) home Introduction 38

Cable Network Architecture: Overview cable headend cable distribution network (simplified) home Introduction 38

Cable Network Architecture: Overview server(s) cable headend cable distribution network home Introduction 39

Cable Network Architecture: Overview server(s) cable headend cable distribution network home Introduction 39

Cable Network Architecture: Overview FDM: V I D E O V I D E

Cable Network Architecture: Overview FDM: V I D E O V I D E O D A T A C O N T R O L 1 2 3 4 5 6 7 8 9 Channels cable headend cable distribution network home Introduction 40

(3). 无线移动接入网络 q 共享的无线移动接入网络连接终端 系统到边缘路由器 m 通过机站,即接入点 “access point” q 无线局域网wireless LANs: m 802.

(3). 无线移动接入网络 q 共享的无线移动接入网络连接终端 系统到边缘路由器 m 通过机站,即接入点 “access point” q 无线局域网wireless LANs: m 802. 11 a/b (Wi. Fi): 2/11 Mbps q 广域无线接入网 router base station wider-area wireless access m m 由电信运营商提供, 均支持IP CDPD蜂窝式数字分组数据网络, 几十K WAP/GPRS or CDMA in Europe 3 G ~ 384 kbps • 会成为现实吗? ? mobile hosts Introduction 42

家庭网络举例: 典型家庭网络的构建: q ADSL or cable modem q router/firewall/NAT q Ethernet q wireless access

家庭网络举例: 典型家庭网络的构建: q ADSL or cable modem q router/firewall/NAT q Ethernet q wireless access point to/from cable headend cable modem router/ firewall Ethernet (switched) wireless laptops wireless access point Introduction 43

1. Internet结构组成: network of networks q 松散分层,由众多网络构成的网络 q 构成Internet核心主干: “tier-1” ISPs =NSP国家/国际级 ISP(e. g.

1. Internet结构组成: network of networks q 松散分层,由众多网络构成的网络 q 构成Internet核心主干: “tier-1” ISPs =NSP国家/国际级 ISP(e. g. , UUNet, BBN/Genuity, Sprint, AT&T), 覆盖国 家、全球 m NSP彼此对等,直接互连或通过网络接入点互连 Tier-1 providers interconnect (peer) privately Tier 1 ISP NAP Tier-1 providers also interconnect at public network access points (NAPs) Tier 1 ISP Introduction 48

2. Tier-1 ISP(NSP): 国家/国际级ISP Sprint US backbone network Introduction 49

2. Tier-1 ISP(NSP): 国家/国际级ISP Sprint US backbone network Introduction 49

3. Tier-2 ISP(地区级ISP): q “Tier-2” ISPs: 较小的(通常是地区级的) ISPs m 连接到 1个或多个 tier-1 ISPs, 也可能连接其他

3. Tier-2 ISP(地区级ISP): q “Tier-2” ISPs: 较小的(通常是地区级的) ISPs m 连接到 1个或多个 tier-1 ISPs, 也可能连接其他 tier-2 ISPs Tier-2 ISP pays tier-1 ISP for connectivity to rest of Internet q tier-2 ISP is customer of tier-1 provider Tier-2 ISP Tier 1 ISP Tier-2 ISP NAP Tier 1 ISP Tier-2 ISPs also peer privately with each other, interconnect at NAP Tier-2 ISP Introduction 50

4. Tier-3 ISP(本地ISP): q “Tier-3” ISPs and local ISPs m 最后的接入网络 (最接近终端系统) local ISP

4. Tier-3 ISP(本地ISP): q “Tier-3” ISPs and local ISPs m 最后的接入网络 (最接近终端系统) local ISP Local and tier 3 ISPs are customers of higher tier ISPs connecting them to rest of Internet Tier 3 ISP Tier-2 ISP local ISP Tier-2 ISP Tier 1 ISP Tier-2 ISP local ISP NAP Tier 1 ISP Tier-2 ISP local ISP Introduction 51

5. Internet结构组成与分组传送 q 一个分组可能要穿越很多网络 local ISP Tier 3 ISP Tier-2 ISP local ISP Tier-2

5. Internet结构组成与分组传送 q 一个分组可能要穿越很多网络 local ISP Tier 3 ISP Tier-2 ISP local ISP Tier-2 ISP Tier 1 ISP Tier-2 ISP local ISP NAP Tier 1 ISP Tier-2 ISP local ISP Introduction 52

分组丢失和延迟是如何产生的? 路由器分组缓冲区队列 q 分组到达输出链路的速率超过输出链路的容量, 产生延迟, 甚 至丢失 q 分组缓冲区队列, 循环等待 packet being transmitted (delay)

分组丢失和延迟是如何产生的? 路由器分组缓冲区队列 q 分组到达输出链路的速率超过输出链路的容量, 产生延迟, 甚 至丢失 q 分组缓冲区队列, 循环等待 packet being transmitted (delay) A B packets queueing (delay) free (available) buffers: arriving packets dropped (loss) if no free buffers Introduction 54

3. 发送延迟 Transmission delay: q R=链路带宽 (bps) q L=分组长度 (bits) q 发送分组比特流的时间 = L/R

3. 发送延迟 Transmission delay: q R=链路带宽 (bps) q L=分组长度 (bits) q 发送分组比特流的时间 = L/R transmission A 4. 传播延迟 Propagation delay: q d = 物理链路的长度 q s = 介质的信号传播速度 (~2 x 108 m/sec) q 传播延迟 = d/s Note: s and R are very different quantities! propagation B nodal processing queueing Introduction 56

车队举例 100 km ten-car caravan toll booth q 小车速度 100 km/hr q 收费站 12

车队举例 100 km ten-car caravan toll booth q 小车速度 100 km/hr q 收费站 12 sec 服务 1辆小车 (transmission time) q 小车~bit; 车队 ~ packet q Q: 整个车队到达第 2个收费 站的时间? 100 km toll booth q 整个车队通过收费站进入 高速公路的时间 = 12*10 = 120 sec q 最后1辆小车从第 1个收费站 到第 2个收费站的时间: 100 km/(100 km/hr)= 1 hr q A: 62 minutes Introduction 57

真实的Internet 延迟和路由 traceroute: gaia. cs. umass. edu to www. eurecom. fr Three delay measements

真实的Internet 延迟和路由 traceroute: gaia. cs. umass. edu to www. eurecom. fr Three delay measements from gaia. cs. umass. edu to cs-gw. cs. umass. edu 1 cs-gw (128. 119. 240. 254) 1 ms 2 border 1 -rt-fa 5 -1 -0. gw. umass. edu (128. 119. 3. 145) 1 ms 2 ms 3 cht-vbns. gw. umass. edu (128. 119. 3. 130) 6 ms 5 ms 4 jn 1 -at 1 -0 -0 -19. wor. vbns. net (204. 147. 132. 129) 16 ms 11 ms 13 ms 5 jn 1 -so 7 -0 -0 -0. wae. vbns. net (204. 147. 136) 21 ms 18 ms 6 abilene-vbns. abilene. ucaid. edu (198. 32. 11. 9) 22 ms 18 ms 22 ms 7 nycm-wash. abilene. ucaid. edu (198. 32. 8. 46) 22 ms 越洋链路 8 62. 40. 103. 253 (62. 40. 103. 253) 104 ms 109 ms 106 ms trans-oceanic 9 de 2 -1. de. geant. net (62. 40. 96. 129) 109 ms 102 ms 104 ms 10 de. fr 1. fr. geant. net (62. 40. 96. 50) 113 ms 121 ms 114 ms link 11 renater-gw. fr 1. fr. geant. net (62. 40. 103. 54) 112 ms 114 ms 112 ms 12 nio-n 2. cssi. renater. fr (193. 51. 206. 13) 111 ms 114 ms 116 ms 13 nice. cssi. renater. fr (195. 220. 98. 102) 123 ms 125 ms 124 ms 14 r 3 t 2 -nice. cssi. renater. fr (195. 220. 98. 110) 126 ms 124 ms 15 eurecom-valbonne. r 3 t 2. ft. net (193. 48. 50. 54) 135 ms 128 ms 133 ms 16 194. 211. 25 (194. 211. 25) 126 ms 128 ms 126 ms 17 * * means no reponse (probe lost, router not replying) 18 * * * 19 fantasia. eurecom. fr (193. 55. 113. 142) 132 ms 128 ms 136 ms Introduction 62

1. 分层的体系结构 Internet极端复杂! q many “pieces”: m hosts m routers m links of various

1. 分层的体系结构 Internet极端复杂! q many “pieces”: m hosts m routers m links of various media m applications m protocols m hardware, software Question: 还有组织网络体系结构的希 望吗? 或者至少组织关于网络体系 结构讨论的希望吗? A: Yes! Introduction 66

民航系统功能的水平分层 ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway

民航系统功能的水平分层 ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing 分层: 每层实现一个服务 m 通过它自己本层的具体实现 m 依赖于下层提供的服务 Introduction 68

民航系统功能的分层: 服务 Counter-to-counter delivery of person+bags baggage-claim-to-baggage-claim delivery people transfer: loading gate to arrival

民航系统功能的分层: 服务 Counter-to-counter delivery of person+bags baggage-claim-to-baggage-claim delivery people transfer: loading gate to arrival gate runway-to-runway delivery of plane airplane routing from source to destination Introduction 69

ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff

ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing arriving airport Departing airport 各层功能的分布式实现 intermediate air traffic sites airplane routing Introduction 70

2. 网际协议栈 q 应用层application: 支持网络应用 m FTP, SMTP, STTP … q 传输层transport: 主机进程间报文段传送 m

2. 网际协议栈 q 应用层application: 支持网络应用 m FTP, SMTP, STTP … q 传输层transport: 主机进程间报文段传送 m TCP, UDP q 网络层network: 主机(源目标节点)间分组传送 m 主要是IP协议, 路由协议 … q 链路层link: 相邻网络节点间的数据帧传送 m application message transport segment network datagram link frame physical bit PPP, Ethernet … q 物理层physical: 物理介质上的比特传送 Introduction 72

分层: 逻辑通信 E. g. : 传输层 q 从应用层获取消息 q 添加地址可靠校验 等,创建报文段 q 发送报文段 q

分层: 逻辑通信 E. g. : 传输层 q 从应用层获取消息 q 添加地址可靠校验 等,创建报文段 q 发送报文段 q 等待对方应答 q 类比: 邮局 data application transport network link physical ack data network link physical application transport network link physical data application transport network link physical Introduction 74

分层: 物理通信 data application transport network link physical application transport network link physical data

分层: 物理通信 data application transport network link physical application transport network link physical data application transport network link physical Introduction 75

协议分层与数据 各层发方从上层到下层,收方从下层到上层传递数据 q 发方添加头部信息创建新的数据单元,收方去掉头部 q 传递新的数据单元到下层/上层 q 各层传送不同的协议数据单元PDU source M Ht M Hn Ht

协议分层与数据 各层发方从上层到下层,收方从下层到上层传递数据 q 发方添加头部信息创建新的数据单元,收方去掉头部 q 传递新的数据单元到下层/上层 q 各层传送不同的协议数据单元PDU source M Ht M Hn Ht M Hl Hn Ht M application transport network link physical destination application Ht transport Hn Ht network Hl Hn Ht link physical M message M segment M datagram M frame bit Introduction 76

3. TCP/IP新协议与网络数量激增: 1980 -1990 q 1983: 正式部署TCP/IP替代NCP q 1982: 定义了SMTP e-mail协议 q 1983: 开发了DNS

3. TCP/IP新协议与网络数量激增: 1980 -1990 q 1983: 正式部署TCP/IP替代NCP q 1982: 定义了SMTP e-mail协议 q 1983: 开发了DNS 实现 name-to-IP-address 转换 q 1985: 定义了FTP protocol q 1988: 实现了TCP congestion control q late 80’s: 新的国家网络: Csnet, BITnet, NSFnet, Minitel late 80’s: q late 80’s: 100, 000主机连接到多个网络组成的联盟 Introduction 81