數(shù)據(jù)通信與網(wǎng)絡(luò)10-數(shù)據(jù)鏈路控制-3_第1頁
數(shù)據(jù)通信與網(wǎng)絡(luò)10-數(shù)據(jù)鏈路控制-3_第2頁
數(shù)據(jù)通信與網(wǎng)絡(luò)10-數(shù)據(jù)鏈路控制-3_第3頁
數(shù)據(jù)通信與網(wǎng)絡(luò)10-數(shù)據(jù)鏈路控制-3_第4頁
數(shù)據(jù)通信與網(wǎng)絡(luò)10-數(shù)據(jù)鏈路控制-3_第5頁
已閱讀5頁,還剩64頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、第十章 數(shù)據(jù)鏈路控制Chapter 10 DATA LINK CONTROL10.1 Line discipline10.2 Flow control10.3 Error control10.4 SummaryContentspIn the physical layer, we have transmission but we do not have communication. No way of controlling which of several devices attached to that line will receive it; No way of knowing if t

2、he intended receiver is ready and able to receive it; No way of keeping a second device on the line from transmitting at the same time and thereby destroying our signal.IntroductionpCommunication requires at least two devices working together, which requires a great deal of coordination for an intel

3、ligible exchange.pData link control deals with the design and procedures for communication between two adjacent nodes: node-to-node communication.IntroductionpThe most important functions in the data link layer are line discipline, flow control and error control. Collectively, these functions are kn

4、own as data link control.IntroductionpLine discipline: Who should send now?pFlow control: How much data can be sent in some time interval?pError control: error correction by coordinates retransmission. Introduction10.1 Line disciplinePeer-to-peer communicationPrimary-secondarypThe line discipline fu

5、nctions of the data link layer oversee the establishment of links, and the right of a particular device to transmit at a given time.pLine discipline can be done in two ways:10.1.1 ENQ/ACK(詢問詢問/ /確認(rèn)確認(rèn))pEnquiry/acknowledgment is used primarily in systems where there is a dedicated link between two dev

6、ices so that the only device capable of receiving the transmission is the intended one.pENQ/ACK coordinates which device may start a transmission and whether or not the intended recipient is ready and enable.pSession can be initiated by either station on a link as long as both are of equal rank. Pee

7、r-to-Peer10.1.1 ENQ/ACKp發(fā)起方發(fā)起方發(fā)送一個(gè)(ENQ)幀(接收方是否可以接收數(shù)據(jù)?)。p接收方接收方如果已經(jīng)就緒,則回答一個(gè)(ACK)幀;如果沒有,必須回答一個(gè)否認(rèn)(NAK)幀。即使是否定的也要求一個(gè)響應(yīng),使發(fā)起方知道接收方不能接收但已經(jīng)收到了詢問但已經(jīng)收到了詢問。 a.如果響應(yīng)是肯定的,發(fā)起方開始發(fā)送數(shù)據(jù)。 b.如果對(duì)ENQ幀的響應(yīng)是否定的,并且三次三次嘗試都失敗了, 發(fā)起方斷開連接并在另一個(gè)時(shí)刻重新開始整個(gè)過程。p若在一定的時(shí)間內(nèi)既沒有收到(ACK)幀也沒有收到(NAK)幀,發(fā)起方發(fā)起方就假定詢問幀(ENQ)丟失,于是重新發(fā)送一個(gè)(ENQ)副本。發(fā)起方在放棄之前為建

8、立鏈路進(jìn)行三次嘗試。p當(dāng)數(shù)據(jù)傳送完畢,發(fā)送方發(fā)送方以傳輸結(jié)束(EOT)幀結(jié)束傳輸。10.1.1 ENQ/ACK10.1.1 ENQ/ACKpHow it works10.1.1 ENQ/ACKpHow it works - NAK10.1.1 ENQ/ACKpHow it works time outreviewp詢問/確認(rèn)(ENQ/ACK)方式主要用在不會(huì)有非預(yù)期非預(yù)期的接收方接收的傳輸系統(tǒng)中,即,兩個(gè)設(shè)備之間存在一條專用鏈路,因此惟一能夠接收傳輸?shù)脑O(shè)備也就是發(fā)送方所預(yù)期的接收設(shè)備。pENQ/ACK負(fù)責(zé)協(xié)調(diào)哪個(gè)設(shè)備可以開始傳輸,以及確定預(yù)期的接收方是否已經(jīng)就緒并可以進(jìn)行接收。10.1.1 E

9、NQ/ACKpThe Poll/Select method works with topologies where one device is designated as primary and the other devices are secondary.pThe question to be determined in this case:pWhich nodes has the right to use the channel?pReady now?10.1.2 Poll/Select (輪詢/選擇)10.1.2 Poll/Select (輪詢/選擇)pWhenever multipo

10、int link consists of a primary device and multiple secondary devices using a single line, all exchanges must be made through the primary device even the ultimate destination is a secondary device.pThe primary device controls the link; the secondary devices follow its instructions.pThe primary determ

11、ine which device is allowed to use the channel at a given time. The primary is always the initiator of a session.pPolling: the primary wants to receive data, it asks the secondary if they have anything to send.pSelecting: the primary wants to send data, it tells the target secondary to get ready to

12、receive.10.1.2 Poll/Select (輪詢/選擇)pFor the primary device in a multipoint system to be able to identify and communicate with a specific secondary device, there must be a naming convention. Every device on a link has a name or address that can be used for identification.pPoll/Select protocols identif

13、y each frame as being either to or from a specific device on the link. Each secondary device has an address that differentiates it from the others. AddressespIn any transmission, the address will appear in a specified portion of each frame, called an address field or header depending on the

14、protocol. If the transmission comes from the primary device, the address indicates the recipient of the data; - 發(fā)往那個(gè)從設(shè)備從設(shè)備 If the transmission comes from a secondary device, the address indicates the originator of the data. - 來自那個(gè)從設(shè)備從設(shè)備 Addresses SelectpThe select mode is used whenev

15、er the primary device has something to send.pNote: :主設(shè)備控制鏈路。如果主設(shè)備既不發(fā)送也不接收,那么它知道可以使用鏈路(即,當(dāng)前鏈路處于空閑狀態(tài))。如果它有數(shù)據(jù)要發(fā)送,它可以將數(shù)據(jù)發(fā)送出去。但是它但是它所不知道的是目標(biāo)設(shè)備所不知道的是目標(biāo)設(shè)備( (某個(gè)從設(shè)備某個(gè)從設(shè)備) )是否準(zhǔn)備好接收。是否準(zhǔn)備好接收。 Selectp發(fā)送數(shù)據(jù)前,主設(shè)備發(fā)送一個(gè)選擇(SEL)幀,在地址字段中填入預(yù)期的從設(shè)備的地址,然后等待從設(shè)備準(zhǔn)備就緒的確認(rèn)信號(hào)。(提示從設(shè)備有數(shù)據(jù)傳輸?shù)絹怼?p多點(diǎn)拓?fù)涞亩鄠€(gè)設(shè)備使用同一條鏈路,即鏈路上的每一幀都可以被每一個(gè)

16、設(shè)備接收。當(dāng)該幀沿著鏈路傳輸時(shí),每個(gè)從設(shè)備都校驗(yàn)其中的地址字段。只有當(dāng)某個(gè)設(shè)備發(fā)現(xiàn)該地址是自身時(shí)才打開該幀并讀取數(shù)據(jù)。(在SEL幀的情況下,幀中的數(shù)據(jù)包含將有數(shù)據(jù)到來的提示。)p如果從設(shè)備當(dāng)前是激活的并且正在運(yùn)行,它就向主設(shè)備返回一個(gè)確認(rèn)(ACK)幀。然后主設(shè)備就發(fā)送一個(gè)或多個(gè)數(shù)據(jù)幀,每幀的地址都是預(yù)期的從設(shè)備。 SelectpMultipoint select of Poll/Select:pThe polling function is used by the primary device to request transmissions form the secondar

17、y devices.pNote:沒有接到主設(shè)備的請求前,不允許從設(shè)備主動(dòng)發(fā)送數(shù)據(jù)。 所有控制都集中在主設(shè)備,多點(diǎn)系統(tǒng)保證一次只能存在一個(gè)傳輸,因此保證不出現(xiàn)信號(hào)沖突。 Poll(輪詢)p當(dāng)主設(shè)備準(zhǔn)備好接收數(shù)據(jù)時(shí),依次詢問(輪詢)每個(gè)設(shè)備是否有數(shù)據(jù)要發(fā)送。p當(dāng)?shù)谝粋€(gè)從設(shè)備接到詢問時(shí),如果有數(shù)據(jù)要發(fā)送,則發(fā)送數(shù)據(jù)幀(無需響應(yīng)ACK)。如果沒有數(shù)據(jù)要發(fā)送,就回答一個(gè)否認(rèn)幀,主設(shè)備則輪詢下一個(gè)從設(shè)備,直到發(fā)現(xiàn)有數(shù)據(jù)要發(fā)送的從設(shè)備為止。p當(dāng)響應(yīng)是肯定的(數(shù)據(jù)幀) ,主設(shè)備讀入該幀并返回一個(gè)確認(rèn)(ACK)幀來確認(rèn)已經(jīng)接收。(從設(shè)備可以依次發(fā)送若干個(gè)數(shù)據(jù)幀,或者在發(fā)送每一幀之前都必須等待AC

18、K幀的到來。)p有兩種兩種終止信息交換的方法:或者從設(shè)備將所有的數(shù)據(jù)幀發(fā)送完畢并以一個(gè)傳輸結(jié)束(EOT)幀結(jié)束傳輸,或者是主設(shè)備發(fā)出“時(shí)間到”的報(bào)文。p從設(shè)備完成傳輸后,主設(shè)備就可以對(duì)其他從設(shè)備進(jìn)行輪詢. Poll Pollp線路規(guī)程的輪詢輪詢/ /選擇選擇方法是在一個(gè)設(shè)備被指定為主站而其他設(shè)備為從站的拓?fù)浣Y(jié)構(gòu)中采用的。p多點(diǎn)系統(tǒng)必須在多個(gè)節(jié)點(diǎn)而不只是兩個(gè)節(jié)點(diǎn)之間進(jìn)行協(xié)調(diào)。p在這種情形下,問題不僅僅是確定設(shè)備是否就緒,還要確定哪一個(gè)節(jié)點(diǎn)有權(quán)使用信道。p對(duì)于多點(diǎn)拓?fù)渲械闹髟O(shè)備來說,為了能識(shí)別并且與一個(gè)具體的從設(shè)備通信,就必須有一個(gè)尋址約定。 Rev

19、iew of Pool/Select10.2 Flow ControlpFlow control is a set of procedures that tells the sender how much data it can transmit before it must wait for an acknowledgment from the receiver.pTwo issues are at stake:pThe flow of data must not be allowed to overwhelm the receiver.pAs frames come in, they ar

20、e acknowledged, either frame by frame or several frames at a time. If a frame is damaged, the receiver sends an error message (NAK frame).Categories of flow control10.2 Flow ControlStop-and-wait (停等)Sliding window (滑動(dòng)窗口)pIn the Stop-and-Wait Protocol, the sender sends one frame, stops until it recei

21、ves confirmation from the receiver, then sends the next frame.pAdvantage simplicitypDisadvantage inefficiency 線路上總是只有一幀,每一幀都使用了跨越整個(gè)線路所需要的時(shí)間來發(fā)送和接收。如果設(shè)備之間的距離很長,在每幀之間等待ACK幀所花費(fèi)的時(shí)間將大大增加總的傳輸時(shí)間。10.2.1 Stop-and-wait10.2.1 Stop-and-waitpThe sender sends one frame, stops and wait the response from the receive

22、r.pSender algorithm for Stop-and-Wait Protocol10.2.1 Stop-and-waitpReceiver algorithm for Stop-and-Wait Protocol10.2.1 Stop-and-wait10.2.2 Sliding WindowpIn the sliding window method, the sender can transmit several frames before needing an acknowledgment.pThe link can carry several frames at once a

23、nd its capacity can be used efficiently.pThe receiver acknowledges only some of the frames, using a single ACK to confirm the receipt of multiple data frames.10.2.2 Sliding WindowpSliding window refers to an extra buffer, created by both sender and receiver.pThe window provides the upper limit on th

24、e number of frames that can be transmitted before requiring an ACK.pThe frame are numbered modulo-n.pThe size of the window is n-1.pACK include the number of the next frame it expects to receive. 接收方為對(duì)以幀4結(jié)尾的一串?dāng)?shù)據(jù)幀進(jìn)行確認(rèn),發(fā)送一個(gè)包含有編號(hào)5的確認(rèn)幀; 發(fā)送方收到含有編號(hào)5的確認(rèn)幀時(shí),即知道到編號(hào)4為止的所有數(shù)據(jù)幀均已經(jīng)被接收,接收方等待編號(hào)5的數(shù)據(jù)幀。10.2.2 Sliding W

25、indowpThe relationship of a window to the main bufferp為記錄哪些幀已經(jīng)被傳輸以及接收了哪些幀,滑動(dòng)窗口引入了一個(gè)基于窗口大小的標(biāo)識(shí)機(jī)制標(biāo)識(shí)機(jī)制。幀以模n的方式標(biāo)號(hào),也就是說從O到n-1編號(hào)。例如,如果n = 8,則幀標(biāo)號(hào)就為0至7。p窗口的大小是n-1。即窗口不能覆蓋所有編號(hào),能覆蓋的數(shù)量為所有編號(hào)的幀數(shù)減l 。p在兩端的窗口都可以存儲(chǔ)n-1幀,因此在必須接收一個(gè)ACK幀之前最多可以發(fā)送n-1幀。 Sender WindowpAt the beginning, the sender window contains n-1 f

26、rames. As frames are send out, the left boundary of moves inward, shrinking the window size. pOnce an ACK arrives, the window expands to allow in a number of new frames equal to the number of frames acknowledged by that ACK. Receiver WindowpAt the beginning, the receiver window contains n-1

27、space for frames. As new frames come in, the size of receiver window shrinks. pOnce an ACK is send, the window expands to include places for a number of frames equal to the number of frames acknowledged by ACK.p對(duì)于一個(gè)大小為7的接收方窗口,窗口中含有容納7幀的空間,意味著在發(fā)送ACK幀之前可以接收7個(gè)數(shù)據(jù)幀。隨著第1幀的到來,接收窗口開始收縮,邊界從空間0變?yōu)榭臻g1。窗口縮小了一幀,因

28、此接收方在要求發(fā)送確認(rèn)幀之前還可以接收6幀。如果0號(hào)幀到3號(hào)幀已經(jīng)到達(dá)但未進(jìn)行確認(rèn),窗口就只包含三幀的空間。p在一個(gè)7幀窗口中,如果上一次的確認(rèn)是對(duì)2號(hào)幀而當(dāng)前的確認(rèn)是對(duì)5號(hào)幀,那么窗口就擴(kuò)展三個(gè)空間(5-2)。如果上一次的確認(rèn)是對(duì)3號(hào)幀而當(dāng)前的確認(rèn)是對(duì)1號(hào)幀,那么窗口擴(kuò)展數(shù)是6(1+8-3)。 Receiver WindowpAt the beginning of transmission the senders window contains n-1 frames; the receiver window contains n-1 spaces for frames.pTh

29、e sliding window of the sender shrinks form the left when frames of data are send. The sliding window of the sender expands to the right when acknowledgements are received.pThe sliding window of the receiver shrinks from the left when frames of data are received. The sliding window of the receiver e

30、xpands to the right when acknowledgments are send.10.2.3 Review ExampleWhy the window size should be n-1 ?pIn the sliding window method, the size of the window is one less than the modulo range so that there is no ambiguity in the acknowledgment of the received frames.p如果幀的序列號(hào)是模8(07),并且窗口大小也

31、為8?,F(xiàn)在假定發(fā)送了0號(hào)幀,然后收到編號(hào)l的確認(rèn)幀(ACK1)。發(fā)送方擴(kuò)展窗口并發(fā)送幀1,2,3,4,5,6,71,2,3,4,5,6,7以及0 0。如果此時(shí)又收到了ACK1,它就不知道到底這是前一次ACK1的重復(fù)(網(wǎng)絡(luò)重復(fù))還是確認(rèn)最近發(fā)送的八幀的新的ACK1。但如果窗口大小是7(而不是8),這種情況就不會(huì)發(fā)生。 more about the window sizepIn the data link layer, the term error control refers primarily to methods of error detection and retransm

32、ission.pThree method: Automatic repeat request (ARQ,自動(dòng)重復(fù)請求) Stop-and-wait ARQ (停等自動(dòng)重復(fù)請求) Sliding window ARQ (滑動(dòng)窗口自動(dòng)重復(fù)請求)10.3 Error ControlpAnytime an error is detected in an exchange, a negative acknowledgment (NAK) is returned and the specified frames are retransmitted. This process is called autom

33、atic repeat request (ARQ).pError control in the data link layer is based on ARQ, which means retransmission of data in three cases: damaged frame, lost frame, lost acknowledgment.pARQ error control is implemented in the data link layer as an adjunct to flow control.10.3.1 Automatic Repeat Request (A

34、RQ)pIn fact, stop-and-wait flow control is usually implemented as stop-and-wait ARQ and sliding window is usually implemented as one of two variants of sliding window ARQ, called go-back-n or selective-reject.10.3.1 Automatic Repeat Request (ARQ)10.3.2 Stop-and-Wait ARQpStop-and-wait ARQ is a form o

35、f Stop-and-wait flow control extended to include retransmission of data in case of lost or damaged frames. Stop-and-waitretransmission Stop-and-Wait ARQFlow controlError control10.3.2 Stop-and-Wait ARQFor retransmission, we need four features: pThe sending device keeps a copy of the last frame trans

36、mitted until it receives an acknowledgment for that frame.pFor identification, both data frames and ACK frames are numbered alternately 0 and 1.pIf an error is discovered in a frame, indicating that it has been corrupted, a NAK frame is returned.pThe sending device is equipped with a timer.

37、Stop-and-Wait ARQ, damaged framepWhen a frame is discovered by the receiver to contain an error, it returns a NAK frame and the sender retransmits the last frame. Stop-and-Wait ARQ, lost data framep發(fā)送方有一個(gè)定時(shí)器,每傳輸一個(gè)數(shù)據(jù)幀后就啟動(dòng)。如果該幀沒有到達(dá)接收端,接收方就不可能對(duì)其進(jìn)行確認(rèn)( (無論肯定還是否定的都不會(huì)有無論肯定還是否定的都不會(huì)有) )。發(fā)送設(shè)備等待ACK或NAK

38、幀直到定時(shí)器超時(shí),再次發(fā)送該數(shù)據(jù)幀,并重新啟動(dòng)定時(shí)器,然后等待確認(rèn)。 Stop-and-Wait ARQ, lost ACK framep此情況下,數(shù)據(jù)幀已到達(dá)接收方,且接收方已經(jīng)知道該數(shù)據(jù)幀是否可以接受,但確認(rèn)幀確認(rèn)幀或否定幀否定幀在返回的傳輸中丟失。p發(fā)送方等到定時(shí)器超時(shí),然后重新發(fā)送數(shù)據(jù)幀。p接收方接收方檢查到達(dá)的新數(shù)據(jù)幀編號(hào)。若丟失的是NAK幀,接收方將接受新的數(shù)據(jù)幀拷貝并返回一個(gè)相應(yīng)的ACK幀(假設(shè)新數(shù)據(jù)拷貝無差錯(cuò)地到達(dá))。若丟失的是ACK幀,接收方將新數(shù)據(jù)幀拷貝視為重復(fù)幀,對(duì)它進(jìn)行確認(rèn)并丟棄,等待下一幀。10.3.3 Sliding Window ARQpAmong

39、 the several popular mechanisms for continuous transmission error control, two protocols are the most popular: go-back-n ARQ (回退n幀自動(dòng)重復(fù)請求) selective-reject ARQ (選擇拒絕自動(dòng)重復(fù)請求)pBoth of them based on sliding window flow control.10.3.3 Sliding Window ARQFor retransmission, three features are added:pThe sen

40、ding device keeps copies of all transmitted frames until they have been acknowledged.pIn addition to ACK frames, the receiver has the option of returning a NAK frame if the data have been received damaged.pThe sending device in sliding window ARQ is equipped with a timer to enable it to handle lost

41、acknowledgments.pIn sliding window go-back-n ARQ method, if one frame is lost or damaged, all frames sent since the last frame acknowledged are retransmitted.pWe need handle with three types of errors: Damaged frame; Lost data frame; Lost acknowledgement. Go-back-n ARQ.1 Go-back-n AR

42、Q, damaged framepNAK幀有兩個(gè)含義: 1)在被損壞的幀之前之前的所有幀都正確接收了; 2)所標(biāo)明的幀損壞。p一旦接收方接收方發(fā)現(xiàn)差錯(cuò),它就停止接收后續(xù)的幀,直到被損壞的幀被正確替換。.1 Go-back-n ARQ, damaged frame無論正確錯(cuò)誤都丟棄!.2 Go-back-n ARQ, lost data frame丟失數(shù)據(jù)幀的處理:丟失數(shù)據(jù)幀的處理:p滑動(dòng)窗口協(xié)議要求數(shù)據(jù)幀按順序按順序發(fā)送。如果一個(gè)或多個(gè)幀在傳輸中發(fā)生丟失現(xiàn)象,到達(dá)接收方的下一幀就會(huì)亂序。p接收方檢查每一幀的識(shí)別號(hào),發(fā)現(xiàn)有一個(gè)或多個(gè)編號(hào)被跳過了,于是就對(duì)最早丟失的

43、幀返回一個(gè)NAK幀,說明需要重新發(fā)送。p于是發(fā)送設(shè)備就重新傳輸由NAK幀指明的幀,以及該丟以及該丟失幀后已經(jīng)發(fā)送的所有幀失幀后已經(jīng)發(fā)送的所有幀。.2 Go-back-n ARQ, lost data frame全部丟棄!p發(fā)送方采用定時(shí)器定時(shí)器,在等待確認(rèn)之前發(fā)送設(shè)備可以按照窗口所允許的數(shù)目盡量發(fā)送幀。一旦到達(dá)發(fā)送極限或者發(fā)送方?jīng)]有幀要發(fā)送了,它就必須等待。p如果接收方接收方發(fā)送的確認(rèn)幀(或者,更特別地,是NAK幀)丟失了,發(fā)送方將可能永遠(yuǎn)等下去。p為防止鎖住兩個(gè)設(shè)備,發(fā)送方配有定時(shí)器,每當(dāng)窗口容量達(dá)到時(shí),定時(shí)器就開始計(jì)時(shí)。如果在時(shí)限內(nèi)沒有收到確認(rèn),發(fā)送方將最近一次最近一次AC

44、KACK幀之后幀之后的所有幀重新發(fā)送一次。.3 Go-back-n ARQ, lost ACK.3 Go-back-n ARQ, lost ACK Selective-Reject ARQpIn selective-reject ARQ, only the specific damaged or lost frame is retransmitted.pIf a frame is corrupted in transit, a NAK is returned and the frame is resent out of sequence. (亂序

45、重傳!)pThe receiving device must be able to sort the frames it has and insert the corrected frame into its proper place in the sequence. - 接收方需要具備排序功能。排序功能。 Selective-Reject ARQSelective-reject ARQ differs form go-back-n ARQpReceiver must have sorting logic to reorder frames received out of se

46、quence. pReceiver must be able to store frames received after a NAK has been sent until the damaged frame has been replaced.pSender must contain searching mechanism that allows it to find and select the requested frame for retransmission.pA buffer in the receiver must keep all previously received fr

47、ames until all retransmissions have been sorted and any duplicate frames have been identified and discarded.pTo aid selectivity, ACK number must refer to the frame received (or lost) instead of the next frame expected.pSelective-reject ARQ requires a smaller window size..1 Selective-Reject A

48、RQ, damaged framesp與回退n幀糾錯(cuò)中的NAK幀一樣,這里的NAK幀同時(shí)對(duì)前面正確接收而未確認(rèn)的數(shù)據(jù)幀進(jìn)行確認(rèn)并且指出當(dāng)前幀中存在差錯(cuò)。p和回退n幀系統(tǒng)中的接收方不同的是,選擇拒絕系統(tǒng)中的接收方在等待重傳的同時(shí)繼續(xù)接收新的數(shù)據(jù)幀。但是,因?yàn)橐粋€(gè)確認(rèn)幀既表明了具體某一幀的成功接收,同時(shí)還說明了前面所有幀的成功接收,因此在差錯(cuò)幀之后接因此在差錯(cuò)幀之后接收的幀在差錯(cuò)幀被糾正之前不能進(jìn)行確認(rèn)收的幀在差錯(cuò)幀被糾正之前不能進(jìn)行確認(rèn)。p接收方需要進(jìn)行大量邏輯運(yùn)算來將亂序的重傳進(jìn)行排序并記錄哪些幀仍然缺失,哪些幀仍未確認(rèn)。.1 Selective-Reject ARQ, dam

49、aged frames沒有丟沒有丟棄!棄!.2 Selective-Reject ARQ, lost data framesp盡管數(shù)據(jù)幀可以亂序接收,卻不能亂序確認(rèn)卻不能亂序確認(rèn)。p如果丟失了一幀,下一幀就會(huì)亂序到達(dá)。當(dāng)接收方試圖對(duì)現(xiàn)有的幀進(jìn)行重排序以包括它時(shí),就會(huì)發(fā)現(xiàn)不一致并返回一個(gè)NAK。p接收方只有在其他幀到來的情況下才能知道發(fā)生了丟失現(xiàn)象。如果丟失的幀是傳輸?shù)淖詈笠粠?,接收方不做任何工作,而發(fā)送方將這種靜默當(dāng)作丟失確認(rèn)幀一樣對(duì)待(超時(shí))。.3 Selective-Reject ARQ, lost AcknowledgementpWhen the send

50、er reaches either the capacity of its window or the end of its transmission, it sets a timer.pIf no acknowledgement arrives in the time allotted, the sender retransmits all of the frames that remain unacknowledged.pIn most cases, the receiver will recognize any duplications and discard them.

51、 comparison between go-back-n and selective-rejectpSelective-reject gives better performance, but in practice it is usually discard in favor of go-back-n for simplicity of implementation. The complexity of the sorting and storage required by the receiver, and the extra logic needed by the sender to

52、select specific frames for retransmission.SUMMARYpThe second layer in the OSI model, the data link layer has three main functions: line discipline.、flow control, and error control.pLine discipline establishes the status of a device (sender or receiver) on a link.pENQ/ACK is a line discipline method

53、used in point-to-point connections.pThe receiving device using ENQ/ACK line discipline responds with an acknowledge (ACK) if it is ready to receive data, or a negative acknowledge (NAK) if it is not ready.pPoll/select is a line discipline method. The primary device always initiates communication with either a poll or select (SEL) fra

溫馨提示

  • 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ǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論