งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

Data Link Control Line discipline, Flow Control, Error Control

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "Data Link Control Line discipline, Flow Control, Error Control"— ใบสำเนางานนำเสนอ:

1 Data Link Control Line discipline, Flow Control, Error Control

2 Data Link and Flow Control
Data Link Control จะส่งข้อมูลกันอย่างไร ให้ได้ครบตามที่ต้องการ ใครจะเป็นคนส่ง หรือใครจะเป็นฝ่ายรับ และจะพร้อมเมื่อไร ? Line Discipline Flow Control Error Control จะมีวิธีการตรวจจับข้อผิดพลาดที่เกิดขึ้นอย่างไร และจะแก้ไขด้วยวิธีการใด?

3 Data Link and Flow Control
Point-to-Point Timing T ack T frame T proc A B Frame ACK T prop เป็นเวลาที่ใช้ในการส่งข้อมูลผ่านสื่อ จากจุด A มายังจุด B เป็นเวลาที่ใช้ในการส่งข้อมูล 1 Frame เป็นเวลาที่ใช้ในการประมวลผลข้อมูล ที่รับมา เป็นเวลาที่ใช้ในการส่งข้อมูลเพื่อตอบกลับ TF = T frame + 2Tprop TF Time Tack , Tproc มีค่าเข้าใกล้ 0

4 Data Link and Flow Control
Line Discipline ENQ – ACK (Master / Slave) (Primary / Secondary) Poll / Select

5 Data Link and Flow Control
Stop-and-Wait Sliding Windows Send one frame at a time Send several frames at a time

6 Data Link and Flow Control
Error Control Flow Control Stop-and-Wait Sliding Windows Error Control Stop-and-Wait ARQ GO-Back-N ARQ Selective Reject ARQ

7 Data Link and Flow Control
Stop and Wait flow control (Master – Slave/Primary - Secondary) Master Slave ENQ (Enquiry) = พร้อมมั๊ย? ENQ ACK (Acknowledge) = พร้อมจ้า… Establishment Master จะเป็นผู้ที่มีสิทธิ์ถาม แต่เพียงผู้เดียวเท่านั้นในระบบ และ Slave จะตอบได้ ก็ต่อเมื่อถูกถามเท่านั้น ACK Data transfer Time Time

8 Data Link and Flow Control
Stop and Wait flow control (Master – Slave/Primary - Secondary) Master Slave Peer-to-Peer Communication ENQ Establishment ACK Data ACK Data transfer Data ACK EOT Terminate Time Time

9 Data Link and Flow Control
Stop and Wait flow control (Poll and Select) Poll Primary requests data from a secondary “Do you have any data to send?” “มีข้อมูลอะไรต้องการจะส่งหรือเปล่า?” Select Primary has data to send to a secondary “Are you ready to receive data?” “คุณพร้อมที่จะรับข้อมูลหรือเปล่า?”

10 Data Link and Flow Control
Stop and Wait flow control (Poll and Select) Master Slave Poll Data Time ACK Select Are you ready to Receive data? Do you have any Data to send?

11 Data Link and Flow Control
Stop and Wait flow control (Select) Discipline of Multipoint Communication

12 Data Link and Flow Control
Stop and Wait flow control (Poll) Discipline of Multipoint Communication

13 Data Link and Flow Control
Stop and Wait Protocol Sender Sends 1 frame & then Waits Destination receives frame, passes to the network layer and sends an ACK Source Waits for ACK before Sending next frame Once an ACK received by the sender, it can Send next frame and then Wait again

14 Data Link and Flow Control
Stop and Wait Protocol Send one frame at a time

15 Data Link and Flow Control
Sliding Windows Flow Control ใช้ในกรณีที่ Link เป็นแบบ Full Duplex ซึ่งเป็นความพยายามที่ต้องการให้ทั้งการส่งและการรับสามารถดำเนินไปพร้อมกันได้โดยไม่ต้องหยุดรอ เพื่อเพิ่มประสิทธิภาพในการรับส่งข้อมูล ข้อกำหนดที่สำคัญ Link เป็นแบบ Full Duplex ฝั่งรับ (Receiver) จะต้องมี Buffer มากพอที่จะรับข้อมูลมากกว่า 1 frame ผู้รับ / ผู้ส่ง จะต้องทำการตกลงกันล่วงหน้า ว่าจะรับส่งกันได้สูงสุดกี่ frame โดยไม่ต้องรอ มีการบันทึกจำนวนการรับและส่ง เพื่อใช้ในการตรวจสอบ โดยฝั่งรับจะบันทึกการรับ และฝั่งส่งจะบันทึกการส่ง

16 Data Link and Flow Control
Sample of Sliding Windows Flow Control A B Frame 0 ACK 1 Frame 1 Frame 2 สมมติให้ N = 8 Frame 7 RN=0 SN=0 ACK 2 Frame 3 ACK 3 1 2 3 4 5 6 7 SN=1 SN=2 RN=1 RN=2 SN=3 ACK จะมีหมายเลขของเฟรมข้อมูลถัดไปที่ต้องการ ส่งมาด้วย

17 Data Link and Flow Control
Sample of Sliding Windows Flow Control A B Frame 0 ACK 1 Frame 1 Frame 2 สมมติให้ N = 8 Frame 7 RN=0 SN=0 ACK 2 Frame 3 ACK 3 1 2 3 4 5 6 7 SN=1 SN=2 RN=1 RN=2 SN=3 Window เต็มจึงเริ่มรอจนกว่า จะ Time out หรือมีการตอบกลับ Time out เมื่อ ACK 3 ถึงจะถือว่าข้อมูล ก่อนหน้าส่งได้สำเร็จ Window จะเพิ่มช่องว่างให้ทีเดียวรวมกับ ช่องของ ACK ก่อนหน้าที่ส่งไม่ถึง

18 Data Link and Flow Control
Error Control ความผิดพลาดที่อาจเกิดขึ้นจากการส่งข้อมูล ไม่ว่าจะส่งด้วยวิธีการ Stop and Wait หรือ Sliding windows ก็ตาม ชนิดของความผิดพลาดที่เกิดขึ้นมีดังนี้ Lost Frame ข้อมูลแสดงจุดเริ่มต้น หรือจุดสิ้นสุดของ Frame เสียหาย ทำให้ไม่สามารถบอกได้ว่า สิ่งที่ได้รับมาเป็น Frame ข้อมูล Damage Frame ข้อมูลภายใน Frame สูญหายหรือผิดเพี้ยนไป

19 Data Link and Flow Control
Possible Errors Frame lost during transmission Frame arrives with error ACK ACK gets lost

20 Data Link and Flow Control
Automatic Repeat Request (ARQ) Flow Control Stop-and-Wait Sliding Windows Error Control Stop-and-Wait ARQ GO-Back-N ARQ Selective Reject ARQ

21 Data Link and Flow Control
Stop-and-Wait ARQ Stop-and-wait ARQ is the simplest of the error control protocols. A transmitter sends a frame then stops and waits for an acknowledgment. If a positive acknowledgment (ACK) is received, the next frame is sent. If a negative acknowledgment (NAK) is received, the same frame is transmitted again.

22 Data Link and Flow Control
Stop-and-Wait ARQ – Normal Operation

23 Data Link and Flow Control
Stop-and-Wait ARQ – Lost frame

24 Data Link and Flow Control
Stop-and-Wait ARQ – Lost ACK frame Duplicated Frame

25 Data Link and Flow Control
Stop-and-Wait ARQ – Delayed ACK frame

26 Data Link and Flow Control
Piggybacking

27 Data Link and Flow Control
Go-Back-N ARQ Receiver Window = 1 Sender Window Size = 2n -1 where n is the bits for sequence # (i.e., if n = 4 then sender window can have 16 frames (0 though 15) Sender can send multiple frames When a damage Frame arrives at Receiver, it must be discarded

28 Data Link and Flow Control
Go-Back-N ARQ What should the Receiver do with all the correct frames following it? What Receiver does? Receiver simply discard the Damage Frame and all subsequent frames and will send NAK (REJ)for the Discarded frames. Receiver only accept the Frame it MUST send it to the Network layer (↑) What Sender does? It’s timer will expire, go to step2 or If receives a REJ (-ve ACK) from receiver , go to step2 Sender must go back and retransmit the Damage Frame and all subsequent frames

29 Data Link and Flow Control
Go-Back-N ARQ N = windowsize Rn = request number Sn = sequence number Sb = sequence base Sm = sequence max Receiver: Rn = 0 Do the following forever: If (the packet received = Rn) && (the packet is error free) Accept the packet and send it to a higher layer Rn = Rn +1 Send a Request for Rn Else Refuse packet

30 Data Link and Flow Control
Sample of Go-Back-N ARQ dialog sender Receiver Receiver send a REJ Receiver Window size = 1 Sender Window Size = 2n -1 where n is the bits for sequence Receiver Discards Frames (F2-F8). Sender will Retransmit the Damage Frame (F2) and all the subsequent frame (F2-F8) Receiver only accept the frame (F2) that it MUST give to the network layer

31 Data Link and Flow Control
Go-Back-N ARQ (Normal Operation)

32 Data Link and Flow Control
Go-Back-N ARQ (Lost Frame)

33 Data Link and Flow Control
Go-Back-N ARQ (Damage Frame)

34 Data Link and Flow Control
Go-Back-N ARQ (Lost ACK)

35 Data Link and Flow Control
Selective-Reject ARQ Receiver Window is 2n/2 Sender window size is: 2n – 1

36 Data Link and Flow Control
Selective-Reject ARQ What Receiver does when it receives a Damage Frame: Only the Damage or Rejected frame is discarded Send a Negative ACK (NAK) or REJ for the discarded frame Buffered all the subsequent good frames Don’t pass the buffered frames to Network layer until it receives the expected-frame Once it receives the Expected Frame, it may now send all buffered frames. Minimizes retransmission Receiver must maintain large enough buffer More complex

37 Data Link and Flow Control
Sample of Selective-Reject ARQ

38 Data Link and Flow Control
Sample of Selective-Reject ARQ After getting NAK, Retransmit the frame 2 ACK1 means I have received till frame 1 (i.e., F0 & F1) Sender can now remove 6 frames from its buffer (i.e.., F0 to F5) Once it gets F2, it can now have F0 to F5, So the ACK5 is sent Send a NAK for the damage frame 2 Frames 3,4,5 are buffered rather than discarded

39 Data Link and Flow Control
Sliding Window ARQ Comparison Go-Back-N Simple More Practical Waste a lot of Bandwidth if Error Rate is high By retransmitting not only the damage-frame but also the subsequent frames Sender needs to buffered all the Unacknowledged frames If error occurs, frames should be in the sender’s buffer Selective-Reject Complex (Sorting, extra select frame logic, must maintain large enough buffer) Better Performance

40 Questions & Answers Q&A


ดาวน์โหลด ppt Data Link Control Line discipline, Flow Control, Error Control

งานนำเสนอที่คล้ายกัน


Ads by Google