數(shù)據(jù)通信基礎(chǔ):第11章 數(shù)據(jù)鏈路控制與協(xié)議_第1頁
數(shù)據(jù)通信基礎(chǔ):第11章 數(shù)據(jù)鏈路控制與協(xié)議_第2頁
數(shù)據(jù)通信基礎(chǔ):第11章 數(shù)據(jù)鏈路控制與協(xié)議_第3頁
數(shù)據(jù)通信基礎(chǔ):第11章 數(shù)據(jù)鏈路控制與協(xié)議_第4頁
數(shù)據(jù)通信基礎(chǔ):第11章 數(shù)據(jù)鏈路控制與協(xié)議_第5頁
已閱讀5頁,還剩72頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、數(shù)據(jù)通信基礎(chǔ)第11章 (數(shù)據(jù)鏈路控制與協(xié)議) Data Link Control and Protocols20111111BITLiuJKPage 2 第11章內(nèi)容提要11.1 Line Discipline 線路規(guī)章11.2 Flow Control 流量控制11.3 Error Control 差錯(cuò)控制11.4 HDLC Protocol HDLC協(xié)議20111111BITLiuJKPage 3 Chapter BriefIn this chapter we will discuss three main functions of data link layer, namely line

2、 discipline, flow control, and error control.You need to understand the principle of ARQ and Sliding Window flow and error control.The most important data link protocol is HDLC bit-oriented protocol. It is the basis for many other protocols.20111111BITLiuJKPage 4 Data Link LayerPosition of Data Link

3、 Layer20111111BITLiuJKPage 5 Functions of Data Link Layer現(xiàn)在該誰發(fā)送?可發(fā)多少數(shù)據(jù)?怎樣糾正錯(cuò)誤?20111111BITLiuJKPage 6 11.1 Line DisciplineENQ/ACK詢問/應(yīng)答Poll/Select輪詢/選擇20111111BITLiuJKPage 7 What is Line DisciplineLine Discipline (線路規(guī)章)answers the question, Who should send now?That will decide which device will send d

4、ata at a certain time.There are two methods: ENQ/ACK, Poll/Select20111111BITLiuJKPage 8 ENQ/ACK查詢/應(yīng)答Enquiry/acknowledgment is used for peer-to-peer 對等communication, that means only two devices are involved.The initiator發(fā)起方 start with ENQ, and the other party respond with either ACK or NAK.20111111BI

5、TLiuJKPage 9 ENQ/ACK20111111BITLiuJKPage 10 Multipoint DisciplineFigure 10-620111111BITLiuJKPage 11 Poll/Selection輪詢/選擇Poll/Selection is used for Multi-point system, where there is one primary station 主站and several secondary stations從站.Addressing編址 is needed to identify each station. As only one pri

6、mary station, the address is referred to secondary station.Selection is used when primary has data to send, while Poll is used when secondary has data to send. 20111111BITLiuJKPage 12 Selection20111111BITLiuJKPage 13 Poll20111111BITLiuJKPage 14 Stop-and-Wait Flow Control停-等式流量控制Sliding Window Flow C

7、ontrol滑動(dòng)窗式流量控制11.2 Flow Control20111111BITLiuJKPage 15 Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment應(yīng)答.Note:20111111BITLiuJKPage 16 Types of Flow Control一次只發(fā)一幀一次可發(fā)多幀20111111BITLiuJKPage 17 Stop-and-Wait201111

8、11BITLiuJKPage 18 Sliding WindowIn sliding window scheme, there are upper and lower wall上下限 for the window. When packets are sent or received, the wall will be moved along the data stream, as if the window is sliding over the data.If the frames are numbered modulo-m, the window size will be m -1. Ot

9、herwise, there will be ambiguity混淆 for acknowledgment.20111111BITLiuJKPage 19 Sender Sliding Window20111111BITLiuJKPage 20 Receiver Sliding Window20111111BITLiuJKPage 21 Sliding Window Example20111111BITLiuJKPage 22 Sender20111111BITLiuJKPage 23 Receiver20111111BITLiuJKPage 24 Automatic Repeat Reque

10、st(ARQ)自動(dòng)重傳請求Stop-and-Wait ARQ停-等式ARQSliding Window ARQ滑動(dòng)窗式ARQ11.3 Error Control20111111BITLiuJKPage 25 Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Note:20111111BITLiuJKPage 26 Types of Error Control返回N幀式選擇拒收式20111111BITLiuJKPage 27

11、 Kinds of Error FramesThere are three kinds of error frames:Damaged frame 損壞幀The frame has arrived at the receiver, but is found to be damaged and contain error.Lost frame 丟失幀The frame has been lost during transmission.Lost Acknowledgment 丟失應(yīng)答The frame has correctly arrived at receiver, but the retu

12、rn ACK is lost.20111111BITLiuJKPage 28 11.3.1 Stop-and-Wait ARQFour features are added:The sender keeps a copy of the last sent frame until it receive an ACK.Both data and ACK frames are numbered alternately 0 and 1.If an error occurs, NAK is returned and the sending device resends the frame.The sen

13、ding device is equipped with a timer. If the time period expires, it sends again.20111111BITLiuJKPage 29 Damaged Frame20111111BITLiuJKPage 30 Lost Frame20111111BITLiuJKPage 31 Lost ACK20111111BITLiuJKPage 32 11.1 Normal operation20111111BITLiuJKPage 33 11.2 Stop-and-Wait ARQ, lost frame20111111BITLi

14、uJKPage 34 11.3 Stop-and-Wait ARQ, lost ACK frame20111111BITLiuJKPage 35 In Stop-and-Wait ARQ, numbering frames 幀編號 prevents the retaining of duplicate frames 重復(fù)幀.Note:20111111BITLiuJKPage 36 11.4 Stop-and-Wait ARQ, delayed ACK20111111BITLiuJKPage 37 Numbered acknowledgments are needed if an acknowl

15、edgment is delayed and the next frame is lost. Note:20111111BITLiuJKPage 38 11.5 Piggybacking20111111BITLiuJKPage 39 In go-back-N ARQ, if one frame is lost or damaged, all frames sent since last frame acknowledged are retransmitted. 11.3.2 Go-Back-N ARQ20111111BITLiuJKPage 40 Damaged Frame20111111BI

16、TLiuJKPage 41 Lost Frame20111111BITLiuJKPage 42 Lost ACK20111111BITLiuJKPage 43 11.3.3 Selective Reject20111111BITLiuJKPage 44 A data link protocol is a set of specifications used to implement the data link layer.Note:Data Link Protocol20111111BITLiuJKPage 45 Configurations and Transfer ModesFramesF

17、rame FormatExamplesData Transparency11.4 HDLC Protocols配置與傳輸模式幀幀結(jié)構(gòu)舉例數(shù)據(jù)傳輸?shù)耐该餍?0111111BITLiuJKPage 46 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998Bit-OrientedThere are many types of bit-oriented protocols. The first of them is synchronous data link control (SDLC), which was proposed by IBM in

18、 1975.In 1979, ISO established HDLC, which was based on SDLC.ITU-T has developed a series of protocols called LAP.20111111BITLiuJKPage 47 HDLC ProtocolAll bit-oriented protocols are related to High-level Data Link Control (HDLC) 高級數(shù)據(jù)鏈路控制規(guī)程protocol. HDLC supports both half-duplex and full-duplex mode

19、s in point-to-point and multipoint configurations.We will discuss HDLC station types, configuration, HDLC modes, frame types, frame format, and examples of HDLC.20111111BITLiuJKPage 48 HDLC stationsThere are three types of HDLC stations:Primary 主站It has complete control of the link. The primary send

20、s commands 命令.Secondary 從站It is controlled by primary. The secondary sends responses 響應(yīng).Combined 組合站It behaves either as a primary or a secondary.20111111BITLiuJKPage 49 HDLC ConfigurationThere are three ways for the HDLC configurationUnbalanced 非平衡模式There is one primary and one or more secondary. I

21、t could be point-to-point or multipoint.Symmetric 對稱模式Two logical stations within one physical station.Balanced 平衡模式This is a point-to-point topology between TWO combined stations20111111BITLiuJKPage 50 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Configuration(1)The primary sends comma

22、nds to secondary stations. 20111111BITLiuJKPage 51 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Configuration(2)20111111BITLiuJKPage 52 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Configuration(3)Both stations can send command or response to the other station.20111111BITLi

23、uJKPage 53 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC ModesThere are three HDLC modes:Normal Response Mode (NRM) 正常響應(yīng)模式Asynchronous Response Mode (ARM) 異步響應(yīng)模式 Asynchronous Balanced Mode (ABM) 異步平衡模式20111111BITLiuJKPage 54 NRM mode20111111BITLiuJKPage 55 ABM mode20111111BITLiuJKPage 56

24、 HDLC Frame FormatThere are six fields in a HDLC frame: Flag 旗標(biāo), Address 地址, Control 控制, Information 信息, FCS 幀校驗(yàn)序列, and Flag. The Information field appears only in I- and U- frames. 20111111BITLiuJKPage 57 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Flag Field20111111BITLiuJKPage 58 WC

25、B/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Address Field20111111BITLiuJKPage 59 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Control Field信息幀監(jiān)控幀無編號幀20111111BITLiuJKPage 60 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC Information Field20111111BITLiuJKPage 61 WCB

26、/McGraw-Hill The McGraw-Hill Companies, Inc., 1998HDLC FCS Field20111111BITLiuJKPage 62 HDLC Frame TypesHDLC frame type is determined by the first two bits in control field.20111111BITLiuJKPage 63 I-Frame Control Field20111111BITLiuJKPage 64 S-Frame Control Field20111111BITLiuJKPage 65 U-Frame Contr

27、ol Field20111111BITLiuJKPage 66 Table 11.1 U-frame control command and responseCommand/responseMeaningSNRMSet normal response modeSNRMESet normal response mode (extended)SABMSet asynchronous balanced modeSABMESet asynchronous balanced mode (extended)UPUnnumbered pollUIUnnumbered informationUAUnnumbe

28、red acknowledgmentRDRequest disconnectDISCDisconnectDMDisconnect modeRIMRequest information modeSIMSet initialization modeRSETResetXIDExchange IDFRMRFrame reject20111111BITLiuJKPage 67 ExampleFigure in next slide shows an exchange using piggybacking where is no error. Station A begins the exchange o

29、f information with an I-frame numbered 0 followed by another I-frame numbered 1. Station B piggybacks its acknowledgment of both frames onto an I-frame of its own. Station Bs first I-frame is also numbered 0 N(S) field and contains a 2 in its N(R) field, acknowledging the receipt of As frames 1 and

30、0 and indicating that it expects frame 2 to arrive next. Station B transmits its second and third I-frames (numbered 1 and 2) before accepting further frames from station A. Its N(R) information, therefore, has not changed: B frames 1 and 2 indicate that station B is still expecting A frame 2 to arrive next.Example 11.120111111BITLiuJKPage 68 I0,0I1,0I0,2I1,2I2,2RR320111111BITLiuJKPage 69 ExampleIn Example 11.1, suppose frame 1 sent from station B to station A has an error. Station A informs station B to resend fr

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論