数据与计算机通信(第六版)_第1页
数据与计算机通信(第六版)_第2页
数据与计算机通信(第六版)_第3页
数据与计算机通信(第六版)_第4页
数据与计算机通信(第六版)_第5页
已阅读5页,还剩97页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

数据与计算机通信(第六版)

DATA&COMPUTER

COMMUNICATIONS

(WilliamStallings)

http://

Homework&Examination

玛Homework(10%)

J!Experiment(10%)

频Examination(80%)

2

什么是Internet(从硬件角度看)

数以百万的主

机、终端设备

(工作站、服

通信链路

卫星)

路由器

工作站

服务器

移动终端

应用需要什么样的传输服务?

差错

•某些应用可以容忍差错(e.g.

首频)

•某些应用不能容忍差错(e.g.

实时

FTP,telnet)

•某些应用要求有实

444-

市范时性(e.g.Internet电

•要求有最低带宽(eg多媒体)话,互动游戏)

•对带宽没有要求(egFTP)

4

常见应用对传输层服务的要求

应用差错带宽实时

文件传输不允许弹性的no

电子邮件不允许弹性的no

实时首频/视频允许•:5Kb-1Mbyes,100's毫秒

视频:10Kb-5Mb

存储的首频/视频允许同上yes,几秒

互动游戏允许很小yes,100's毫秒

金融应用不允许弹性的yesandno

5

Client/server范例

典型的网络应用包含客

户机和服务器

发起连接,请求服务。e.g.

请求WWW页面,发送

email

提供服务。eg发送请求

的WWW页面,接收、存储

email

WWW:HTTP协议

一粤一

超文本传输协议

HTTP运行工E浏览器的PC

•是应用层协议

•client/server模型

-浏览器请求、

显示网页运行WebServer

-server:服务器应的服务器

答请求

•HTTP1.0:RFC1945

•HTTP1.1:RFC2068

运行Netscape浏览器的Mac

7

HTTP协议

HTTP:TCP传输月艮务

•客户机发起与服务器的TCP连接(仓惟socket),

port80

•服务器接收与客户机的连接

■在客户机与服务器之间交换HTTP协议消息

■释放TCP连接

8

HTTP实例

假设用户键入URL(包含文本和10个图片):

/index.html

Http浏览馅发起与服务命Http服务器在

的TCP连接。R0端口等待TCP连接,建立连接后通

缺省端口80。%浏览器

Http浏览器通过Socket发送请求消

Http服务器收到请求消息,组织

应答消息(包含WWW.

/index.html),通过

Socket发送给浏览器。

时间9

HTTP实例(续)

http服务器释放TCP

连接

Http浏览器收到包含html文件

的消息,显示html文件,分

析html文件发现10个引用的

JPEG图片文件。

针对于每个图片文件重

复1—5过程。

•非持续连接:每次TCP连接只传送一个对象

-有些浏览器同时与服务器建立多个TCP连接,每个连接针对

一个对象

•持续连接:每次TCP连接传送多个对象io

HTTPrequest消息格式举例

郴消总L

-ASCII

request

(GET,POST,WET/somedir/page.htmlHTTP/l.1

HEAD)Connection:close

headerUser-agent:Mozilla/4.0

linesAccept-language:fr

Carriagereturn^^^,....

lin[feed(exxtracarriagerexturn,linexfeed)

indicatesend

ofmessage

ii

HTTPrequest消息包格式

methodspURLspversionIcrIIfIrequest

:ri—J-i————J————line

.':1crIf、

.Vheader

•|lines

headerfieldnamevaluecrIfJ

crIf

EntityBody

12

HTTPreply消息格式举例

台丰a市廿s-H管2

(protoco-k^^

statuscodeHTTP/1.1200OK

statusphrase]Connection:close

Date:Thu,06Aug199812:00:15GMT

headerServer:Apache/I.3.0(Unix)

linesLast-Modified:Mon,22Jun199809:23:25GMT

Content-Length:6821

Content-Type:text/html

da'。,datadatadatadatadata..

requested

htmlfile

13

HTTPreply消息包格式

14

IntroductiontotheTextbook

•Overview

•DataCommunications

•WideAreaNetworks

•LocalAreaNetworks

•CommunicationsArchitectureandProtocol

15

ContentsinChapter1&2

•Introduction

—DataCommunications

—DataCommunicationNetworking

•ProtocolsandArchitecture

•Objective

16

KeyCommunicationsTasks

•TransmissionSystemUtilization

•Interfacing

•SignalGeneration

•Synchronization

•ExchangeManagement

•Errordetectionandcorrection

•Addressingandrouting

•Recovery

•Messageformatting

•Security

•NetworkManagement

18

1.2DataCommunications

DigitalbitAnalogAnalogDigitalbit

streamsignalsignalstream

TextJ-U-J-U-Text

J✓/

Trails-

Trami-

SourcemissionReceiverDestination

■mitter■.■

System

o©0o0o

InputInputdataTransmittedReceivedOutputdataOutput

informationg(osignalsignalg'it)information

ins(/)W)m'

TransmissionSystem?

19

TransmissionSystem

「_WidaAreaNetwork-

fctwork

20

1.3.1WideAreaNetworks

ICircuitswitching(e.g.Telephonenetwork)

一communicationspathestablishedforthe

durationoftheconversation

—Constantdatarate

-Advantages&disadvantages?

IPacketswitching

IFramerelay

IAsynchronousTransferMode(ATM)

IISDN&BroadbandISDN

21

PacketSwitching

•Smallchunks(packets)ofdata

•Packetspassedfromnodetonodebetweensourceand

destination

•Terminaltoterminal(64Kbps)

•Inthemodemhigh-speedtelecommunicationssystem,

theoverheadisunnecessaryandcounterproductive

22

FrameRelay

•Problems

—Packetswitchingsystemshavelargeoverheads

tocompensateforerrors

—Modernsystemsaremorereliable

—Errorscanbecaughtinendsystem

•Mostoverheadforerrorcontrolisstripped

out(2Mbps)

23

AsynchronousTransferMode(ATM)

•Evolutionofframerelay

•Littleoverheadforerrorcontrol

•(calledcell)length

•Anythingfrom10MbpstoGbps

•Constantdatarateusingpacketswitching

technique

24

IntegratedServicesDigital

Network(ISDN)

•Text,multimedia,etc.Widevarietyof

services

•Entirelydomain

•Designedtoreplacepublictelecomsystem

25

1.3.2LocalAreaNetworks

Smallerscope(Buildingorsmallcampus)

摩Ownedbysameorganization(Purchase&

Maintenance,Management)

鼠Dataratesmuchhigher

26

1.4FTPProtocol

(oilipiltlT\

FiletninslerFilesandfileIhubtri*commntuhFileIninsl'iT

applcatrnnappl.Lalion

('omnnnications(uinuninicjiiiHivrt-kilwl(lainuni【、(ommunicalions

senicimoduleservicemodule

kaccessComnmmeationsNelMOIkaccess

nin

mdduk__XVIMnrkinU'ihm1julc

|i)uic

27

DemoofProtocol

Humanbeing&computernetworkprotocol:

time

28

1.4.1Protocols

Usedforcommunicationsbetweenentitiesina

system

J,MustspeakthesamelanguageUsedfor

communicationsbetweenentitiesinasystem

也Entities

IUserapplications,e-mailfacilities,terminals

门Systems

IComputer,Terminal,Remotesensor

29

KeyElementsofaProtocol

号Syntax

IDataformats,Signallevels,etc.

色Semantics

(Controlinformation,Errorhandling,etc.

Timing

■Speedmatching,Sequencing

30

ProtocolArchitecture

ETaskofcommunicationbrokenupinto

modules

金,Forexamplefiletransfercouldusethree

modules:

■Filetransferapplication

ICommunicationservicemodule

■Networkaccessmodule

31

AThreeLayerModel

玛NetworkAccessLayer

EAddress,priority,differentstandard

段TransportLayer

flReliable&unreliableexchange

玛ApplicationLayer

32

NetworkAccessLayer

•Exchangeofdatabetweenthecomputerand

thenetwork

•Sendingcomputerprovidesaddressof

destination

•Mayinvokelevelsofservice,dependenton

typeofnetworkused(LAN,packet

switchedetc.)

33

TransportLayer

刊Reliabledataexchange

四Independentofnetworkbeingused

J!Independentofapplication

34

ApplicationLayer

同Supportfordifferentuserapplications

Jle.g.e-mail,filetransfer

35

ProtocolArchitecturesandNetworks

Twolevelsof

Serveraddressing

required

Eachcomputer

needsunique

networkaddress

Eachapplication

ona(multi­

tasking)computer

needsaunique

addresswithinthe

computer

—Theservice

accesspointor

Networkaccess

36

ProtocolsinSimplified

Architecture

37

ProtocolDataUnits(PDU)

鼠Carriesdata

玛Controlinformationisaddedtouserdataateachlayer,

e.g.

麒Transportlayermayfragmentuserdata

J!Eachfragmenthasatransportheaderadded(Destination

SAP,Sequencenumber,Errordetectioncode)

38

NetworkPDU

色Addsnetworkheader

Inetworkaddressfordestinationcomputer

IFacilitiesrequests

39

OperationofaProtocol

Architecture

40

TwoProtocolArchitecture

•TCP/IP

•OSI

41

1.4.2TCP/IPProtocol

Architecture

•DevelopedbytheUSDefenseAdvancedResearch

ProjectAgency(DARPA)foritspacketswitched

network(ARPANET)

•UsedbytheglobalInternet

•Noofficialmodelbutaworkingone.

—Applicationlayer

—Hosttohostortransportlayer

一Internetlayer

一Networkaccesslayer

—Physicallayer

Whyandhowlayered?P4542

PhysicalLayer

•Physicalinterfacebetweendata

transmissiondevice(e.g.computer)and

transmissionmediumornetwork

•Characteristicsoftransmissionmedium

•Signallevels

•Datarates

•etc.

43

NetworkAccessLayer

•Attachedtothe

•Exchangeofdata

•Destinationaddressprovision

•Invokingserviceslikepriority

44

InternetLayer(IP)

•Systemsmaybeattachedto

•Routingfunctionsacrossmultiplenetworks

45

TransportLayer(TCP)

•TCP

—Reliabledeliveryofdata

—Orderingofdelivery

•UDP

—Unreliabledeliveryofdata

—Out-of-order

46

ApplicationLayer

•Supportforuserapplications

•e.g.http,SMPT

47

NetworkApplications&ApplicationProtocols

transport

network

datalink

physical|

Applications:

-e.g.Email,FTP,

Web

ApplicationProtocols:

transport

transportnetwork

network-datalink

datalinkphysical

physical

48

1.4.3OSIModel

•OpenSystemsInterconnection,Developed

bytheInternationalOrganizationfor

Standardization(ISO)

•Sevenlayers

•Atheoreticalsystemdeliveredtoolate!

TCP/IPisthedefactostandard

50

OSILayers

Application

Presentation

Session

Transport

Network

DataLink

Physical

51

OSIVTCP/IP

OSITCP/IP

kAL

Application

Application

Presentation

Us(er

bpjace

Sess沁n

1

£'Softvare

Transport

Transport(host-to-host)■■

Internetk

NetworkFirmware

Network

Operating

DataLinkAccessIIar(ware

_Svsem

1,1F

Ph•yfsicalPhysical

Ar1F

2ProtocolArchitecture

•Layeredstructureofhardwareandsoftware

•Eachlayercontainsoneormoreprotocols

•Keyfunctions:segmentation,reassembly,

connectioncontrol,ordereddelivery,flow

control,errorcontrol,addressing,and

multiplexing

53

2.1.1Characteristics

•Directorindirect

•Monolithicorstructured

•Symmetricorasymmetric

•Standardornonstandard

54

TheUseofStandardProtocols

(a)Withoutstandsids:12differentprotocol;(a)Withstandards:1protocol;

24protocolimplementations7implementations

55

2.1.2Functions

小,Encapsulation

国Segmentationandreassmebly

星Connectioncontrol

玛Ordereddelivery

色Flowcontrol

四Errorcontrol

星Addressing

Multiplexing

小,Transmissionservices

56

Encapsulation

四Additionofcontrolinformationtodata

IAddressinformation

IError-detectingcode

IProtocolcontrol

57

Encapsulation(continued)

58

Segmentation

(Fragmentation)

Datablocksareofboundedsize

J!Applicationlayermessagesmaybelarge,while

networkpacketsmaybesmaller

小!Splittinglargerblocksintosmalleronesis

segmentation(orfragmentationinTCP/IP)

IATMblocks(cells)are53octetslong

IEthernetblocks(frames)areupto1526octetslong

J!Checkpointsandrestart/recovery

里Counterpart:Reassembly

59

Advantages&Disadvantagesof

Segmentation

玛Advantages

IMoreefficienterrorcontrol

IMoreequitableaccesstonetworkfacilities,

Shorterdelays

ISmallerbuffersneeded

摩Disadvantages

■Overheads

IIncreasedinterruptsatreceiver

(Moreprocessingtime

60

ConnectionControl

小!DataTransfer,Threephrases:

现ConnectionEstablishment(certificate,negotiationother

parameters)

玛Datatransfer

摩Connectiontermination

J!Maybeconnectioninterruptionandrecovery

哥Sequencenumbersusedfor

IOrdereddelivery

IFlowcontrol

IErrorcontrol

61

ConnectionOrientedDataTransfer

OrderedDelivery

』!PDUsmayarriveoutoforder

』!PDUsmaytraversedifferentpathsthrough

network

SequentiallynumberPDUstoallowfor

ordering

63

FlowControl

Whyneedsflowcontrol?(Overflow)

Neededatapplication,aswellasnetwork

layers

刊Doneby

Limitamountorrateofdata

“Stopandwait

州Creditsystems(Slidingwindow)

64

ErrorControl

小,Guardagainstlossordamage(Performedatvarious

levels)

J!Twofunctions:errordetection&retransmission

马Errordetection

ISenderinsertserrordetectingbits

IReceiverchecksthesebits

IIfOK,acknowledge

IIferror,discardpacket

玛Retransmission

IIfnoacknowledgeingiventime,re-transmit

65

Addressing

Addressinglevel

Addressingscope

Connectionidentifiers

Addressingmode

66

.1Addressinglevel

鼠Levelinarchitectureatwhichentityisnamed

摩Uniqueaddressforeachendsystem(computer)

androuter

哥Networkleveladdress

IIPorinternetaddress(TCP/IP)

INetworkserviceaccesspointorNSAP(OSI)

Processwithinthesystem

IPortnumber(TCP/IP)

IServiceaccesspointorSAP(OSI)

67

AddressConcepts

HostAHostB

.2AddressingScope

Globalnonambiguity

IGlobaladdressidentifiesuniquesystem

J!Globalapplicability

litispossibleatanysystem(anyaddress)to

identifyanyothersystem(address)bythe

globaladdressoftheothersystem

“e.g.MACaddressonIEEE802networks

69

.3ConnectionIdentifiers

受datatransfer(e.g.virtual

circuits)

鼠Allocateaconnectionnameduringthetransfer

phase,advantages:

IReducedoverheadasconnectionidentifiersareshorter

thanglobaladdresses

IRoutingmaybefixedandidentifiedbyconnectionname

IEntitiesmaywantmultipleconnections-multiplexing

IStateinformation,(flowcontrol&errorcontrol)

70

.4AddressingMode

Unicastaddress

^Usuallyanaddressreferstoasinglesystem

醒Broadcast

flMayaddressallentitieswithinadomain

理Multicast

/IMayaddressasubsetoftheentitiesinadomain

71

Multiplexing

四Supportingmultipleconnectionsononemachine

(X.25,TCP)

i?lMappingofmultipleconnectionsatoneleveltoa

singleconnectionatanother

ICarryinganumberofconnectionsononefiberoptic

cable

IAggregatingorbondingISDNlinestogainbandwidth

■Upwardmultiplexing&downwardmultiplexing(P43)

72

TransmissionServices

1Priority(e.g.controlmessages)

刊Qualityofservice

1Minimumacceptablethroughput

IMaximumacceptabledelay

玛Security

■Accessrestrictions

73

2.2OSI-TheModel

摩Eachlayerperformsasubsetoftherequired

communicationfunctions

玛Eachlayerreliesonthenextlowerlayer

J!Eachlayerprovidesservicestothenexthigher

layer

玛Changesinonelayershouldnotrequirechanges

inotherlayers

里Table2.2&2.3

74

2.2.1TheOSIEnvironment

LayerSpecificStandards

ServiceDefinilion

(Functionaldescription

forinternaluse)

77

ElementsofStandardization

玛Servicedefinition(Functionaldescriptionof

whatisprovided)

典Protocolspecification

IOperatesbetweenthesamelayerontwo

systems

IMayinvolvedifferentoperatingsystem

IProtocolspecificationmustbeprecise(e.g.

Formatofdataunits,Semanticsofallfields,

allowablesequenceofPCUs)

Addressing(ReferencedbySAPs)

78

2.2.2PrimitivesandParameters

•Fourtypesofprimitivesdefinethe

interactionbetweenadjacentlayers

-Request

-Indication

-Response

-Confirm

•Confirmedservice&Nonconfirmed

service

79

Confirmedservice

ServiceuserServiceproviderServiceuser

Confirm

80

Nonconfirmedservice

ServiceuserServiceproviderServiceuser

81

2.2.3OSILayers(1)

小!Physical(rawbitstream)

IPhysicalinterfacebetweendevices(Mechanical,

Electrical,Functional,Procedural)

鼠DataLink

IMeansofactivating,maintainingand

deactivatingareliablelink

IErrordetectionandcontrol

1Higherlayersmayassumeerrorfree

transmission

82

OSILayers(2)

Network

ITransportofinformation

INotneededondirectlinks

IRoute

盟Transport

IExchangeofdatabetweenendsystems

IErrorfree

IInsequence

INolosses

INoduplicates

IQualityofservice

83

OSILayers(3)

色Session

1Controlofdialoguesbetweenapplications

IDialoguediscipline(fullduplexorhalfduplex)

IGrouping

IRecovery

哥Presentation

IDataformatsandcoding(E.g.Datacompression&

Encryption)

Application

IMeansforapplicationstoaccessOSIenvironment

84

UseofaRelay

ENDRELAYEND

SYSTEMSYSTEMSYSTEM

-Application-layerprotocol

■Presentation-layerprotocol

Session-layerprotocol-

Transport-layerprotocol

-Network-"Network-

■DataLink-DataLink-

<———Physical———►-Physical一

PhysicalmediaforOSI$PhysicalmediaforOSI

85

补充:网络服务类型和传输协议等级

•传输层必须知道在它下面的网络所能提

供的服务类型。根据网络连接的接收端

服务用户的请求和与连接相联系的服务

质量,传输层选择一个协议类别来匹配

有关支持网络的用户服务质量参数。

86

网络服务类型

网络服务按质量分成三种类型:

•A型网络服务:具有可接受的剩余差错率(或

称残差率)和故障告知率的网络连接。这里残

差率是指未改正的差错且不通知传输层;网络

层的故障告知是指网络层通知传输层的网络连

接释放或网络连接复位,故障告知率可用网络

连接断开与复位之比率表示。

•B型网络服务:具有可接受的残差率和不可接

受的故障告知率的网络连接。

•C型网络服务:对传输服务用户而言,网络连

接具有不能接受的残差率。

传输协议类别

•用不同的传输协议类别来匹配不同的网

络服务类型

•TPO〜TP4

88

0类协议(TPO):简单类

•专为A型网络连接设计

•提供通过协商的连接建立、分段和差错

报告的数据传输所需的功能、流量控制

功能(由网络服务的流控提供)和连接

拆除功能(由网络服务的连接拆除功能

提供)。

・没有差错修复功能,也没有将多条传输

连接复用到一条网络连接上的功能。

1类协议(TP1):基本差错修复类

•以最少的内务开销提供基本的传输连接,主要

目的是由网络拆除连接(断连)或复位状态中

进行修复。当网络连接断开时,传输层试图建

立另一条网络连接

•可适用于B型网络连接

•TP1提供传输连接、加速数据传输、拆除连接

和在一条网络连接上支持连续的传输连接的能

力,并提供TPO的功能以及在没有传输服务用

户参与的情况下,从网络层告警的故障中修复

的能力

90

2类协议(TP2):复用类

•适用于A型网络连接

•在一条网络连接上可复用多条传输连接,它是

TPO的增强型。它提供具有流控的传输连接和

不具有流控的传输连接,也支持加速数据的传

送,但不提供差错检测和对网络连接故障的修

复功能。若网络连接无意中断开或复位,传输

连接将不经过释放规程而即被切断,并告知传

输服务用户。

91

3类协议(TP3):差错修复和复用类

•适用于B型网络连接

•TP3提供包含TP2的功能以及TP1从网络

连接断开或复位中自行修复的能力(无

传输服务用户参与)

92

4类协议(TP4):差错检测和修复、复用

•此类协议功能最齐全,在网络的质量较差时保

证高可靠的数据传送

•适用于C型网络连接

•TP4能检测由于网络服务提供者提供低质量服

务而引起的故障和从故障中自行修复的能力,

所检测的故障种类包括:TPDU丢失、TPDU传

输失序、TPDU重复、TPDU残缺,还能检测有

告警和无告警的网络故障,并使用超时机制从

故障中自行修复。显然,TP4是最复杂的传输

协议

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论