第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · application layer...

78
Application Layer 2-1 第一章 绪论 Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 注:本PPT 来源于下面的料,并有所修改。 All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights Reserved

Upload: others

Post on 14-Jul-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Application Layer 2-1

第一章 绪论

Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith RossAddison-WesleyMarch 2012

注:本PPT 来源于下面的资料,并有所修改。

All material copyright 1996-2012J.F Kurose and K.W. Ross, All Rights Reserved

Page 2: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

第一章: 绪论目的 :

熟悉基本概念、基本术语(英文)

以因特网为例理解计算机网络结构和工作流程

主要内容:什么是因特网?

什么是协议?

网络边缘概念:主机 ,接入网,物理介质

网络核: 分组和电路交换, 因特网结构

分组网络性能指标: 丢包率, 延时, 吞吐量

网络安全(讨论课)

协议层次和服务模型

发展历史(阅读材料)

1-2

Page 3: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.1 什么是因特网?1.1.1 物理连接观点 :端设备、 通信链路和交换设备

millions of connected computing devices:

hosts = end systemsrunning network apps

communication linksfiber, copper, radio, satellitetransmission rate: bandwidth

Packet switches: forward packets (chunks of data)

routers and switches

wiredlinks

wirelesslinks

router

mobile network

global ISP

regional ISP

home network

institutionalnetwork

smartphone

PC

server

wirelesslaptop

1-3

区分path和link

Page 4: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

端系统、链路和交换设备

模拟邮政系统:

写信人和收信人: 端系统的源端和目的端

邮局: 路由器

两个邮局间运输线路: 链路

Q:链路的速度?(汽车、火车、飞机 … 双绞线、 铜线、光纤…链路 )

路径=所有线路集合 路径 =所有链路集合

Page 5: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

mobile network

global ISP

regional ISP

home network

institutionalnetwork

B:(目端)

A(源端)

A到B路径:红色箭头标注的7个路由器和8条链路。

不同的链路:无线、双绞线、同轴电缆、光纤…

A和B:端设备

路由器:交换设备

A和B:写信和收信人

邮局

A到B路径:传送信件经历的邮局和路线。

不同路线:公路、铁路和航线…

Page 6: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

“Fun” internet appliances

IP picture framehttp://www.ceiva.com/

Web-enabled toaster +weather forecaster

Internet phonesInternet refrigerator

Slingbox: watch,control cable TV remotely

1-6

Tweet-a-watt: monitor energy use

Page 7: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Internet: “network of networks”Interconnected ISPs

protocols control sending, receiving of msgs

e.g., TCP, IP, HTTP, Skype, 802.11Internet standards

RFC: Request for commentsIETF: Internet Engineering Task Force

mobile network

global ISP

regional ISP

home network

institutionalnetwork

1-7

A1:端设备和交换设备(螺母)通过物

理链路(螺栓)连接起来的网络。

Q2: end devices?A2:端设备(HOST)是运行应用程序的设备,处于网络端点。

Q1:螺母和螺栓的观点?

ISP:信息服务提供商

Page 8: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

1.1.2 提供服务的观点:提供基础设施、编程接口和协议

Infrastructure that provides services to applications:

Web, VoIP, email, games, e-commerce, social nets, …

provides programming interface to apps

hooks that allow sending and receiving app programs to “connect” to Internetprovides service options, analogous to postal service(如挂号信)

mobile network

global ISP

regional ISP

home network

institutionalnetwork

Introduction 1-8

Page 9: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

human protocols:“what’s the time?”“I have a question”introductions

… specific msgs sent… specific actions taken

when msgs received, or other events

network protocols:machines rather than humansall communication activity in Internet governed by protocols

protocols define format, orderof msgs sent and receivedamong network entities,

and actions taken on msg transmission, receipt

1-9

网络协议(protocol):支配网络所有活动的规约

网络协议定义消息格式、发送和接收顺序、传输和接收需要采取的动作。

消息(MSG):依据网络层次的不同,赋予MSG不同名称。(FRAME/PACKET/SEGMENT/MESSAGE)

Page 10: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

a human protocol and a computer network protocol:

Q: other human protocols?

Hi

Hi

Got thetime?2:00

TCP connectionresponse

Get http://www.awl.com/kurose-ross

<file>time

TCP connectionrequest

1-10

协议示例:

Page 11: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.2 网络边缘 :

network edge:hosts: clients and serversservers often in data centers

access networks, physical media: wired, wireless communication links

network core: interconnected routersnetwork of networks

mobile network

global ISP

regional ISP

home network

institutionalnetwork

1-11

网络结构:边缘、接入和核心

Page 12: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Host(主机): sends packets of datahost sending function:

takes application messagebreaks into smaller chunks,

known as packets, of length Lbits

transmits packet into access network at transmission rate R

link transmission ratecapacity, bandwidth

R: link transmission ratehost

12

two packets, L bits each

packettransmission

delay

time needed totransmit L-bit

packet into link

L (bits)R (bits/sec)= =

1-12

Page 13: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.2.1 接入网:连接端系统到边缘路由器

Q: How to connect end systems to edge router?residential access netsinstitutional access networks (school, company)mobile access networks

keep in mind: bandwidth (bits per second :bps) of access network?shared or dedicated?

1-13Q:如何配置你上网的边缘路由器 ?

Page 14: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

central office

ISP

telephonenetwork

DSLAM

voice, data transmittedat different frequencies over

dedicated line to central office

use existing telephone line to central office DSLAMdata over DSL phone line goes to Internetvoice over DSL phone line goes to telephone net

ADSL:< 2.5 Mbps upstream transmission rate < 24 Mbps downstream transmission rate

DSLmodem

splitter

DSL access multiplexer

1-14

DSL (数字用户线路)接入网:基于现有电话专用线路

多路复用技术

Page 15: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Cable接入网:基于共享的有线电视线路

cablemodem

splitter

…cable headend

Channels

VIDEO

VIDEO

VIDEO

VIDEO

VIDEO

VIDEO

DATA

DATA

CONTROL

1 2 3 4 5 6 7 8 9

frequency division multiplexing: different channels transmittedin different frequency bands

1-15

频分多路复用

因特网

Cable modem 支持以太网接口,因此速率比ADSL更高

Page 16: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

data, TV transmitted at different frequencies over shared cable

distribution network

cablemodem

splitter

…cable headend

CMTS

ISP

cable modemtermination system

HFC: hybrid fiber coax (多个同轴电缆网经过光纤连接到CMTS)

asymmetric: up to 30Mbps downstream transmission rate, 2 Mbps upstream transmission rate

network of cable, fiber attaches homes to ISP routerhomes share access network to cable headend unlike DSL, which has dedicated access to central office

HFC:混合光纤同轴电缆

1-16

Page 17: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

to/from headend or central office

cable or DSL modem

router, firewall, NAT

wired Ethernet (100 Mbps)

wireless access point (54 Mbps)

wirelessdevices

often combined in single box

1-17

1.2.2 接入网形式•家庭接入网:一般采用DSL和Cable Modem 方式

国内常用的TPLINK=AP+ROUTER

头端

Page 18: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

企业接入网 (Ethernet)

typically used in companies, universities, etc10 Mbps, 100Mbps, 1Gbps, 10Gbps transmission ratestoday, end systems typically connect into Ethernet switch

Ethernet switch

institutional mail,web servers

institutional router

institutional link to ISP (Internet)

1-18

Q: 二层和三层交换机?

Page 19: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

无线接入:

shared wireless access network connects end system to routervia base station aka “access point”

wireless LANs:within building (100 ft)802.11b/g (WiFi): 11, 54 Mbps transmission rate

wide-area wireless accessprovided by telco (cellular) operator, 10’s kmbetween 1 and 10 Mbps 3G, 4G: LTE

to Internet

to Internet

1-19

WiFi :短距离

Page 20: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.2.2 物理传输介质:

bit: propagates betweentransmitter/receiver pairsphysical link: what lies between transmitter & receiverguided media:

signals propagate in solid media: copper, fiber, coax

unguided media:signals propagate freely, e.g., radio

twisted pair (TP)two insulated copper wires

Category 5: 100 Mbps, 1 Gpbs EthernetCategory 6: 10Gbps

1-20

双绞线

传播

Page 21: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

coaxial cable:two concentric copper conductorsbidirectionalbroadband:

multiple channels on cableHFC

fiber optic cable:glass fiber carrying light pulses, each pulse a bithigh-speed operation:

high-speed point-to-point transmission (e.g., 10’s-100’s Gpbs transmission rate)

low error rate: repeaters spaced far apart immune to electromagnetic noise

1-21

同轴电缆和光缆光脉冲

Page 22: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

signal carried in electromagnetic spectrumno physical “wire”bidirectionalpropagation environment effects:

reflection obstruction by objectsinterference

radio link types:terrestrial microwave

e.g. up to 45 Mbps channelsLAN (e.g., WiFi)

11Mbps, 54 Mbpswide-area (e.g., cellular)

3G cellular: ~ few Mbpssatellite

Kbps to 45Mbps channel (or multiple smaller channels)270 msec end-end delaygeosynchronous versus low altitude

1-22

无线电:

地面微波

Page 23: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

mesh of interconnected routerspacket-switching: hosts break application-layer messages into packets

forward packets from one router to the next, acrosslinks on path from source to destinationeach packet transmitted at full link capacity

1.3 网络核心 (类比邮政系统功能)

1-23

路由器—邮局,邮局到邮局之间可以通过汽车、火车和飞机(不同的链路)传送信件。

Page 24: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

takes L/R seconds to transmit (push out) L-bit packet into link at R bpsstore and forward: entire packet must arrive at router before it can be transmitted on next link

one-hop numerical example:L = 7.5 MbitsR = 1.5 Mbpsone-hop transmission delay = 5 sec

more on delay shortly …1-24

sourceR bps destination

123

L bitsper packet

R bps

end-end delay = 2L/R (assuming zero propagation delay)

1.3.1 分组交换: 存储转发

Page 25: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

A

B

CR = 100 Mb/s

R = 1.5 Mb/s D

Equeue of packetswaiting for output link

1-25

queuing and loss: If arrival rate (in bits) to link exceeds transmission rate of link for a period of time:

packets will queue, wait to be transmitted on link packets can be dropped if memory (buffer) fills up

排队时延和分组丢失

缓冲区(队列)空间有限!可能导致丢包。

Page 26: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Network Layer 4-26

forwarding: move packets from router’s input to appropriate router output

routing: determines source-destination route taken by packets

routing algorithms

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

1

23

dest address in arrivingpacket’s header

路由和转发关键功能

Page 27: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.3.2 电路交换(Circuit switching)end-end resources allocated

to, reserved for “call”between source & dest:In diagram, each link has four circuits.

call gets 2nd circuit in top link and 1st circuit in right link.

dedicated resources: no sharingcircuit-like (guaranteed) performance

circuit segment idle if not used by call (no sharing)Commonly used in traditional telephone networks

1-27

一条LINK分为若干CIRCUIT

Page 28: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

FDM

frequency

timeTDM

frequency

time

4 usersExample:

1-28

电路交换: FDM 与 TDM (频分与时分)

Page 29: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

example:1 Mb/s linkeach user: • 100 kb/s when “active”• active 10% of time

circuit-switching:1M/100K =10 users

packet switching:with 35 users, probability > 10 active at same time is less than .0004

packet switching allows more users to use network!

Nusers

1 Mbps link

Q: how did we get value 0.0004?A: cn

k pk (1-p)n-k

Q: what happens if > 35 users ?A:练习题

1-29

分组和电路交换比较

Q:n个用户没有传输冲突的概率?A: n(1-p)n-1

Page 30: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

great for burst data (计算机数据具有突发性)

resource sharing simpler, no call setup

excessive congestion possible: packet delay and lossprotocols needed for reliable data transfer, congestion control

Q: How to provide circuit-like behavior?bandwidth guarantees needed for audio/video appsstill an unsolved problem

因特网采用分组交换技术,优缺点如下:

Q: human analogies of reserved resources (circuit switching) versus on-demand allocation (packet-switching)?

分组和电路交换比较

1-30

Page 31: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

分组交换特点

主机将消息分成分组按照源和目端转发路径,在网络中从一个路由器以链路带宽速度传输到下一个路由器。

存储转发:路由器需要存储先到达的分组数据位,在接收到整个分组后才能将其转发到下一个路由器。

分组间(不是用户间)共享链路带宽,适合计算机数据的突发性(burst)。

当网络拥塞时,分组可能丢失(丢包)。因此需要采取可靠传输和拥塞控制方案。

Page 32: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

End systems connect to Internet via access ISPs (Internet Service Providers)

Residential, company and university ISPsAccess ISPs in turn must be interconnected.

So that any two hosts can send packets to each otherResulting network of networks is very complex

Evolution was driven by economics and national policiesLet’s take a stepwise approach to describe current Internet structure

1.3.3 因特网结构:网络中的网络

端系统通过接入ISP接入到因特网,接入ISP彼此间互联,形成网络中的网络。

Page 33: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Question: given millions of access ISPs, how to connect them together?

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

Page 34: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

因特网结构 (全互联存在不可伸缩问题)

Option: connect each access ISP to every other access ISP? (全互联,可伸缩性差。 Scalable? )

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

connecting each access ISP to each other directly doesn’t

scale : O(N2) connections.

Page 35: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

因特网结构 (全局ISP方法)

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

Option: connect each access ISP to a global transit ISP? Customerand provider ISPs have economic agreement.

globalISP

Page 36: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

因特网结构 (多个全局ISP)

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

But if one global ISP is viable business, there will be competitors ….

ISP B

ISP A

ISP C

Page 37: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

因特网结构 (全局ISP通过IXP互联)

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

But if one global ISP is viable business, there will be competitors …. which must be interconnected

ISP B

ISP A

ISP C

IXP

IXP

peering link

Internet exchange point

Page 38: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

因特网结构 (通过区域网连接到全局ISP)

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

… and regional networks may arise to connect access nets to ISPS

ISP B

ISP A

ISP C

IXP

IXP

regional net

Page 39: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnet

accessnetaccess

net

accessnet

… and content provider networks (e.g., Google, Microsoft, Akamai ) may run their own network, to bring services, content close to end users

ISP B

ISP A

ISP B

IXP

IXP

regional net

Content provider network

因特网结构 (内容提供网CPN)

Page 40: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

因特网结构 (Tier 1)

at center: small # of well-connected large networks“tier-1” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coveragecontent provider network (e.g, Google): private network that connects it data centers to Internet, often bypassing tier-1, regional ISPs 1-40

accessISP

accessISP

accessISP

accessISP

accessISP

accessISP

accessISP

accessISP

Regional ISP Regional ISP

IXP IXP

Tier 1 ISP Tier 1 ISP Google

IXP

Page 41: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

to/from customers

peering

to/from backbone

………

POP: point-of-presence

1-41

入网点(PoP,point-of-presence):将互联网从一个地方接到其他地方的接入点,通常包含一台或多台路由器等交换设备。一般安装在电信运营商的租用空间中,互联网服务提供商可以租借这些

空间来提供服务。

因特网交换点 (IXP,Internet exchange point ):连接ISP网络的汇合点。

多宿ISP(multi-home):和多个网络有链接的

ISP。

对等链路(peering link): 同层次且临近

的两个ISP不通过服务提供商而直接连接的链路。

几个术语:

Page 42: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

中国互联网示意图(2013年,来源CNNIC)

Page 43: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

中国电信网络拓扑结构

Page 44: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

中国主要骨干网络国际出口带宽数

国际出口 带宽数(Mbps)中国电信 2,569,519

中国联通 1,037,023

中国移动 390,263

中国教育和科研计算机网 66,560

中国科技网 55,296

中国国际经济贸易互联网 2

合计 4,118,663

摘自CNNIC第 35 次中国互联网络发展状况统计报告(2015)

Page 45: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

湖南大学校园网结构

Page 46: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

packets queue in router bufferspacket arrival rate to link (temporarily) exceeds output link capacitypackets queue, wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)

free (available) buffers: arriving packets dropped (loss) if no free buffers

1-46

1.4 分组网络性能指标

Page 47: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

dproc: nodal processingcheck bit errorsdetermine output linktypically < msec

A

B

propagation

transmission

nodalprocessing queueing

dqueue: queueing delaytime waiting at output link for transmission depends on congestion level of router

dnodal = dproc + dqueue + dtrans + dprop

1-47

1.4.1 延时 (delay)

Page 48: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

dtrans: transmission delay:L: packet length (bits) R: link bandwidth (bps)dtrans = L/R

dprop: propagation delay:d: length of physical links: propagation speed in medium (~2x108 m/sec)dprop = d/sdtrans and dprop

very different

四种延时:

propagation

nodalprocessing queueing

dnodal = dproc + dqueue + dtrans + dprop

1-48

A

B

transmission

* Check out the Java applet for an interactive animation on trans vs. prop delay

Page 49: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

cars “propagate” at 100 km/hrtoll booth takes 12 sec to service car (bit transmission time)car~bit; caravan ~ packetQ: How long until caravan is lined up before 2nd toll booth?L=10,R=1/12

time to “push” entire caravan through toll booth onto highway = 12*10 = 120 sectime for last car to propagate from 1st to 2nd toll both: 100km/(100km/hr)= 1 hrA: 62 minutes

toll booth

toll booth

ten-car caravan

100 km 100 km

1-49

模拟车队举例:

Page 50: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

suppose cars now “propagate” at 1000 km/hrand suppose toll booth now takes one min to service a carQ: Will cars arrive to 2nd booth before all cars serviced at first booth?

A: Yes! after 7 min, 1st car arrives at second booth; three cars still at 1st booth.

toll booth

toll booth

ten-car caravan

100 km 100 km

1-50

模拟车队举例:

注意:这个例子只是区分传播延时和传输延时。分组交换是存储转发,也就是第一辆车在最后一辆车通过第一个收费站

前不能先开走。

Page 51: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

R: link bandwidth (bps)L: packet length (bits)a: average packet arrival rate

Traffic:业务量

traffic intensity = La/R

La/R ~ 0: avg. queueing delay smallLa/R -> 1: avg. queueing delay largeLa/R > 1: more “work” arriving than can be serviced, average delay infinite!

aver

age

que

uein

g de

lay

La/R ~ 0

La/R -> 11-51

排队延时:

Page 52: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

what do “real” Internet delay & loss look like? traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i:

sends three packets that will reach router i on path towards destinationrouter i will return packets to sendersender times interval between transmission and reply.

3 probes

3 probes

3 probes

1-52

因特网中实际的延时和分组丢失(实验课详细讨论)

Page 53: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

因特网中实际的延时和分组丢失

1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms 5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms 6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms17 * * *18 * * *19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms

traceroute: gaia.cs.umass.edu to www.eurecom.fr3 delay measurements from gaia.cs.umass.edu to cs-gw.cs.umass.edu

* means no response (probe lost, router not replying)

trans-oceaniclink

1-53* Do some traceroutes from exotic countries at www.traceroute.org

WINDOWS:Routert命令

Page 54: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Tracert(Windows中命令)

Page 55: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.4.2 分组丢失:

queue (aka buffer) preceding link in buffer has finite capacitypacket arriving to full queue dropped (aka lost)lost packet may be retransmitted by previous node, by source end system, or not at all

A

B

packet being transmitted

packet arriving tofull buffer is lost

buffer (waiting area)

1-55* Check out the Java applet for an interactive animation on queuing and loss

Page 56: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.4.3 吞吐量(Throughput)

throughput: rate (bits/time unit) at which bits transferred between sender/receiver

instantaneous: rate at given point in timeaverage: rate over longer period of time

server, withfile of F bits

to send to client

link capacityRs bits/sec

link capacityRc bits/sec

server sends bits (fluid) into pipe

pipe that can carryfluid at rateRs bits/sec)

pipe that can carryfluid at rateRc bits/sec)

1-56

Page 57: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Rs < Rc What is average end-end throughput?

Rs bits/sec Rc bits/sec

Rs > Rc What is average end-end throughput?

端到端路径上的瓶颈(bottleneck)链路限制了端到端吞吐量

Rs bits/sec Rc bits/sec

1-57

吞吐量(Throughput)

Page 58: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

吞吐量: Internet 场景

10 connections (fairly) share backbone bottleneck link R bits/sec

Rs

Rs

Rs

Rc

Rc

Rc

R

per-connection end-end throughput: min(Rc,Rs,R/10)in practice: Rc or Rsis often bottleneck

1-58

Page 59: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Networks are complex,with many “pieces”:

hostsrouterslinks of various mediaapplicationsprotocolshardware, software

Question:is there any hope of organizing structure of

network?

…. or at least our discussion of networks?

1-59

1.5 协议分层

Page 60: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

a series of steps

ticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

1-60

举例:乘飞机旅行的步骤

Page 61: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

ticket (purchase)

baggage (check)

gates (load)

runway (takeoff)

airplane routing

departureairport

arrivalairport

intermediate air-trafficcontrol centers

airplane routing airplane routing

ticket (complain)

baggage (claim

gates (unload)

runway (land)

airplane routing

ticket

baggage

gate

takeoff/landing

airplane routing

layers: each layer implements a servicevia its own internal-layer actionsrelying on services provided by layer below

1-61

航班功能分层

Page 62: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

dealing with complex systems:explicit structure allows identification, relationship of complex system’s pieces

layered reference model for discussionmodularization eases maintenance, updating of system

change of implementation of layer’s service transparent to rest of systeme.g., change in gate procedure doesn’t affect rest of system

layering considered harmful?

1-62

为什么要分层?

Page 63: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

application: supporting network applications

FTP, SMTP, HTTPtransport: process-process data transfer

TCP, UDPnetwork: routing of datagrams from source to destination

IP, routing protocolslink: data transfer between neighboring network elements

Ethernet, 802.111 (WiFi), PPPphysical: bits “on the wire”

application

transport

network

link

physical

1-63

因特网协议栈(TCP/IP模型)

Page 64: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

ISO/OSI 参考模型

presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventionssession: synchronization, checkpointing, recovery of data exchangeInternet stack “missing” these layers!

these services, if needed, must be implemented in applicationneeded?

application

presentation

session

transport

network

link

physical

1-64

Page 65: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

sourceapplicationtransportnetwork

linkphysical

HtHn M

segment Ht

datagram

destinationapplicationtransportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

networklink

physical

linkphysical

HtHnHl M

HtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage M

Ht M

Hn

frame

1-65

Page 66: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,
Page 67: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

covered a “ton” of material!Internet overviewwhat’s a protocol?network edge, core, access network

packet-switching versus circuit-switchingInternet structure

performance: loss, delay, throughputlayering, service modelssecurityhistory

you now have:context, overview, “feel”of networkingmore depth, detail to follow!

1-67

小结

练习题:习题8,10,11,20,22

Page 68: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

field of network security:how bad guys can attack computer networkshow we can defend networks against attackshow to design architectures that are immune to attacks

Internet not originally designed with (much) security in mind

original vision: “a group of mutually trusting users attached to a transparent network” ☺Internet protocol designers playing “catch-up”security considerations in all layers!

1-68

1.6 网络安全(讨论课)

Page 69: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Bad guys: put malware into hosts via Internet

malware can get in host from:virus: self-replicating infection by receiving/executing object (e.g., e-mail attachment)

worm: self-replicating infection by passively receiving object that gets itself executed

spyware malware can record keystrokes, web sites visited, upload info to collection site

infected host can be enrolled in botnet, used for spam. DDoS attacks

1-69

Page 70: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

target

Denial of Service (DoS): attackers make resources (server, bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus traffic

1. select target

2. break into hosts around the network (see botnet)

3. send packets to target from compromised hosts

Bad guys: attack server, network infrastructure

1-70

Page 71: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Bad guys can sniff packetspacket “sniffing”:

broadcast media (shared ethernet, wireless)promiscuous network interface reads/records all packets (e.g., including passwords!) passing by

A

B

C

src:B dest:A payload

wireshark software used for end-of-chapter labs is a (free) packet-sniffer

1-71

Page 72: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Bad guys can use fake addresses

IP spoofing: send packet with false source address

A

B

C

src:B dest:A payload

1-72

… lots more on security (throughout, Chapter 8)

Page 73: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1.7 因特网历史 (阅读)

1961: Kleinrock -queueing theory shows effectiveness of packet-switching1964: Baran - packet-switching in military nets1967: ARPAnet conceived by Advanced Research Projects Agency1969: first ARPAnet node operational

1972:ARPAnet public demoNCP (Network Control Protocol) first host-host protocol first e-mail programARPAnet has 15 nodes

1961-1972: Early packet-switching principles

1-73

Page 74: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1970: ALOHAnet satellite network in Hawaii1974: Cerf and Kahn -architecture for interconnecting networks1976: Ethernet at Xerox PARClate70’s: proprietary architectures: DECnet, SNA, XNAlate 70’s: switching fixed length packets (ATM precursor)1979: ARPAnet has 200 nodes

Cerf and Kahn’s internetworking principles:

minimalism, autonomy - no internal changes required to interconnect networksbest effort service modelstateless routersdecentralized control

define today’s Internet architecture

1972-1980: Internetworking, new and proprietary nets

Internet history

1-74

Page 75: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

1983: deployment of TCP/IP1982: smtp e-mail protocol defined 1983: DNS defined for name-to-IP-address translation1985: ftp protocol defined1988: TCP congestion control

new national networks: Csnet, BITnet, NSFnet, Minitel100,000 hosts connected to confederation of networks

1980-1990: new protocols, a proliferation of networks

Internet history

1-75

Page 76: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

early 1990’s: ARPAnet decommissioned1991: NSF lifts restrictions on commercial use of NSFnet (decommissioned, 1995)early 1990s: Web

hypertext [Bush 1945, Nelson 1960’s]HTML, HTTP: Berners-Lee1994: Mosaic, later Netscapelate 1990’s: commercialization of the Web

late 1990’s – 2000’s:more killer apps: instant messaging, P2P file sharingnetwork security to forefrontest. 50 million host, 100 million+ usersbackbone links running at Gbps

1990, 2000’s: commercialization, the Web, new apps

Internet history

1-76

Page 77: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

2005-present~750 million hosts

Smartphones and tabletsAggressive deployment of broadband accessIncreasing ubiquity of high-speed wireless accessEmergence of online social networks:

Facebook: soon one billion usersService providers (Google, Microsoft) create their own networks

Bypass Internet, providing “instantaneous” access to search, emai, etc.

E-commerce, universities, enterprises running their services in “cloud” (eg, Amazon EC2)

Internet history

1-77

Page 78: 第一章 绪论 - hnu.edu.cnkczxsp.hnu.edu.cn/upload/20150526145143982.pdf · Application Layer 2-1 第一章绪论 Computer Networking: A Top Down Approach 6th edition Jim Kurose,

Introduction

Introduction: summary

covered a “ton” of material!Internet overviewwhat’s a protocol?network edge, core, access network

packet-switching versus circuit-switchingInternet structure

performance: loss, delay, throughputlayering, service modelssecurityhistory

you now have:context, overview, “feel”of networkingmore depth, detail to follow!

1-78