Presentation on dll


Published on

Published in: Education, Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Presentation on dll

  1. 1. Group members : Alisha Korpal Nancy Jain Nivia Jain Sharuti Jain
  2. 2. <ul><li>The data link layer has a number of specific functions it can carry out. These functions include </li></ul><ul><ul><li>Providing a well-defined service interface to the network layer. </li></ul></ul><ul><ul><li>Dealing with transmission errors. </li></ul></ul><ul><ul><li>Regulating the flow of data so that slow receivers are not swamped by fast senders. </li></ul></ul>
  3. 3. <ul><li>Unacknowledged connectionless service. </li></ul><ul><li>Acknowledged connectionless service. </li></ul><ul><li>Acknowledged connection-oriented service </li></ul>
  4. 4. <ul><li>Source sends frames to destination machine but the destination machine does not send any acknowledgement of these frames back to the source. </li></ul><ul><li>There is no connection established between source & destination machine before data transfer or after data transfer. </li></ul>
  5. 5. <ul><li>The connection is not established before the data transfer or after the data transfer. </li></ul><ul><li>When the sender sends the data to destination, destination sends back the acknowledgment of these frames. </li></ul>
  6. 6. <ul><li>It means that connection is established between source &destination before any data is transferred. </li></ul><ul><li>Each frame being transmitted from source to destination is given a specific number and is acknowledged by the destination machine. </li></ul><ul><li>Data transfer has three different phases :- </li></ul><ul><ul><ul><ul><ul><li>Connection establishment </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Actual data transfer </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Connection release </li></ul></ul></ul></ul></ul>
  7. 7. <ul><li>Framing </li></ul><ul><li>Error control </li></ul><ul><li>Flow control </li></ul><ul><li>Physical address </li></ul><ul><li>Access control </li></ul>
  8. 8. <ul><li>When data is being transmitted from one machine to another, it may possible that data become corrupted on its way. Some of the bits may be altered, damaged or lost during transmission. Such a condition is known as error. </li></ul><ul><li>Types of errors </li></ul><ul><ul><ul><li>Single bit error </li></ul></ul></ul><ul><ul><ul><li>Burst error </li></ul></ul></ul>
  9. 9. <ul><li>Vertical Redundancy check/parity check </li></ul><ul><li>Longitudinal Redundancy check </li></ul><ul><li>Cyclic Redundancy check </li></ul><ul><li>Checksum </li></ul>Redundancy is the method in which some extra bits are added to the data so as to check whether the data contain error or not .
  10. 10. Even parity 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 Even Parity Generator (counts 1 in data) 1 Sender Receiver Parity checker Counts 1 in data + VRC) Odd parity Accept data Reject data
  11. 11. 11001010 10101010 11001100 11100011 01001111 11001010 10101010 11001100 11100011 11001010 10101010 11001100 11100011 01001111 Original data LRC
  12. 12. 10101001 subunit1 00111001 subunit 2 11100010 sum 00011101 Compliment of sum 10101001 00111001 00011101 data checksum Sender :
  13. 13. Receiver: 10101001 subunit1 00111001 subunit2 00011101 Checksum 11111111 sum 00000000 compliment No error
  14. 14. Sender: 1011 1011 0100 0000 1000 1011 0110 0000 110 1001000 1011
  15. 15. Receiver : 1011 1010 Note: Remainder is zero, no error 1001110 1011 0101 0000 1011 1011 0000 0000 000
  16. 16. <ul><li>Another important design issue that occurs in the data link layer (and higher layers as well) is what to do with a sender that systematically wants to transmit frames faster than the receiver can accept them. </li></ul><ul><li>This situation can easily occur when the sender is running on a fast (or lightly loaded) computer and the receiver is running on a slow (or heavily loaded) machine. </li></ul>
  17. 17. <ul><li>The sender keeps pumping the frames out at a high rate until the receiver is completely swamped. Even if the transmission is error free, at a certain point the receiver will simply be unable to handle the frames as they arrive and will start to lose some. Clearly, something has to be done to prevent this situation. </li></ul>
  18. 18. <ul><li>Stop and Wait </li></ul><ul><li>Sliding Window </li></ul>
  19. 19. <ul><li>The sender sends a single frame to receiver & waits for an ACK. </li></ul><ul><li>The next frame is sent by sender only when ACK of previous frame is received. </li></ul><ul><li>To end up the transmission sender sends EOT End Of Transmission. </li></ul>
  20. 20. Sender Receiver DATA ACK EOT DATA ACK
  21. 21. <ul><li>In this multiple frames are sent by the sender at a time before needing an acknowledgment. </li></ul><ul><li>Multiple frames sent by source and acknowledged by receiver using a single unit. </li></ul><ul><li>Sliding window is an imaginary boxes that hold the frames on both sender and receiver side </li></ul><ul><li>It provides the upper limit on the number of frames hat can be transmitted before requiring an acknowledgment. </li></ul>
  22. 23. <ul><li>Error control function of data link layer detects the error in transmitted frames and retransmits all the erroneous frames. </li></ul><ul><li>Therefore error control function of data link layer helps in dealing with data frames that are damaged in transmit, data frame lost in transmit and the acknowledgment frame that are lost in transmission. </li></ul><ul><li>The method is used for error control is called Automatic Repeat Request (ARQ). </li></ul>
  23. 24. <ul><li>If an error is detected in any frame, the receiver sends a negative acknowledgement (NAK) back to source and the specific frame is retransmitted. </li></ul><ul><li>ARQ techniques helps us in dealing with: </li></ul><ul><li>Damaged data frames </li></ul><ul><li>Lost data frame </li></ul><ul><li>Lost acknowledgment frames(both ACK & NAK) </li></ul>
  24. 25. <ul><li>Stop and wait ARQ </li></ul><ul><li>Sliding window ARQ </li></ul><ul><ul><ul><ul><ul><li>Go – back – n </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Selective – reject </li></ul></ul></ul></ul></ul>
  25. 26. <ul><li>The sending device keeps a copy of the last frame transmitted until it receives an acknowledgment for that frame. Keeping this copy helps the sender in retransmission of lost or damaged frames later on. </li></ul><ul><li>Both data frames and ACK frames are numbered alternately 0 and 1 for identification purpose. </li></ul><ul><li>Criteria used by stop and wait ARQ method: </li></ul><ul><ul><ul><li>Damaged data frames </li></ul></ul></ul><ul><ul><ul><li>Lost data frames </li></ul></ul></ul><ul><ul><ul><li>Lost acknowledged frames </li></ul></ul></ul>
  26. 27. <ul><li>If a data frame received by a receiver contains an error, it returns NAK frame to the sender. </li></ul><ul><li>On receiving NAK frame ,sender retransmits the last data frame. </li></ul>
  27. 28. Sender Receiver DATA 0 ACK 1 DATA 2 DATA 1 AC K 2 error NAK retransmit DATA 2 AC K 3
  28. 29. <ul><li>Every sending device is equipped with timer. </li></ul><ul><li>The sender starts this timer when it transmits data frame. </li></ul><ul><li>If a data frame is lost on its way, it will not be received by receiver. As a result the receiver can never acknowledge it, positively or negatively. </li></ul><ul><li>The sending device waits for an ACK and NAK frame until timer goes of. </li></ul>
  29. 30. retransmit Sender Receiver DATA 0 ACK 1 DATA 2 DATA 1 AC K 2 lost DATA 2 AC K 3 Time out
  30. 31. <ul><li>When any data frame reaches the destination, the receiver acknowledges it either with ACK or with NAK. </li></ul><ul><li>If ACK or NAK frame returned by the receiver is lost in transmit, sending device retransmit the data frame that has not been acknowledged </li></ul>
  31. 32. Sender Receiver DATA 0 ACK 1 DATA 1 DATA 1 AC K 2 ACK 2 retransmit DATA 2 AC K 4 lost
  32. 33. <ul><li>The sending device keeps the copies of all the transmitted frames until they are acknowledged. </li></ul><ul><li>The receiver can send both ACK and NAK frames to source. Both ACK & NAK frames are numbered for identification, because this method is a continuous transmission. </li></ul><ul><ul><ul><ul><li>Go back n ARQ </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Selective reject </li></ul></ul></ul></ul>
  33. 35. <ul><li>Whenever receiver sees a damaged data frame it sends NAK indicating the number of that frame. the NAK indicates that all the frames received prior to this frame are intact and the frame whole number is specified in NAK damaged. </li></ul><ul><li>Whenever receiver gets damaged frame it stops accepting any subsequent data frames and sends NAK to sender. </li></ul><ul><li>Whenever NAK is received by the sender it retransmit all the data. </li></ul>
  34. 37. <ul><li>In sliding window the data frames must be transmitted sequentially </li></ul><ul><li>Receiving any frame, the receiver checks the identifying number on each frame. If any of the frame is lost & is missing in sequence, the receiver sends NAK indicating the number of that frame & discard all other frames that are received out of order. </li></ul>
  35. 39. <ul><li>In sliding window the sender does not wait for acknowledgment after every single frame. </li></ul><ul><li>In this method multiple frames are sent. The source can send as many frames as the window size before waiting for an acknowledgment. </li></ul><ul><li>Once that limit has been reached or sender has no more frames to send, it must wait. </li></ul>
  36. 41. <ul><li>When a receiver gets damaged frame it sends NAK for that particular frame. This NAK acknowledges the intact receipt of a previously unacknowledged data frames and also indicates an error in current frame. </li></ul>
  37. 43. <ul><li> </li></ul>
  38. 44. <ul><li> </li></ul><ul><li> </li></ul>