Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# 3a data link layer continued

247

Published on

1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
247
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
1
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. 9.1Data Link Controlcontd/-Networking Fundamentals
• 2. 2
• 3. 11.3Send sliding window for Selective Repeat ARQ
• 4. 11.4Receive sliding window for Selective Repeat ARQ
• 5. 11.5Design of Selective Repeat ARQ
• 6. 11.6Selective Repeat ARQ, window size
• 7. 11.7In Selective Repeat ARQ, the sequencenumbers are modulo 2m, however, thesize of the sender and receiver windowmust be at most one-half of 2m.Note
• 8. 11.8Algorithm Sender-site Selective Repeat algorithm(continued)Timer started for each frame sent Spot the error?
• 9. 11.9Algorithm Sender-site Selective Repeat algorithm (continued)(continued)Valid NAK – only that frame re-sent
• 10. 11.10Algorithm Sender-site Selective Repeat algorithm (continued)Only timed-out frame is re-sent
• 11. 11.11Algorithm Receiver-site Selective Repeat algorithm
• 12. 11.12Algorithm Receiver-site Selective Repeat algorithmData delivered after contiguous frames received, only then ACK sent
• 13. 11.13Delivery of data in Selective Repeat ARQ
• 14. 11.14This example is similar to Example on Go-Back-N-ARQin which frame 1 is lost. We show how Selective Repeatbehaves in this case. Figure shows the situation. Onemain difference is the number of timers. Here, eachframe sent or resent needs a timer, which means that thetimers need to be numbered (0, 1, 2, and 3). The timer forframe 0 starts at the first request, but stops when the ACKfor this frame arrives. The timer for frame 1 starts at thesecond request, restarts when a NAK arrives, and finallystops when the last ACK arrives. The other two timersstart when the corresponding frames are sent and stop atthe last arrival event.Example
• 15. 11.15At the receiver site we need to distinguish between theacceptance of a frame and its delivery to the networklayer. At the second arrival, frame 2 arrives and is storedand marked, but it cannot be delivered because frame 1 ismissing. At the next arrival, frame 3 arrives and ismarked and stored, but still none of the frames can bedelivered. Only at the last arrival, when finally a copy offrame 1 arrives, can frames 1, 2, and 3 be delivered to thenetwork layer. There are two conditions for the deliveryof frames to the network layer: First, a set of consecutiveframes must have arrived. Second, the set starts from thebeginning of the window.Example (continued)
• 16. 11.16Another important point is that a NAK is sent after thesecond arrival, but not after the third, although bothsituations look the same. The reason is that the protocoldoes not want to crowd the network with unnecessaryNAKs and unnecessary resent frames. The second NAKwould still be NAK1 to inform the sender to resend frame1 again; this has already been done. The first NAK sent isremembered (using the nakSent variable) and is not sentagain until the frame slides. A NAK is sent once for eachwindow position and defines the first slot in the window.Example (continued)
• 17. 11.17The next point is about the ACKs. Notice that only twoACKs are sent here. The first one acknowledges only thefirst frame; the second one acknowledges three frames. InSelective Repeat, ACKs are sent when data are delivered tothe network layer. If the data belonging to n frames aredelivered in one shot, only one ACK is sent for all of them.Example (continued)
• 18. 11.18Flow diagram for Example
• 19. 11.19
• 20. 11.20Design of piggybacking in Go-Back-N ARQ
• 21. 11.21HDLCHDLCHigh-level Data Link Control (HDLC)High-level Data Link Control (HDLC) is ais a bit-orientedbit-orientedprotocol for communication over point-to-point andprotocol for communication over point-to-point andmultipoint links. It implements the ARQ mechanismsmultipoint links. It implements the ARQ mechanismswe discussed.we discussed.
• 22. 11.22Transfer Mode - Normal response mode Configuration
• 23. 11.23Transfer Mode - Asynchronous balanced mode ConfigurationPeer to Peer – the common Mode used normally
• 24. 11.24HDLC frames - Information, Supervisory & Unnumbered
• 25. 11.25There are three fundamental types of HDLC frames:- Information frames, or I-frames, transport user data from the networklayer. In addition they can also include flow and error control informationpiggybacked on data.- Supervisory Frames, or S-frames, are used for flow and error controlwhenever piggybacking is impossible or inappropriate, such as when astation does not have data to send. S-frames do not have information fields.- Unnumbered frames, or U-frames, are used for various miscellaneouspurposes, including system/link management. Some U-frames contain aninformation field, depending on the type.
• 26. 11.26
• 27. 11.27Poll/Final is a single bit with two names. It is called Poll when set by the primary station toobtain a response from a secondary station, and Final when set by the secondary station to
• 28. 11.28S-frame control command and response
• 29. 11.29U-frame control command and response – common types***
• 30. 11.30Figure shows how U-frames can be used for connectionestablishment and connection release. Node A asks for aconnection with a set asynchronous balanced mode(SABM) frame; node B gives a positive response with anunnumbered acknowledgment (UA) frame. After thesetwo exchanges, data can be transferred between the twonodes (not shown in the figure). After data transfer, nodeA sends a DISC (disconnect) frame to release theconnection; it is confirmed by node B responding with aUA (unnumbered acknowledgment).Example
• 31. 11.31Example of connection and disconnection
• 32. 11.32Figure shows an exchange using piggybacking. Node Abegins the exchange of information with anI-frame numbered 0 followed by another I-framenumbered 1. Node B piggybacks its acknowledgment ofboth frames onto an I-frame of its own. Node B’s firstI-frame is also numbered 0 [N(S) field] and contains a 2in its N(R) field, acknowledging the receipt of A’s frames1 and 0 and indicating that it expects frame 2 to arrivenext. Node B transmits its second and third I-frames(numbered 1 and 2) before accepting further frames fromnode A.Example
• 33. 11.33Its N(R) information, therefore, has not changed: Bframes 1 and 2 indicate that node B is still expecting A’sframe 2 to arrive next. Node A has sent all its data.Therefore, it cannot piggyback an acknowledgment ontoan I-frame and sends an S-frame instead. The RR codeindicates that A is still ready to receive. The number 3 inthe N(R) field tells B that frames 0, 1, and 2 have all beenaccepted and that A is now expecting frame number 3.Example (continued)
• 34. 11.34Example of piggybacking without error
• 35. 11.35Figure shows an exchange in which a frame is lost. NodeB sends three data frames (0, 1, and 2), but frame 1 islost. When node A receives frame 2, it discards it andsends a REJ frame for frame 1. Note that the protocolbeing used is Go-Back-N with the special use of an REJframe as a NAK frame. The NAK frame does two thingshere: It confirms the receipt of frame 0 and declares thatframe 1 and any following frames must be resent. NodeB, after receiving the REJ frame, resends frames 1 and 2.Node A acknowledges the receipt by sending an RR frame(ACK) with acknowledgment number 3.Example
• 36. 11.36Example of piggybacking with error
• 37. 11.37POINT-TO-POINT PROTOCOLPOINT-TO-POINT PROTOCOLAlthough HDLC is a general protocol that can be usedAlthough HDLC is a general protocol that can be usedfor both point-to-point and multipoint configurations,for both point-to-point and multipoint configurations,one of the most common protocols for point-to-pointone of the most common protocols for point-to-pointaccess is theaccess is the Point-to-Point Protocol (PPP).Point-to-Point Protocol (PPP). PPP is byPPP is byfar the most common protocol used, when individualfar the most common protocol used, when individualusers connect to the Internet.users connect to the Internet.
• 38. 11.38PPP frame format
• 39. 11.39
• 40. 11.40PPP is a byte-oriented protocol usingbyte stuffing with the escape byte01111101.Note
• 41. 11.41Byte Stuffing
• 42. 11.42Transition phases – A PPP connection goes through phasesLCPAPNCP
• 43. 11.43Multiplexing in PPP
• 44. 11.44LCP packet encapsulated in a frame
• 45. 11.45LCP packets****
• 46. 11.46Common options
• 47. 11.47PAP packets encapsulated in a PPP frame
• 48. 11.48CHAP packets encapsulated in a PPP frameResponse result of a predefinedfunction on challenge and Userpassword
• 49. IPCP
• 50. 11.50IPCP packet encapsulated in PPP frame
• 51. 11.51Code value for IPCP packets**
• 52. 11.52IP datagram encapsulated in a PPP frame
• 53. 11.53Let us go through the phases followed by a network layerpacket as it is transmitted through a PPP connection.Figure shows the steps. For simplicity, we assumeunidirectional movement of data from the user site to thesystem site (such as sending an e-mail through an ISP).The first two frames show link establishment. We havechosen two options (not shown in the figure): using PAPfor authentication and suppressing the address controlfields. Frames 3 and 4 are for authentication. Frames 5and 6 establish the network layer connection using IPCP.Example
• 54. 11.54The next several frames show that some IP packets areencapsulated in the PPP frame. The system (receiver)may have been running several network layer protocols,but it knows that the incoming data must be delivered tothe IP protocol because the NCP protocol used before thedata transfer was IPCP.After data transfer, the user then terminates the data linkconnection, which is acknowledged by the system. Ofcourse the user or the system could have chosen toterminate the network layer IPCP and keep the data linklayer running if it wanted to run another NCP protocol.Example (continued)
• 55. 11.55An example
• 56. 11.56An example (continued)