140 likes | 144 Views
網路概論 Class 3 – Data Link Control Part I. 授課老師 楊人順 2001/10/09,2001/10/16. Presentation Outlines. Asynchronous and Synchronous Transmission Why need data link control ? Frame synchronization Line configurations Flow control Error Detection Techniques. Asynchronous Transmission.
E N D
網路概論Class 3 – Data Link Control Part I 授課老師 楊人順 2001/10/09,2001/10/16
Presentation Outlines • Asynchronous and Synchronous Transmission • Why need data link control ? • Frame synchronization • Line configurations • Flow control • Error Detection Techniques -2-
Asynchronous Transmission • 兩端時鐘(時序脈衝)不需要先作同步,這種方法是藉由不發送長的或含有中斷的bit streams來避免時序混亂(一次’一口氣’發送一個字元)。但是,兩端的時序脈衝不能差太多。 • Start bit每次重新作同步。當沒有字元被傳送時, 介於發送端和接收端之間的線路是處於 “idle” state (“1” state). • EIA-232-D defined the negative voltage(-12V) on the line as “idle”. • Usually, the character bits (資料位元) followed by a parity bit. -3-
Synchronous Transmission • More efficient than asynchronous transmission • 時脈同步:兩端時鐘(時序脈衝)需要先作同步,方法有二: • 兩端相連有獨立的時脈線路 • 利用加在資料欄位之前或之後的同步信號欄位 (pp.178 figure 6.2) • Frame Synchronization : • Character-oriented frame • SYN, a unique bit pattern, ex. 10101 • 不需要bit stuffing, 因為欄位讀取有先後次序 • Bit-oriented frame • Flag Fields, 在一個frame的兩頭,來區隔frame, ex. 01111110 • 需要bit stuffing, 因為讀取單位是bit。 -5-
Why need data link control ? • Why do we need data link control between two directly connected transmitting-receiving stations ? • Frame Synchronization, • Line configurations, • Flow control, • Error Detection and Forward Error Correction, • Error control and Backward Error Correction, • Addressing, and • Line management -6-
Line Configuration • Full Duplex and Half Duplex • Point-to-point Links (pp. 179 figure 6.3 (a)) Three distinct phases : • Establishment • Data Transfer • Termination • Multipoint Links (bus) (pp. 179 figure 6.3 (b)) • Polling : Primary asks secondary of whether there are any data the secondary will send. • Select : Primary informs secondary that have data wish to send. LAN usually uses the topologies of bus,ring(contention: CSMA/CD or CDMA/CA) -7-
Flow control • Why a sender breaks up a large block of data into smaller blocks (only the last frame not with the same size) ? • The buffer size of the receiver may be limited. • The longer the transmission, the more likely that there will be an error , necessitating retransmission of the entire frame. With smaller frames, errors are detected sooner, and a smaller amount of data needs to be retransmitted. • On a shared medium, such as a LAN, it is usually desirable not to permit one station to occupy the medium for an extended period, thus causing long delays at the other sending stations. -8-
Flow control (2) • Stop-and-Wait Flow Control • Frame Transmission Model (pp. 196 figure 7.1) • Link Utilization Concepts • Stop-and-Wait Link Utilization (pp. 197 figure 7.2) • Sliding-Window Flow Control • Only if a > 1 • Add frame sequence number field with k bits (modulo 2k: 0 to 2k-1 ) -9-
Error Detection Technique • Concept Transmitter E=f(Data) Data Data E Receiver E, E’ = error-detecting codes F = error-detecting function Data E E’=f(Data) Compare -12-
Error Detection Technique (2) • The three most common techniques: • Parity bit • Even Parity bit (all bits XOR) • Odd Parity bit (all bits XOR, and then inverse) • Disadvantage : errors with even number of bits can not be detected. • Block sum check • Cyclic redundancy check -13-
Block Sum Check -14-