Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม

Similar presentations


Presentation on theme: "Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม"— Presentation transcript:

1 Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม
Asst.Prof. Anan Phonphoem, Ph.D. Computer Engineering Department Kasetsart University, Bangkok, Thailand Protocol: set of rules or specifications used to implement one or more layers of the OSI model Data Link Protocol: a set of specifications used to implement data link layer rules –> line discipline, flow control, and error handling

2 Data Link Protocols Asynchronous Protocols Synchronous Protocols
Xmodem Ymodem Zmodem BLAST Kermit Asynchronous: treat each character in a bit stream independently Synchronous: take whole bit stream and chop it into characters of equal size Character-oriented Bit-oriented

3 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

4 XMODEM frame Half-duplex, stop-and-wait ARQ protocol
1979: designed for FTP via telephone-line between PCs SOH: Start of Header TX  start by sending NAK (from receiver) Sender must wait for ACK before sending next frame Half-duplex, stop-and-wait ARQ protocol

5 Data Link Protocols Asynchronous Protocols Synchronous Protocols
Xmodem Ymodem Zmodem BLAST Kermit Ymodem  data unit changes to 1024 bytes (Xmodem=128) use CRC16 multiple files accepted Zmodem  combination of X and Ymodem BLAST (Blocked Asynchronous Transmission)  better than Xmodem (full-duplex, sliding window flow conrol) Kermit (Columbia U)  most widely used asyn. Protocol (operation same as Xmodem) Character-oriented (Byte-oriented) Bit-oriented BSC

6 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 Speed  better than asynchronous

7 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)

8 A simple BSC data frame SYN = Synchronous idle = 0010110
SYN : Alert the receiver for the incoming frame BCC : can be LRC (longitudinal redundancy check) or CRC (cyclic redundancy check) This simple frame is seldom used SYN = Synchronous idle = STX = Start of text = ETX = End of text =

9 A BSC frame with a header
Header Fields: address (sender/receiver) #frame identifier (0/1 for stop-and-wait ARQ) SOH: start of Header

10 A multiblock frame ITB = Intermediate text block
Probability of error: Frame size increases, error increases  multiple faults occurs  Difficult to detect errors (error cancel each others)  Message is divided in several blocks  Each block has STX, ITB and BCC  Ending with ETX (end of text)  Error detected, whole frame is discarded (needs retransmission)  ACK for entire frame  one frame is entire message ITB = Intermediate text block

11 Multiframe transmission
“Large Message” is broken down to multiple frame  need ETB (End of transmission Block)  need ETX (End of text)  Half-duplex so ACK 0 and ACK 1 alternately ETB = End of transmission Block

12 Control frame Note: Control Frame is used to send command
Control frame  not control character Note: Control Frame is used to send command * Establish connection * Maintaining flow & error control * terminating connection

13 Control frames

14 Control frames

15 Control frames

16 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

17 Byte stuffing DLE = data link escape Byte Stuffing 2 activities:
- Defining the transparent text region with DLE - Preceding any DLE character within the transparent region (extra DLE) Problem still exist if text = DLE ?  Insert an addition DLE next to the character (DLE DLE) DLE = data link escape

18 Data Link Protocols Asynchronous Protocols Synchronous Protocols Xmodem Ymodem Zmodem BLAST Kermit Character-oriented (Byte-oriented) Bit-oriented BSC

19 Bit-oriented protocol
Represent more information into shorter frame Avoid the transparency problems

20 Bit-oriented Protocols
SDLC HDLC LAPs LANs SDLC: Synchronous data link control – IBM HDLC: High-level data link control – ISO LAPs : Link access procedure Most of the bit-oriented protocols are proprietary Most famous  HDLC

21 HDLC Support half/full – duplex over point-to-point and multipoint links HDLC system characterization Station types Configurations Communication modes Frames

22 HDLC station types Primary station Secondary station Combined 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

23 HDLC configurations The relationship of hardware devices on a link
3 configurations of all stations (primary/secondary/combined) Unbalanced Symmetrical Balanced

24 HDLC Configurations: Unbalanced (master/slave)
Can be point-to-point (for 2 devices) or multipoint

25 HDLC Configurations: Symmetrical

26 HDLC Configurations: Balanced
Only point-to-point

27 HDLC communication modes
Mode : describe “Who controls the link” 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) ARM: need to communicate through the Primary (even for secondary to secondary primary)

28 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

29 HDLC Frame

30 HDLC Frame

31 HDLC Frame: Flag field Flag:  beginning and ending of a frame
 Last flag can be the start of the next flag Flag  similar to “Control Character”  problem for transparency !!!  Bit Stuffing

32 Bit Stuffing How to differentiate data and flag?
Adding one extra 0 whenever there are five consecutive 1s in the data

33 HDLC: Bit stuffing TX more than 5 consecutives “1”  insert (stuffs) one redundant bit “0” after the fifth “1” Example:  No Matter that the sixth bit is one or not ! 3-Exceptional: 1. it’s really a Flag (6 consecutive “1”) 2. Tx is being aborted (7-14 consecutive “1”) 3. Channel is in Idle state (>= 15 consecutive “1)

34 HDLC frame: Address field
Primary station creates a frame  destination address Secondary station creates a frame  source address Can be one byte or more

35 HDLC Frame: Address field
One byte = 128 stations (one bit is used for another purpose) Large network needs multiple byte address

36 HDLC Frame: Control field
N(R)  can be think as “ACK” if correct  N(R) = next frame seq else  N(R) = number of damaged frame (need reTx) In S-Frame  not transmit data, so do not need N(S)  S-Frame for response (return N(R) ) Code  flow and error control information

37 HDLC frame: Poll / Final
P/F: dual purposes 1) P/F = 0 no meaning (regular data) 2) P/F = 1 means “poll” when send by primary P/F = 1 means “final” when send by secondary

38 HDLC Frame: Information field

39 HDLC Frame: FCS field FCS: Frame check sequence

40 HDLC: S-Frame

41 HDLC: Use of P/F field

42 HDLC: Use of P/F field Piggybacking: data + ack

43 HDLC: Use of P/F field

44 HDLC: Use of P/F field

45 HDLC: S-Frame Acknowledgement

46 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” Receiver tells sender that sender cannot send any frame until ‘RR’ frame is received

47 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

48 HDLC: U-Frame control field
For session management and control information

49 HDLC: U-Frame control field
SNRM : set normal response mode DISC: Disconnect

50 HDLC: Polling example

51 HDLC: Selecting example

52 HDLC: Peer-to-peer example
SABM: Set asynchronous balanced mode UA: Unnumbered ack

53 HDLC: Peer-to-peer example


Download ppt "Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม"

Similar presentations


Ads by Google