现代计算机网络讲义3(英语)+数据链路层
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A One-Bit Sliding Window Protocol A Protocol Using Go Back N A Protocol Using Selective Repeat
源自文库
Transmit data in two direction Piggybacking Sliding window
Chapter 3
The Data Link Layer
Object : reliable, efficient communication between two adjacent machines.
3.1 Data Link Layer Design Issues
Services Provided to the Network Layer Framing Error Control Flow Control
3.4.1 A One-Bit Sliding Window Protocol (1)
Continued
3.4.1 A One-Bit Sliding Window Protocol (2)
3.4.1 A One-Bit Sliding Window Protocol (3)
Two scenarios for protocol 4.
3.1.3 Error Control
All frames are eventually delivered to the destination and in the proper order Error detect Feedback, positive or negative acknowledgement Timer Sequence number
3.1.1 Services Provided to Network Layer (3)
Various services
Unacknowledged connectionless service, appropriate for
Error rate is very low Real-time traffic, late data are worse than bad Most LANs . Unreliable channels, such as wireless systems WAN , Point to point Establish connection, transmit frames, release connection Each frame sent is indeed received exactly once, all frames are received in the right order.
(a) Normal case. (b) Abnormal case. The notation is (seq, ack, packet number). An asterisk indicates where a network layer accepts a packet. half of the frames contain duplicates
3.4.2 Sliding Window Protocol Using Go Back N (2)
Sending window is larger than 1 No more than MAX_SEQ unacknowledged frames outstanding at any time Receiver’s window size is 1 Receiver only accept frame in order Interface between L and N layer Ack for frame n means n - 1, n - 2, and so on are also acknowledged. Piggyback Buffer space is smaller Bandwidth efficiency is lower
3.4.1 A One-Bit Sliding Window Protocol (4)
Line utilization
B is channel capacity (bits/sec) L is frame size (bits) R is round-trip propagation time (sec) The time needed to transmit a frame: Line utilization = (L/B)/(L/B + R/2 + R/2)=L / (L + BR)
3.2 Error Detection and Correction
•
•
Error-Detecting Codes Error-Correcting Codes
3.3 Elementary Data Link Protocols
An Unrestricted Simplex Protocol A Simplex Stop-and-Wait Protocol A Simplex Protocol for a Noisy Channel
A sliding window of size 1, with a 3-bit sequence number.
(a) Initially. (b) After the first frame has been sent. (c) After the first frame has been received. (d) After the first acknowledgement has been received.
Continued
3.3.3 A Simplex Protocol for a Noisy Channel (4)
A positive acknowledgement with retransmission protocol.
3.4 Sliding Window Protocols
Object: more efficient
Acknowledged connectionless service.
Acknowledged connection-oriented service.
3.1.2 Framing(1)
Breaking the bit stream up into frames A character stream
Protocol Definitions
Continued Some definitions needed in the protocols to follow.
Protocol Definitions (ctd.)
3.3.1 Unrestricted Simplex Protocol
Sending Window
Sequence number Size Upper edge and Lower edge
Receiving Window
The frame was sent but no ACK received buffer Acceptable Frame
Sliding Window Protocols (2)
Produce a duplicate frame A 1-bit sequence number to distinguish new or old frame
When ACK lost
3.3.3 A Simplex Protocol for a Noisy Channel (3)
A positive acknowledgement with retransmission protocol.
L/B R/2 R/2
Pipelining
3.4.2 Sliding Window Protocol Using Go Back N (1)
Pipelining and error recovery strategies
(a) Go back N. (b) Selective repeat.
(a) Without errors. (b) With one error
3.1.2 Framing (2)
(a) A frame delimited by flag bytes. Resynchronization after an error with special bytes. (b) Byte stuffing, four examples. Used in PPP
3.4.2 Sliding Window Protocol Using Go Back N (3)
Continued
3.4.2 Sliding Window Protocol Using Go Back N (4)
Continued
3.4.2 Sliding Window Protocol Using Go Back N (5)
Unreliable Physical line Solution
Sender sends frame with CRC Receiver verifies CRC value and sends ACK or NAK Sender sends a new frame when receives an ACK, sends old frame when receives an NAK or timeout.
3.3.2 Simplex Stop-and-Wait Protocol (1)
Receiver sends Acknowledgement for flow control
3.3.2 Simplex Stop-andWait Protocol (2)
3.3.3 A Simplex Protocol for a Noisy Channel (1)
Assume
Physical layer, data link layer, and network layer are independent processes One direction transmission Have a reliable Physical layer service. Machine A have an infinite supply of data ready to send Machine B always ready to receive machines do not crash
3.1.2 Framing (3)
Bit stuffing a special bit pattern (flag): 01111110 (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receiver’s memory after destuffing.
Retransmission and reorder
3.1.4 Flow Control
Sender wants to transmit frames faster than the receiver can accept them. Feedback-based flow control, permission Rate-based flow control
3.1.1 Services Provided to Network Layer (1)
(a) Virtual communication. (b) Actual communication.
3.1.1 Services Provided to Network Layer (2)
Placement of the data link protocol.