Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Data Transmission and Computer Networks Data Link Control Protocols.

Similar presentations


Presentation on theme: "1 Data Transmission and Computer Networks Data Link Control Protocols."— Presentation transcript:

1 1 Data Transmission and Computer Networks Data Link Control Protocols

2 2 Data Link Protocol Services The user service provided by the data link layer may be either: Best-try (connectionless) service. Reliable (connection-oriented) service.

3 3 Data Link Protocol Services 1. Best-try (connectionless) service: Although error check bits are used to detect errors, any frame that are found to contain transmission errors is simply discarded by the link layer protocol entity. It is referred to as an unacknowledged service and retransmission becomes a function of a higher protocol layer. For example, this is done in applications based on switched networks in which the BER of the retransmission lines is very low and hence the probability of retransmissions is relatively small, such as LANs and ISDNs.

4 4 DTE User software/ higher-layer protocol Data link control layer Data Link Protocol Services 1. Best-try (connectionless) service: L_DATA.request L_DATA.indication L_DATA.request L_DATA.indication

5 5 Data Link Protocol Services 2. Reliable (connection-oriented) service: In connection-oriented service, the data link protocol employs error and flow control procedures to provide reliable service. Therefore, there is a high probability that the data will be error free without duplicates and the frames will be delivered in the same sequence as they were submitted. Prior to sending any information frame, a logical connection is established using the L_CONNECT service. All data is transferred using a suitable retransmission and flow control protocol. Then the logical connection is released using the L_DISCONNECT service.

6 6 2. Reliable (connection-oriented) service: DTE ADTE B User software/ higher-layer protocol Data link control layer User software/ higher-layer protocol Data Link Protocol Services L_CONNECT.request L_CONNECT.indication L_CONNECT.confirm SETUP- frame UA-frame L_DATA.indication L_DATA.request I-frame ACK-frame I-frame L_DATA.request L_DATA.indication L_DISCONNECT.request L_DISCONNECT.indication L_DISCONNECT.confirm DISC- frame UA-frame

7 7 Data Link Protocol Services 2. Reliable (connection-oriented) service: Prior sending any data, the user software/higher-layer protocol of DTE A first sends an L_CONNECT.request service primitive to the data link layer in the DTE A. On receipt of an L_CONNECT.request primitive, using an ECB, the data link protocol entity in the DTE A initializes all state variables and then creates a SETUP-frame. This is sent to peer data link protocol in the DTE B using the selected retransmission mode. On receipt of the SETUP-frame, the DTE B initializes its own state variables and sends an L_CONNECT.indication primitive to user software/higher-layer protocol in the DTE B and an acknowledgement frame back to the DTE A.

8 8 Data Link Protocol Services 2. Reliable (connection-oriented) service: This acknowledgement does not relate to an I-frame, it does not contain a sequence number. It is known, therefore, as an unnumbered acknowledgement or UA-frame.. On receipt of this UA-frame, the data link protocol entity in the DTE A issues the L_CONNECT.confirm primitive to the user software/higher-layer protocol in the DTE A. Now, the data link is ready for the transfer of data using L_DATA service. Finally, after all data has been transferred, the setup link is released using L_DISCONNECT service, which is also confirmed service.The corresponding frame, known as a disconnect or DISC-frame, is acknowledged using a UA-frame.

9 9 Data Link Protocol Application Environments (a) Point-to-point: DTE PSTN = Modem DLP DCE = Communication Subsystem DTE DLP DLP = Data link protocol

10 10 Data Link Protocol Application Environments (b) Multipoint (Multidrop): Supervisory (master) DTE Slave DTEs DLP

11 11 Data Link Protocol Application Environments (c) WANs: X.25 PS network DLP DTE DLP PSE PS = Packet switching PSE = Packet switching element DTE NTE EXCH ISDN DLP EXCH = Switching exchange NTE = Network termination equipment

12 12 Data Link Protocol Application Environments (d) LANs: DTE Shared Bus DLP Ring DTE DLP

13 13 Data Link Control Protocols Data Link Control Protocol Simplex Protocols Example: Kermit Half-Duplex Protocols Example: Binary Synchronous Control (BSC) Duplex Protocols Example: High-level Data Link Control (HDLC)

14 14 Data Link Control Protocol: Kermit Kermit is used for the transfer contents of a specified file or a group of files from one computer to another over a point-to-point data link. The link can be either: A circuit set up through the PSTN using modems. A pair of twisted-pair lines. Characteristics of Kermit: Simplex protocol. Character-oriented synchronous transmission. Idle RQ (stop and wait protocol). Connection-oriented.

15 15 C:\> Data Link Control Protocol: Kermit C:\> KERMIT KERMIT> CONNECT KERMIT> SEND file.txt $> rlogin venus.ksu.edu.sa Login Name: mohammed Password: ****** $> KERMIT KERMIT> CONNECT KERMIT> EXIT KERMIT> RECEIVE C:\> KERMIT> EXIT $> logout

16 16 Source Computer USER Kermit Destination Computer USER Kermit Data Link Control Protocol: Kermit KERMIT CONNECT KERMIT CONNECT RECEIVE SEND [filename] DATA BLOCK [1] SENT DATA BLOCK [1] RECEIVED DATA BLOCK [2] SENT DATA BLOCK [2] RECEIVED DATA BLOCK [N] SENT DATA BLOCK [N] RECEIVED END OF FILE EXIT END OF TRANSMISSION EXIT

17 17 Data Link Control Protocol: Kermit Frame Format: SOH = Marks start of a frame LEN = The number of bytes in the frame following this character up to and including BCC. SEQ = The send sequence number of the frame. TYPE = The type of frame encoded using a single character: S = Send initiation (parameters)B = End of transaction F = FilenameY = Acknowledgement (ACK) D = File dataN = Negative acknowledgement (NAK) Z = End of fileE = Fatal error DATA = Frame Contents BCC = Block check character CR = End of block character (ASCII carriage return) Header SOH LEN SEQ TYPEDATA BCC CR

18 18 Kermit Frame Sequences:

19 19 Data Link Control Protocol: BSC Characteristics of Binary Synchronous Control (BSC): Half-duplex. Character-oriented synchronous transmission. Idle RQ (stop and wait protocol). Connection-oriented. Used primarily in multipoint (multidrop) applications in which there is a single master station which controls all messages transfer to and from a group of slave stations.The slave stations are connected to the master by: Multipoint network: Stations are located in different establishments and modems are being used. Multidrop bus network: All stations are at the same site.

20 20 Data Link Control Protocol: BSC Multidrop Bus Network: Multipoint Network: BSC Bus Networks:

21 21 Data Link Control Protocol: BSC BSC Data Frame Format: SYN SOHIdentifier Station address STXTextETXBCC 1. Single Block Message: 2. Multiblock Message: SYN SOHIdentifier Station address STXTextETBBCC SYN SOHIdentifierSTXTextETBBCC First block: Intermediate block(s): SYN SOHIdentifierSTXTextETXBCC Last block: Identifier = Send sequence number of block

22 22 Data Link Control Protocol: BSC BSC Supervisory Frame Format: SYN EOT Station address P/SENQ 1. Poll/select sequence: SYN ACKSYN NAK0/1SYN ACKSYN NAK0/1SYN EOT 2. Positive select response: 3. Negative select response: 4. Positive acknowledgement for even/odd frames: 5. Negative acknowledgement for even/odd frames : 6. End of transmission/no messages to send:

23 23 Data Link Control Protocol: BSC Transmission Control Characters used with BSC:

24 24 Data Link Control Protocol: BSC Protocol Operation: Master Slave X Slave Y SELECT: (1) Select X (2) Message

25 25 Data Link Control Protocol: BSC Protocol Operation: Slave Y Master Slave X POLL: (1) Poll X (2) Message

26 26 Data Link Control Protocol: BSC BSC Frame Sequences: SELECT:

27 27 Data Link Control Protocol: BSC BSC Frame Sequences: POLL:

28 28 Data Link Control Protocol: BSC User/Link Layer Interaction: SELECT:

29 29 Data Link Control Protocol: BSC POLL: User/Link Layer Interaction:

30 30 Data Link Control Protocol: HDLC Characteristics of High-Level Data Link Control (HDLC): It supports full-duplex. Bit-oriented synchronous transmission. Continuous RQ. Connection-oriented. Used primarily in both point-to-point and multipoint (multidrop) data links.

31 31 Data Link Control Protocol: HDLC HDLC Network Configurations: 1.Unbalanced Configuration: i. Point-to-point with single primary and secondary: ii. Multipoint with single primary and multiple secondaries: Primary Secondary Commands Responses Primary Secondary Commands Responses Secondary Responses

32 32 Data Link Control Protocol: HDLC HDLC Network Configurations: 2. Balanced Configuration: Point-to-point with two primaries and two secondaries. Commands Responses Primary + Secondary Primary + Secondary Commands Responses

33 33 Data Link Control Protocol: HDLC Operational Modes of HDLC: HDLC has three operational modes: 1.Normal Response Mode (NRM): This is used in unbalanced configurations. In this mode, slave stations can transmit only when specifically instructed by the master station. This link may be point-to-point or multipoint. 2.Asynchronous Response Mode (ARM): This is also used in the unbalanced mode configurations. It allows the secondary to initiate a transmission without receiving permission from the primary. This is normally used with point-to-point and duplex links.

34 34 Data Link Control Protocol: HDLC Operational Modes of HDLC: 3. Asynchronous Balanced Mode (ABM): In this mode, each station has an equal status and perform both primary and secondary functions. It is used mainly on duplex point-to- point links for computer to computer communication.

35 35 Data Link Control Protocol: HDLC Frame Formats used in HDLC: Three classes of frames are used in HDLC: 1.Unnumbered Frames: These are used for functions such as link setup and disconnection. They do not contain any acknowledgement information. 2.Information Frames: They carry the actual information and are referred as I-frames. I frames can be used to piggyback acknowledgement information relating to the I- frames in the reverse direction when the link is being operated in ABM or ARM.

36 36 Data Link Control Protocol: HDLC Frame Formats used in HDLC: 3. Supervisory Frames: These are used for error and flow control and hence contain send and receive sequence numbers.

37 37 Data Link Control Protocol: HDLC Frame Formats used in HDLC:

38 38 Data Link Control Protocol: HDLC Control Field:

39 39 Data Link Control Protocol: HDLC Extended Control Field:

40 40 Data Link Control Protocol: HDLC Link Management: NRM Multidrop Link: ABM Point-to-Point Link:

41 41 Data Link Control Protocol: HDLC Data Transfer:

42 42 Data Link Control Protocol: HDLC Data Transfer: First: The Sender: 1. Store I(N(S),V(R)) in the retransmission list. 2. The I(N(S),N(R)) is sent. 3. V(S) = V(S) + 1. Second: The Receiver: When I-frame is received, its N(S) and N(R)) are read. N(S) is compared with the receiver’s V(R). If they are equal, then: 1. The frame is in the correct sequence and is accepted (Go-Back-N). 2. V(R) = V(R) + 1. 3. N(R) is examined and used to acknowledge any outstanding frames in the receiver’s retransmission list. This can be done by removing each I-frame from that list if its N(R) is less than the N(R) of the newly received I-frame.

43 43 Data Link Control Protocol: HDLC Example: Asynchronous Balanced Mode (ABM) configuration is used in HDLC in which a duplex flow of frames is possible. Each node has 3 I-frames to send. Use piggyback acknowledgment procedure and complete the transmitted frames, V(S), V(R), and the retransmission lists of the following graph. Initially, assume that the two retransmission lists are empty.

44 44 HDLC 0 1 1 20 20 2 I(1,0) 12 22 I(2,2) 22 23 32 33 33 33 - 33 33 I(2,1) 10 I(1,0) I(0,0) Primary/Secondary Retransmission list I(0,0) 0 Before After 0 Empty Before After Before After Before After Empty V(S) V(R) 1 00 0 - 0 00 10 0

45 45 I(1,0) HDLC 1 1010 1010 20 2 I(1,0) 12 22 1010 1010 I(2,2) 22 210210 1010 23 210210 32 2121 33 2121 2121 33 33 2121 - empty 33 33 I(2,1) - 0 1010 10 20 1010 1010 20 21 1010 21 210210 31 210210 31 210210 3 22 210210 32 33 2 2 33 33 1010 0 1 20 0 empty - 2 33 33 RR(3)

46 46 I(1,0) HDLC 1 1010 1010 20 2 I(1,0) 12 22 1010 1010 I(2,2) 22 210210 1010 23 210210 32 2121 33 2121 2121 33 33 2121 - empty 33 33 I(2,1) - 0 1010 10 20 1010 1010 20 21 1010 21 210210 31 210210 31 210210 3 22 210210 32 33 2 2 33 33 1010 0 1 20 0 empty - 2 33 33 RR(3)


Download ppt "1 Data Transmission and Computer Networks Data Link Control Protocols."

Similar presentations


Ads by Google