计算机网络与互联网英语chap7.ppt

上传人:hyn****60 文档编号:87326428 上传时间:2023-04-16 格式:PPT 页数:30 大小:1.47MB
返回 下载 相关 举报
计算机网络与互联网英语chap7.ppt_第1页
第1页 / 共30页
计算机网络与互联网英语chap7.ppt_第2页
第2页 / 共30页
点击查看更多>>
资源描述

《计算机网络与互联网英语chap7.ppt》由会员分享,可在线阅读,更多相关《计算机网络与互联网英语chap7.ppt(30页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Chapter 7Packets,Frames,And Error Detection(Parity,Checksums,and CRCs)Part III Packet TransmissionSmallest piece of information lWhen you send a message between two hosts,the smallest piece of information may be:lBitlCharacter(e.g.RS232)Switching lWhen should this piece of information be sent?lAs so

2、on as it is available-circuit switchinglWhen the entire message is ready-message switchinglAfter X number of bits/characters-packet switchingSwitching content Circuit sw.Message sw.Packet sw.P1P2P3P4P1P2P3P4P3P4报文报文报文A B C D A B C DA B C Dt连接建立数据传送报文P2P1连接释放Connecting to the Network The ProblemlCann

3、ot afford individual network connection per pair of computerslReasonslInstalling wires consumes time and moneylMaintaining wires consumes money(esp.long-distance connections)SolutionlNetwork has lShared central corelMany attached stationsThe Concept of PacketslMost computers do not transfer data as

4、an arbitrary string of continuous bits.l Instead the network system divides data into small bocks called packets send individuallylAlso referred called packet networks or packet switching networksThe Problem With SharinglDemand highlSome applications have large transferslSome applications cannot wai

5、tlNeed mechanism for fairnessPacket Switching PrinciplelSolution for fairnesslDivide data into small units called packetslAllow each station opportunity to send a packet before any station sends anotherlForm of time-division multiplexingIllustration of Packet SwitchinglAcquire shared mediumlSend one

6、 packetIllustration of Packet SwitchinglDividing data into small packets allows time-division multiplexing lEach packet leaves the source and is switched onto the shared communication channel through a multiplexor lAt the destination,the packet is switched through a demultiplexor to the destination

7、Packet DetailslDepend on underlying networklMinimum/maximum sizelFormatlHardware packet called a framelEach hardware technology uses different packet format lFrame or hardware frame denotes a packet of a specific format on a specific hardware technologyExample Frame Format Used with RS-232lRS-232 is

8、 character-orientedlNeed to define a standard format for data to indicate the beginning and end of the framelSpecial characterslStart of header(soh)lEnd of text(eot)Defining the Framing StandardlCan choose two unused data values for framing le.g.,if data is limited to printable ASCII,can use l start

9、 of header(soh)l end of text(eot)lSending computer sends soh first,then data,finally eot lReceiving computer interprets and discards soh,stores data in buffer and interprets and discards eot Framing in PracticelIncurs extra overhead-soh and eot take time to transmit,but carry no data lAccommodates t

10、ransmission problems:lMissing eot indicates sending computer crashed lMissing soh indicates receiving computer missed beginning of message lBad frame is discarded Transmitting Arbitrary DatalSuppose system cant afford to reserve two special characters for framing le.g.,transmitting arbitrary 8-bit b

11、inary data soh and eot as part of data will be misinterpreted as framing data lSender and receiver must agree to encode special characters for unambiguous(明确的明确的)transmissionData Stuffing:When Data Contains Special CharacterslTranslate to alternative formlCalled byte stuffinglBit stuffing and byte s

12、tuffing are two techniques for inserting extra data to encode reserved bytes lByte stuffing translates each reserved byte into two unreserved byteslExample,can use esc as prefixIllustration of Frame With Byte StuffinglSender translates each reserved byte into the appropriate encoding pair of bytes l

13、Receiver interprets pairs of bytes and stores encoded byte in buffer lData still framed by soh and eotlStuffed frame longer than originalHandling ErrorslExternal electromagnetic signals can cause incorrect delivery of data lData can be received incorrectly lData can be lost lUnwanted data can be gen

14、erated lAny of these problems are called transmission errors lFrame includes additional information to detect/correct errorlSet by senderlChecked by receiverlStatistical guarantee Error Detection and CorrectionlError detectionlError detection uses the concept of redundancy,which means adding extra b

15、its for detecting errors at the destination.lsend additional information so incorrect data can be detected and rejected lError correctionlsend additional information so incorrect data can be corrected and accepted Detection methodsError Detection And Recovery TechniqueslParity refers to the number o

16、f bits set to 1 in the data item lEven parity-an even number 1ldata:1001001,parity bit 1lOdd parity-an odd number of 1ldata:1001111,parity bit 0lA parity bit is an extra bit transmitted with a data item,chose to give the resulting bits even or odd parityParity and Error DetectionlIf noise or other i

17、nterference introduces an error,one of the bits in the data will be changed from a 1 to a 0 or from a 0 to a 1 lParity of resulting bits will be wrong lOriginal data and parity:1001001+1(even parity)lIncorrect data:1011001+1(odd parity)lTransmitter and receiver agree on which parity to use lReceiver

18、 detects error in data with incorrect parity Limitations to Parity CheckinglParity can only detect errors that change an odd number of bits lOriginal data and parity:1001001+1(even parity)lIncorrect data:1011011+1(even parity!)lParity usually used to catch one-bit errors Example11101110 11011110 111

19、00100 11011000 11001001Now suppose the word world in Example 1 is corrupted during transmission.11111110 11011110 11101100 11011000 11001001The receiver counts the 1s in each character and comes up with even and odd numbers(7,6,5,4,4).The receiver knows that the data are corrupted,discards them,and

20、asks for retransmission.Alternative Error Detection SchemeslMany alternative schemes exist lDetect multi-bit errors lCorrect errors through redundant information lChecksum and CRC are two widely used techniques ChecksumlChecksumlTreat data as sequence of integerslCompute and send arithmetic sumlHand

21、les multiple bit errorslCannot handle all errorslExample:16-bit checksumlChecksum computed over datalChecksum appended to frameIllustration Of ErrorsA Checksum Fails to DetectlSecond bit reversed in each itemlChecksum is the sameSummarylPacket technologylInvented to provide fair access in shared net

22、worklSender divides data into small packetslHardware packets called frameslCan use packet-switching with RS-232lSpecial characters delimit beginning and end of framelByte-stuffing needed when special characters appear in dataSummary(continued)lTo detect data corruptionlSender adds information to packetlReceiver checkslTechniqueslParity bitlChecksumlCyclic Redundancy Check(CRC)lProvide statistical guarantees

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 生活常识

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁