Data Link Protocols
description
Transcript of Data Link Protocols
![Page 1: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/1.jpg)
Data Link Protocols
ผศ.ดร. อนั�นัต์ ผลเพิ่ �มAsst.Prof. Anan Phonphoem, Ph.D.
[email protected]://www.cpe.ku.ac.th/~anan
Computer Engineering DepartmentKasetsart University, Bangkok, Thailand
![Page 2: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/2.jpg)
Data Link Protocols
AsynchronousProtocols
SynchronousProtocols
Character-oriented Bit-oriented
• Xmodem• Ymodem• Zmodem• BLAST• Kermit
![Page 3: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/3.jpg)
3 of 53
Asynchronous Protocols Long, long…time ago Not complex and easy to implement Slow Required start/stop bit and space Now mainly used in modem Replaced by high speed
synchronous
![Page 4: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/4.jpg)
4 of 53
XMODEM frame
Half-duplex, stop-and-wait ARQ protocol
![Page 5: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/5.jpg)
Data Link Protocols
AsynchronousProtocols
SynchronousProtocols
Character-oriented(Byte-oriented)
Bit-oriented
• Xmodem• Ymodem• Zmodem• BLAST• Kermit
• BSC
![Page 6: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/6.jpg)
6 of 53
Synchronous Protocols Character-oriented protocol
Based on one byte (8-bit) Use ASCII for control character Not efficient seldom used
Bit-oriented protocol Based on individual bits One or multiple bits for control More efficient
![Page 7: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/7.jpg)
7 of 53
IBM’s Binary Synchronous Communication (BSC) Character-oriented protocol Half-duplex, stop-and-wait ARQ 2 frame types
Data frame (data transmission) Control frame (connect/disconnect and flow/error
control)
![Page 8: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/8.jpg)
8 of 53
A simple BSC data frame
SYN = Synchronous idle = 0010110STX = Start of text = 0000010ETX = End of text = 0000011
![Page 9: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/9.jpg)
9 of 53
A BSC frame with a header
Header Fields:• address (sender/receiver)• #frame identifier (0/1 for stop-and-wait ARQ)
![Page 10: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/10.jpg)
10 of 53
A multiblock frame
ITB = Intermediate text block
![Page 11: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/11.jpg)
11 of 53
Multiframe transmission
ETB = End of transmission Block
![Page 12: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/12.jpg)
12 of 53
Control frame
Note: Control Frame is used to send command * Establish connection * Maintaining flow & error control * terminating connection
![Page 13: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/13.jpg)
13 of 53
Control frames
![Page 14: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/14.jpg)
14 of 53
Control frames
![Page 15: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/15.jpg)
15 of 53
Control frames
![Page 16: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/16.jpg)
16 of 53
Data Transparency BSC is designed for text message Now, non-text message (graphics,
…) Problem?
BSC control character problem Data transparency: should be
able to send any data
![Page 17: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/17.jpg)
17 of 53
Byte stuffing
DLE = data link escape
![Page 18: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/18.jpg)
18 of 53
Data Link Protocols
AsynchronousProtocols
SynchronousProtocols
Character-oriented(Byte-oriented)
Bit-oriented
• Xmodem• Ymodem• Zmodem• BLAST• Kermit
• BSC
![Page 19: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/19.jpg)
19 of 53
Bit-oriented protocol Represent more information into
shorter frame Avoid the transparency problems
![Page 20: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/20.jpg)
Bit-orientedProtocols
SDLC HDLC LAPs LANs
SDLC: Synchronous data link control – IBMHDLC: High-level data link control – ISOLAPs : Link access procedure
![Page 21: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/21.jpg)
21 of 53
HDLC Support half/full – duplex over
point-to-point and multipoint links HDLC system characterization
Station types Configurations Communication modes
Frames
![Page 22: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/22.jpg)
22 of 53
HDLC station types Primary station
The station that controls the medium by sending “command”
Secondary station The station that “response” to the primary
station Combined station
The station that can both command and response
![Page 23: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/23.jpg)
23 of 53
HDLC configurations The relationship of hardware
devices on a link 3 configurations of all stations
(primary/secondary/combined) Unbalanced Symmetrical Balanced
![Page 24: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/24.jpg)
24 of 53
HDLC Configurations: Unbalanced (master/slave)
![Page 25: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/25.jpg)
25 of 53
HDLC Configurations: Symmetrical
![Page 26: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/26.jpg)
26 of 53
HDLC Configurations:Balanced
![Page 27: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/27.jpg)
27 of 53
HDLC communication modes
NRM: Normal response mode (master/slave)
ARM: Asynchronous response mode (secondary can initiate if idle, all transmissions are made to primary station)
ABM: Asynchronous balanced mode (point-to-point equal)
Mode : describe “Who controls the link”
![Page 28: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/28.jpg)
28 of 53
HDLC frame 3 frame types
Information frame (I-frame) Supervisory frame (S-frame)
For ACK, Flow/Error controls Unnumbered frame (U-frame)
For Mode setting, Initialize, Disconnect
![Page 29: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/29.jpg)
29 of 53
HDLC Frame
![Page 30: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/30.jpg)
30 of 53
HDLC Frame
![Page 31: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/31.jpg)
31 of 53
HDLC Frame: Flag field
![Page 32: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/32.jpg)
32 of 53
Bit Stuffing How to differentiate data and flag? Adding one extra 0 whenever there are
five consecutive 1s in the data
![Page 33: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/33.jpg)
33 of 53
HDLC: Bit stuffing
![Page 34: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/34.jpg)
34 of 53
HDLC frame: Address field Primary station creates a frame destination address Secondary station creates a frame source address Can be one byte or more
![Page 35: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/35.jpg)
35 of 53
HDLC Frame: Address field
![Page 36: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/36.jpg)
36 of 53
HDLC Frame: Control field
![Page 37: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/37.jpg)
37 of 53
HDLC frame: Poll / Final
![Page 38: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/38.jpg)
38 of 53
HDLC Frame: Information field
![Page 39: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/39.jpg)
39 of 53
HDLC Frame: FCS field
FCS: Frame check sequence
![Page 40: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/40.jpg)
40 of 53
HDLC: S-Frame
![Page 41: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/41.jpg)
41 of 53
HDLC: Use of P/F field
![Page 42: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/42.jpg)
42 of 53
HDLC: Use of P/F field
Piggybacking: data + ack
![Page 43: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/43.jpg)
43 of 53
HDLC: Use of P/F field
![Page 44: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/44.jpg)
44 of 53
HDLC: Use of P/F field
![Page 45: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/45.jpg)
45 of 53
HDLC: S-FrameAcknowledgement
![Page 46: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/46.jpg)
46 of 53
HDLC: S-Frame Positive Acknowledgement RR
Receiver sends “Positive Ack” (no data to send)
N(R) = seq of next frame RNR
Receiver sends “Positive Ack” N(R) = seq of next frame Receiver tells sender that sender cannot
send any frame until ‘RR’ frame is received
![Page 47: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/47.jpg)
47 of 53
HDLC: S-Frame Negative Acknowledgement
Reject (REJ) Go-back-n ARQ N(R) = # of damage frame (and
follow) Selective-Reject (SREJ)
N(R) = # of damage frame
![Page 48: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/48.jpg)
48 of 53
HDLC: U-Frame control field
For session management and control information
![Page 49: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/49.jpg)
49 of 53
HDLC: U-Frame control field
![Page 50: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/50.jpg)
50 of 53
HDLC: Polling example
![Page 51: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/51.jpg)
51 of 53
HDLC: Selecting example
![Page 52: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/52.jpg)
52 of 53
HDLC: Peer-to-peer example
SABM: Set asynchronous balanced modeUA: Unnumbered ack
![Page 53: Data Link Protocols](https://reader036.fdocuments.in/reader036/viewer/2022081512/56813a0e550346895da1e1e2/html5/thumbnails/53.jpg)
53 of 53
HDLC: Peer-to-peer example