0% found this document useful (0 votes)
9 views24 pages

Chapter 5 - Data Link Control Protocols

pretty

Uploaded by

kong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
9 views24 pages

Chapter 5 - Data Link Control Protocols

pretty

Uploaded by

kong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 24
Chapter 7 — Data Link Control Protocols Eighth Edition by William Stallings Data Link Control Protocols » need layer of logic above Physical » to manage exchange of data over a link frame synchronization flow control error control addressing control and data link management o The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter. Lew We Re oe ace aR Data from upper layer Variable number of characters Header SST es BMA STC LT em nL Data from upper layer Flag ESC Stuffed Flag received Header Unstuffed Flag Data to upper la Figure 11.3 URN a ae a Re Data from upper layer Variable number of bits 01111110 Header 01111010110 11011110 | Trailer | 01111110 Flag Flag ROR RI Ure med Data from upper layer f00111111100111110100q Fi Stuffed rame sent [Header [000111110110011171001000] Tiler | Flag | Extra 2 bits Frame received [Header Jooor1i1 110011111 101009] Trailer | Flag | Unstuffed (00111111100111110100d Data to upper layer FLOW AND. The most important responsibilities of the ERROR data link layer are flow control and error sigma control. Collectively, these functions are CONTROL Ve MON LLL ae OLED Flow Sono) , Flow control refers to a Pe UUCcesTaloli Me MANU Arel—sMNTeLE set of procedures used overwhelm receiving entity ein ¢ by preventing buffer overflow of data that the sender influenced by: can send before « transmission time waiting for » time taken to emit all bits into acknowledgment. eT armor MR US propagation time CCM Lee mC) » time for a bit to traverse the based on automatic utah repeat request, which Pare SSUL N= MAMMA ACOH OLU] et ATS) RUA te L Sela delays of data. Es WANO Oe @) he) low let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages. Receiver Network| Get data Deliver data Data link Physical] Send frame Receive frame] Physical Data frames —>=— as a ee Request from network layer Repeat forever Repeat forever Algorithm for sender site Algorithm for receiver site Notification from physical layer Protocols Simplest Stop-and-Wait ARQ Stop-and-Wait Go-Back-N ARQ Selective Repeat ARQ 11-4 NOISELESS CHANNELS Let us first assume we haye an ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. Source Destination Model of Frame a Transmis ireya) Frame | Frame 2 Time Frame 3 Frame 4 (a) Error-free transmission Source Destination Frame | Frame 1 Frame 2 Frame 3 3 Frame 4 prams Garbled frame Frame 5 Frame 5 (b) Transmission with losses and errors Stop and Wait source transmits frame destination receives frame and replies with Request acknowledgement (ACK) source waits for ACK before sending next destination can stop flow by not send ACK works well for a few large frames Stop and wait becomes inadequate if large block of data is split into small frames Arrival Request Stop and Wait Link Utilization Utilization under SW Flow Control v » U=1/14+2a \: Utilization = U = frame time / total time a= Propagation Time / Transmission Time » a= Medium length in bits / Frame length in bits CALCULATION OF U Station s1 sends f1 Station s2 sends an acknowledgment Station s1 sends f2 Station s2 sends an acknowledgment Station s1 sends fn Station s2 sends an acknowledgment CALCULATION OF U Total time to send the data=T=nT, T,=time to send and receive an acknowledgment 0) MeTirerenllpore PICs Tees Neon llpee T,rop=Propagation time from s1 to s2 See mcmic ee Rieu Tproc=Processing time (negligible) T,.x=time to transmit an acknowledgment(very small as compared to data frame) =2 “tif 2) prop erie) mOmanieuiesen(en propane), Of that time only n x Tframe is actually spent transmitting data CUNT SMM lame Miles ecm Ul MU lM r4- UMMM iene Co tata lirame) Utilization with Sliding Window Flow Control ae ere eae for ae arse | for Sliding Windows Flow Control » allows multiple numbered frames to be in transit » receiver has buffer W long » transmitter sends up to W frames without ACK » ACK includes number of next frame expected » sequence number is bounded by size of field (k) « frames are numbered modulo 2‘ e giving max window size of up to 2*- 1 » receiver can ack frames without permitting further transmission (Receive Not Ready) > must send a normal acknowledge to resume » if have full-duplex link, can piggyback ACks Sliding Window Diagram Frames buffered until acknowledged ‘+ Window of fram« Frames already transmitted that may be transmn Fr / Window sheinks from Window expands sequence Last frame Lastframe trailing edge as from leading edge number acknowledged transmitted frames are sent eACksetsohia (a) Sender's perspective Window of frames Frames already received that may be accepted | Tos ]2]s[s]s[s]> (alalaisyay ss]? } | / / / Window sheinks from Window expands Last frame Last frame trailing edge as from leading edge acknowledged received frames are received as ACKs are sent () Receiver's perspective Sliding Window Example Source System A. Oo no oBonnageoe PPP PEE PPE seer L (etfs TT a Destination System B folefats Taste] [ols [2Ts[sTsTs]7] [oT [213 [ats Tels fore [= —_ alr 2 fT TPEEEEEEET — he SRE EET OO |i BEE CE i sails Tole [2 Hogge Error Control » detection and correction of errors such as: Paleface luna « damaged frames » common techniques use: error detection « positive acknowledgment Mcallen leeUi Crm Uae « negative acknowledgement & retransmission Automatic Repeat Request (ARQ) > collective name for such error control mechanisms, including: > stop and wait » go back N » selective reject (selective retransmission) Stop and Wait ; ii i source transmits single frame wait for ACK if received frame damaged, discard it « transmitter has timeout « ifno ACK within timeout, retransmit if ACK os i, mission ime Time Corelugrelo|=TeR(c-lalsinn) UCM not recognize it transmitter will retransmit receive gets two copies of + frame use alternate numbering and ACKO / ACK1 pros and cons + simple + inefficient Go Back N » based on sliding window PMN iKe AVN) are CU IU 1-1) » use window to control number of outstanding frames Pama EKCANK=) Oh Anite K=)[c1e)1(¢) 0) « discard that frame and all future frames until error frame received correctly « transmitter must go back and retransmit that frame and all subsequent frames ~ Damaged Frame « error in frame iso receiver rejects frame / + transmitter retransmits frames from / ~ Lost Frame - frame i lost and either » transmitter sends i+7 and receiver gets frame i+7 out of seq and rejects frame / ~ of transmitter times out and send ACK with P bit set which receiver responds to with ACK i « transmitter then retransmits frames from i jnfaaasayor2345670 Go Back N Diagram (rbahen ere [rfesdnfaieron orzs4papDiZ67012 ro Time out pmusmfsran — lorzsasero zsise701g3455 Go Back N - Handling » Damaged Acknowledgement « receiver gets frame /, sends ack (i+7) which is lost * acks are cumulative, so next ack (/+n) may arrive before transmitter times out on frame / e if transmitter times out, it sends ack with P bit set « Can be repeated a number of times before a reset procedure is initiated » Damaged Rejection « reject for damaged frame is lost e handled as for lost frame when transmitter times out \ Ni \ \ V v \ M Selective Reject also called selective retransmission only rejected frames are retransmitted subsequent frames are accepted by the receiver and buffered minimizes retransmission receiver must maintain large enough buffer more complex logic in transmitter hence less widely used useful for satellite links with long propagation fe le\FeWAS) Selective Reject Diagram Bee ten. | ipianaune epasdef uss wa Tina oat Z 3 ne 5 £5 are suffered

You might also like