Data Link Protocols Prof Choong Seon HONG Kyung

  • Slides: 71
Download presentation
Data Link Protocols Prof. Choong Seon HONG Kyung Hee University 1

Data Link Protocols Prof. Choong Seon HONG Kyung Hee University 1

11장 Data Link Protocols 11. 1 Asynchronous protocol 11. 2 Synchronous protocol 11. 3

11장 Data Link Protocols 11. 1 Asynchronous protocol 11. 2 Synchronous protocol 11. 3 Character-Oriented protocol 11. 4 Bit-Oriented protocol Kyung Hee University 2

Introduction q. Data Link Protocol : a set of specifications used to implementation of

Introduction q. Data Link Protocol : a set of specifications used to implementation of the data link layer v Protocol : referring to a set of rules or conventions for executing a particular task. Kyung Hee University 3

Introduction (cont’d) q. Data Link Protocol v Asynchronous protocols ~ treat each character in

Introduction (cont’d) q. Data Link Protocol v Asynchronous protocols ~ treat each character in a bit stream independently v Synchronous protocols ~ take the whole bit stream and chop it into characters of equal size Kyung Hee University 4

11. 1 Asynchronous protocols q Asynchronous protocols, used primarily in modems, feature start and

11. 1 Asynchronous protocols q Asynchronous protocols, used primarily in modems, feature start and stop bits and variable length gabs between characters v not complex v inexpensive to implement v data unit is transmitted with no timing coordination between sender and receiver Kyung Hee University 5

Asynchronous protocol(cont’d) q. Xmodem v Ward christiansen designed a file transfer protocol for telephone-line

Asynchronous protocol(cont’d) q. Xmodem v Ward christiansen designed a file transfer protocol for telephone-line communication between PCs (1979) v half-duplex stop-and-wait ARQ protocol Kyung Hee University 6

Asynchronous protocol(cont’d) q. XMODEM frame Sequence number (carrying frame number) Used for checking the

Asynchronous protocol(cont’d) q. XMODEM frame Sequence number (carrying frame number) Used for checking the validity of the sequence number SOH : Start of Header Kyung Hee University 7

Asynchronous protocol(cont’d) q XMODEM frame v SOH(start of Header) : 1 byte v Header

Asynchronous protocol(cont’d) q XMODEM frame v SOH(start of Header) : 1 byte v Header : 2 bytes (as sequence number and for checking the validity of sequence number) v Data (Binary, ASCII, Boolean, Text, etc. ) : 128 bytes v CRC : check for error in the data field Kyung Hee University 8

Asynchronous protocol(cont’d) q XMODEM frame (cont’d) v. Transmission begins with the sending of a

Asynchronous protocol(cont’d) q XMODEM frame (cont’d) v. Transmission begins with the sending of a NAK frame from the receiver to the sender. l Then, sender sends a frame l If seder receives ACK, sends next a frame l l l If it receives NAK, the previously sent frame is retransmitted A frame can also be resent if a response is not received by the sender after a specified amount of time. Besides a NAK or an ACK, the sender can receive a cancel signal (CAN), which aborts the transmission. Kyung Hee University 9

Asynchronous protocol(cont’d) q YMODEM ~ is a protocol similar to XMODEM - major differences

Asynchronous protocol(cont’d) q YMODEM ~ is a protocol similar to XMODEM - major differences v data unit is 1024 bytes v Two CANs are sent to abort a transmission v ITU-T CRC-16 is used for error checking v Multiple files can be sent simultaneously Kyung Hee University 10

Asynchronous protocol (cont’d) q ZMODEM v is a newer protocol combining features of both

Asynchronous protocol (cont’d) q ZMODEM v is a newer protocol combining features of both XMODEM and YMODEM q BLAST(Blocked Asynchronous Transmission) v is full-duplex with sliding window flow control v is more powerful than XMODEM Kyung Hee University 11

Asynchronous protocol (cont’d) q. Kermit v file transfer protocol : similar in operation to

Asynchronous protocol (cont’d) q. Kermit v file transfer protocol : similar in operation to XMODEM v is designed at Columbia University v is the most widely used asynchronous protocol Kyung Hee University 12

11. 2 Synchronous protocol q To be used for LAN, MAN, WAN Kyung Hee

11. 2 Synchronous protocol q To be used for LAN, MAN, WAN Kyung Hee University 13

Synchronous protocol(cont’d) q Character-oriented protocol (also called byte-oriented protocols) v frame or packet is

Synchronous protocol(cont’d) q Character-oriented protocol (also called byte-oriented protocols) v frame or packet is interpreted as a series of characters q Bit-oriented protocol v frame or packet is interpreted as a series of bits Kyung Hee University 14

11. 3 Character-Oriented protocols q are not as efficient as bit-oriented protocols and therefore

11. 3 Character-Oriented protocols q are not as efficient as bit-oriented protocols and therefore are now seldom used q a popular protocol : BSC(Binary synchronous communication) by IBM Kyung Hee University 15

Character-Oriented protocol(cont’d) q. BSC(Binary Synchronous Communication) v is developed by IBM in 1964 v

Character-Oriented protocol(cont’d) q. BSC(Binary Synchronous Communication) v is developed by IBM in 1964 v is usable in both point-to-point and multipoint configuration v supports half-duplex transmission using stop-and-wait ARQ flow control and error correction v does not support full-duplex transmission or sliding window protocol Kyung Hee University 16

Character-Oriented protocol(cont’d) q. Control character for BSC Character ACK 0 ACK 1 DLE ENQ

Character-Oriented protocol(cont’d) q. Control character for BSC Character ACK 0 ACK 1 DLE ENQ EOT ETB ETX ITB NAK NUL RVI SOH STX SYN TTD WACK ASCII Code DLE and 0 DLE and 1 DLE ENQ EOT ETB ETX US NAK NULL DLE and < SOH STX SYN STX and ENQ DLE and ; Kyung Hee University Function Good even frame received or ready to receive Good odd frame received Data transparency maker Request for a response Sender terminating End of transmission block; ACK required End of text in a message End of intermediate block in a multiblock transmission Bad frame received nothing to send Filler character Urgent message from receiver Header information begins Text begins Alerts receiver to incoming frame Sender is pausing but not relinquishing the line Good frame received but not ready to receive more 17

Character-Oriented protocol(cont’d) q. ASCII codes v whatever the system, not all control characters can

Character-Oriented protocol(cont’d) q. ASCII codes v whatever the system, not all control characters can be represented by a single character. Often they must be represented by two or three characters Kyung Hee University 18

Character-Oriented protocol(cont’d) q. BSC frame Kyung Hee University 19

Character-Oriented protocol(cont’d) q. BSC frame Kyung Hee University 19

Character-Oriented protocol(cont’d) q Data frame Direction of Transmission SYN : 0010110 as ASCII Usually,

Character-Oriented protocol(cont’d) q Data frame Direction of Transmission SYN : 0010110 as ASCII Usually, 00010110 (adding 0 at eighth bit) Kyung Hee University 20

Character-Oriented protocol(cont’d) q. Header field Sender address, receiver address, and frame ID Kyung Hee

Character-Oriented protocol(cont’d) q. Header field Sender address, receiver address, and frame ID Kyung Hee University 21

Character-Oriented protocol(cont’d) q. Multiblock Frame vtext in a message is often divided between several

Character-Oriented protocol(cont’d) q. Multiblock Frame vtext in a message is often divided between several blocks v The receiver sends a single acknowledgment for the entire frame ITB (Intermediate Text Block) Kyung Hee University 22

Character-Oriented protocol(cont’d) q. Multiframe Transmission Kyung Hee University ETB (End of Transmission Block) 23

Character-Oriented protocol(cont’d) q. Multiframe Transmission Kyung Hee University ETB (End of Transmission Block) 23

Character-Oriented protocol(cont’d) q. Control Frame ~ is used by one device to send commands

Character-Oriented protocol(cont’d) q. Control Frame ~ is used by one device to send commands to, or solicit information from, another device Kyung Hee University 24

Character-Oriented protocol(cont’d) q. Control Frames serve three purpose v establishing connections v maintaining flow

Character-Oriented protocol(cont’d) q. Control Frames serve three purpose v establishing connections v maintaining flow and error control during data transmission v terminating connection Kyung Hee University 25

Character-Oriented protocol(cont’d) q. Control Frame(1) Kyung Hee University 26

Character-Oriented protocol(cont’d) q. Control Frame(1) Kyung Hee University 26

Character-Oriented protocol(cont’d) q. Control Frame(2) Kyung Hee University 27

Character-Oriented protocol(cont’d) q. Control Frame(2) Kyung Hee University 27

Character-Oriented protocol(cont’d) q. Control Frame(3) Kyung Hee University 28

Character-Oriented protocol(cont’d) q. Control Frame(3) Kyung Hee University 28

Character-Oriented protocol(cont’d) q. Data Transparency v Confusion between control information and data is called

Character-Oriented protocol(cont’d) q. Data Transparency v Confusion between control information and data is called a lack of data transparency v means we should be able to send any combination of bits as data (byte stuffing) For example, ETX : 0000011 as DATA DLE : Data Link Escape Kyung Hee University 29

11. 4 Bit-Oriented protocol q can pack more information into shorter frames and avoid

11. 4 Bit-Oriented protocol q can pack more information into shorter frames and avoid the transparency problem of character-oriented protocol Kyung Hee University 30

Bit-Oriented protocol(cont’d) q SDLC(Synchronous Data Link Control) v developed by IBM in 1975 q

Bit-Oriented protocol(cont’d) q SDLC(Synchronous Data Link Control) v developed by IBM in 1975 q HDLC(High-Level Data Link Control) v developed by ISO in 1979 q LAPs (LAPB, LAPD, LAPM, LAPX, etc) v developed by ITU-T since 1981 v based on HDLC q PPP, frame relay v developed by ITU-T and ANSI v based on HDLC Kyung Hee University 31

Bit-Oriented protocol - HDLC (cont’d) q. HDLC v All bit-oriented protocols are related to

Bit-Oriented protocol - HDLC (cont’d) q. HDLC v All bit-oriented protocols are related to high-level data link control(HDLC), which published by ISO. v HDLC supports both half-duplex and full-duplex modes in point-to-point and multipoint configurations v HDLC can be characterized by their station types, their configurations, and their response modes Kyung Hee University 32

Bit-Oriented protocol - HDLC (cont’d) q. Station Types v primary : send commands v

Bit-Oriented protocol - HDLC (cont’d) q. Station Types v primary : send commands v secondary : send response v combined : send command response Kyung Hee University 33

Bit-Oriented protocol - HDLC (cont’d) q. Configurations v refer to the relationship of hardware

Bit-Oriented protocol - HDLC (cont’d) q. Configurations v refer to the relationship of hardware devices on a link v. Point-to-point or point-to-multipoint Master/slave configuration Kyung Hee University 34

Bit-Oriented protocol - HDLC (cont’d) q. Like an unbalanced mode except that control of

Bit-Oriented protocol - HDLC (cont’d) q. Like an unbalanced mode except that control of the link can shift between the two stations Kyung Hee University 35

Bit-Oriented protocol - HDLC (cont’d) q. HDLC does not support balanced multipoint. This necessitated

Bit-Oriented protocol - HDLC (cont’d) q. HDLC does not support balanced multipoint. This necessitated the invention of media access protocols for LANs Kyung Hee University 36

Bit-Oriented protocol - HDLC (cont’d) q A mode in HDLC is the relationship between

Bit-Oriented protocol - HDLC (cont’d) q A mode in HDLC is the relationship between two devices involved in an exchange; The mode of communication describes who controls the link q HDLC supports three modes of communication between stations v. NRM(Normal Response Mode) v. ARM(Asynchronous Response Mode) v. ABM(Asynchronous Balanced Mode) Kyung Hee University 37

Bit-Oriented protocol - HDLC (cont’d) q. NRM(Normal Response Mode) v refers to the standard

Bit-Oriented protocol - HDLC (cont’d) q. NRM(Normal Response Mode) v refers to the standard primary-secondary relationship v secondary device must have permission from the primary device before transmitting Kyung Hee University 38

Bit-Oriented protocol - HDLC (cont’d) q. ARM(Asynchronous Response Mode) vsecondary may initiate a transmission

Bit-Oriented protocol - HDLC (cont’d) q. ARM(Asynchronous Response Mode) vsecondary may initiate a transmission without permission from the primary whenever the channel is idle vdoes not alter the primary-secondary relationship in any other way v. All transmission from a secondary (even to another secondary on the same link) must still be made to the primary for relay to a final destination. Kyung Hee University 39

Bit-Oriented protocol - HDLC (cont’d) q. ABM(Asynchronous Balanced Mode) vall stations are equal and

Bit-Oriented protocol - HDLC (cont’d) q. ABM(Asynchronous Balanced Mode) vall stations are equal and therefore only combined stations connected in point-to-point are used v. Either combined station may initiate transmission with the other combined station without permission Kyung Hee University 40

Bit-Oriented protocol - HDLC (cont’d) q. HDLC modes Kyung Hee University 41

Bit-Oriented protocol - HDLC (cont’d) q. HDLC modes Kyung Hee University 41

Bit-Oriented protocol - HDLC (cont’d) q. Frame v. I (Information) Frame l used to

Bit-Oriented protocol - HDLC (cont’d) q. Frame v. I (Information) Frame l used to transport user data and control information relating to user data v. S (Supervisory) Frame l used to only to transport control information, primarily data link layer flow and error controls v. U (Unnumbered) Frame l l is reserved for system management Information carried by U-frame is intended for managing the link itself Kyung Hee University 42

Bit-Oriented protocol - HDLC (cont’d) q. HDLC Frame types Kyung Hee University 43

Bit-Oriented protocol - HDLC (cont’d) q. HDLC Frame types Kyung Hee University 43

Bit-Oriented protocol - HDLC (cont’d) q. Frame may contain up to six fields vbeginning

Bit-Oriented protocol - HDLC (cont’d) q. Frame may contain up to six fields vbeginning flag vaddress vcontrol vinformation v. FCS(Frame Check Sequence) v. Ending flag Kyung Hee University 44

Bit-Oriented protocol - HDLC (cont’d) q. Flag Field serves as a synchronization pattern for

Bit-Oriented protocol - HDLC (cont’d) q. Flag Field serves as a synchronization pattern for the receiver Kyung Hee University 45

Bit-Oriented protocol - HDLC (cont’d) q. Bit stuffing v the process of adding one

Bit-Oriented protocol - HDLC (cont’d) q. Bit stuffing v the process of adding one extra 0 whenever there are five consecutive 1 s in the data so that the receiver does not mistake the data for flag ex) 01111000 --> 011111000 Kyung Hee University 46

Bit-Oriented protocol - HDLC (cont’d) q Bit stuffing (cont’d) Kyung Hee University 47

Bit-Oriented protocol - HDLC (cont’d) q Bit stuffing (cont’d) Kyung Hee University 47

Bit-Oriented protocol - HDLC (cont’d) q. Bit Stuffing in HDLC (at the receiver side)

Bit-Oriented protocol - HDLC (cont’d) q. Bit Stuffing in HDLC (at the receiver side) Kyung Hee University 48

Bit-Oriented protocol - HDLC (cont’d) q. Address Field ~ contains the address of the

Bit-Oriented protocol - HDLC (cont’d) q. Address Field ~ contains the address of the secondary station that is either the originator or destination of the frame Kyung Hee University 49

Bit-Oriented protocol(cont’d) q. Control field Kyung Hee University 50

Bit-Oriented protocol(cont’d) q. Control field Kyung Hee University 50

Bit-Oriented protocol(cont’d) q. Control field (extended mode) Kyung Hee University 51

Bit-Oriented protocol(cont’d) q. Control field (extended mode) Kyung Hee University 51

Bit-Oriented protocol(cont’d) q. Poll/Final field in HDLC Kyung Hee University 52

Bit-Oriented protocol(cont’d) q. Poll/Final field in HDLC Kyung Hee University 52

Bit-Oriented protocol(cont’d) q. Information field Kyung Hee University 53

Bit-Oriented protocol(cont’d) q. Information field Kyung Hee University 53

Bit-Oriented protocol(cont’d) q. Piggybacking ~ means combining data to be sent and acknowledgment of

Bit-Oriented protocol(cont’d) q. Piggybacking ~ means combining data to be sent and acknowledgment of the frame received in one single frame Kyung Hee University 54

Bit-Oriented protocol(cont’d) q. FCS field Kyung Hee University 55

Bit-Oriented protocol(cont’d) q. FCS field Kyung Hee University 55

Bit-Oriented protocol(cont’d) q. More about Frames vs-frame ~ is used for acknowledgment, flow control,

Bit-Oriented protocol(cont’d) q. More about Frames vs-frame ~ is used for acknowledgment, flow control, and error control Kyung Hee University 56

Bit-Oriented protocol(cont’d) q RR(Receive Ready) v ACK Ø Ø Used by a receiving station

Bit-Oriented protocol(cont’d) q RR(Receive Ready) v ACK Ø Ø Used by a receiving station to return a positive acknowledgment N (R) field having 3 bits (up to 8 frames) v Poll Ø When transmitted by primary with P/F bit set, RR asks if it has anything to send. v Negative response to poll Ø RR tells primary that secondary has nothing to send. If the secondary does have data to transmit, it responds to poll with an I -frame, not an S-frame v Positive response to select Ø When a secondary is able to receive a transmission from the primary Kyung Hee University 57

Bit-Oriented protocol(cont’d) q. RNR(Receive Net Ready) v. ACK l RNR returned by a receiver

Bit-Oriented protocol(cont’d) q. RNR(Receive Net Ready) v. ACK l RNR returned by a receiver to a sending station acknowledges receipt of all frames up to, but no including , the fame indicated in the N(R) field v. Select l When a primary wishes to transmit data to a specific secondary, it alerts the secondary by sending an RNR frame with the P/F (used as P) set. v. Negative response to select l When a selected secondary is unable to receive data, it returns an RNR. Kyung Hee University 58

Bit-Oriented protocol(cont’d) q. REJ(Reject) v the negative acknowledgment returned by a receiver in a

Bit-Oriented protocol(cont’d) q. REJ(Reject) v the negative acknowledgment returned by a receiver in a go-back-n ARQ error correction system v In an REJ frame, the N(R) field contains the number of the damaged frame q. SREJ(Selective-reject) v the negative acknowledgment returned by a receiver in a selective-reject ARQ error correction system Kyung Hee University 59

Bit-Oriented protocol(cont’d) q. Use of P/F bit in polling and selection Kyung Hee University

Bit-Oriented protocol(cont’d) q. Use of P/F bit in polling and selection Kyung Hee University 60

Bit-Oriented protocol(cont’d) q. U-Frame ~ is used to exchange session management and control information

Bit-Oriented protocol(cont’d) q. U-Frame ~ is used to exchange session management and control information between connected devices Kyung Hee University 61

Bit-Oriented protocol(cont’d) Kyung Hee University 62

Bit-Oriented protocol(cont’d) Kyung Hee University 62

Bit-Oriented protocol(cont’d) q. U-Frame control command response Command/ response SNRME SARME SABME UP UI

Bit-Oriented protocol(cont’d) q. U-Frame control command response Command/ response SNRME SARME SABME UP UI UA RD DISC DM RIM SIM RSET XID FRMR Kyung Hee University Meaning Set normal response mode(extended) Set asynchronous balanced mode(extended) Unnumbered poll Unnumbered information Unnumbered acknowledgement Request disconnect Disconnect mode Request information mode Set initialization mode Reset Exchange ID Frame reject 63

Bit-Oriented protocol(cont’d) q U-Frame ~ can be divided into five basic functional category v

Bit-Oriented protocol(cont’d) q U-Frame ~ can be divided into five basic functional category v Mode setting commands l l are sent by the primary station, or by a combined station wishing to control an exchange, to establish the mode of the session(table 11. 2) SNRM, SNRME, SARME, SABME v Unnumbered-Exchange l l are used to send or solicit specific pieces of data link information between device (table 11. 2) UP, UI, UA v Disconnection : RD, DISC, DM v Initialization Mode : RIM, SIM v Miscellaneous : RESET, XID, FRMR Kyung Hee University 64

Bit-Oriented protocol(cont’d) q. Example 1 : Poll/Response Kyung Hee University 65

Bit-Oriented protocol(cont’d) q. Example 1 : Poll/Response Kyung Hee University 65

Bit-Oriented protocol(cont’d) q. Example 2 : Select/Response Kyung Hee University 66

Bit-Oriented protocol(cont’d) q. Example 2 : Select/Response Kyung Hee University 66

Bit-Oriented protocol(cont’d) q. Example 3 : Peer Devices(1) v Showing asynchronous balanced mode (ABM)

Bit-Oriented protocol(cont’d) q. Example 3 : Peer Devices(1) v Showing asynchronous balanced mode (ABM) using piggybacked acknowledgments Kyung Hee University 67

Bit-Oriented protocol(cont’d) q. Example 3 : Peer Devices(2) Kyung Hee University 68

Bit-Oriented protocol(cont’d) q. Example 3 : Peer Devices(2) Kyung Hee University 68

Bit-Oriented protocol(cont’d) q. Example 4 : Peer Devices(1) Kyung Hee University 69

Bit-Oriented protocol(cont’d) q. Example 4 : Peer Devices(1) Kyung Hee University 69

Bit-Oriented protocol(cont’d) q Example 4 : Peer Devices(2) Kyung Hee University 70

Bit-Oriented protocol(cont’d) q Example 4 : Peer Devices(2) Kyung Hee University 70

Bit-Oriented protocol(cont’d) q. LAP(Link Access Procedure) v. LAPB(Link Access Procedure Balanced) ~ provides those

Bit-Oriented protocol(cont’d) q. LAP(Link Access Procedure) v. LAPB(Link Access Procedure Balanced) ~ provides those basic control function required for communication between a DTE and a DCE ~ is used only in balanced configuration of two devices ~ is used in ISDN on B channels v. LAPD(Link Access Procedure for D channel) ~ used in ISDN ~ use ABM(Asynchronous Balanced Mode) v. LAPM(Link Access Procedure for Modem) ~ is designed to do asynchronous-synchronous conversation, error detection, and retransmission ~ has become developed to apply HDLC feature to modem Kyung Hee University 71