Presentation is loading. Please wait.

Presentation is loading. Please wait.

Subject Name: Computer Communication Networks Subject Code: 10EC71

Similar presentations


Presentation on theme: "Subject Name: Computer Communication Networks Subject Code: 10EC71"— Presentation transcript:

1 Subject Name: Computer Communication Networks Subject Code: 10EC71
Prepared By: Kala H S & Megha Gupta Department: ECE Date: 9/19/2018

2 Unit 2 DATA LINK CONTROL 9/19/2018

3 TOPICS TO BE COVERED Framing Flow and Error Control Protocols
Noiseless channels and Noisy Channels HDLC 9/19/2018

4 The two main functions of the data link layer are:
Data Link Control(DLC) : It deals with the design and procedures for communication b/w nodes: node-to-node communication. Media Access Control(MAC): It explain how to share the link. Data Link Control (DLC): Data link control functions includes Framing. Flow Control. Error Control. Above functions are software implemented protocols that provide smooth and reliable transmission of frames between nodes. 9/19/2018

5 Size of the frame is fixed.
Frames of Two Categories (1) Fixed-Size Framing Size of the frame is fixed. In fixed-size framing, there is no need for defining the boundaries of the frames, the size itself can be used as a delimiter. It is used in the ATM wide-area network, which uses frames of fixed size called cells. (2) Variable Size Framing Size of the frame is not fixed. In variable-size framing, we need a way to define the end of the frame and the beginning of the next. It is used in local area networks. Historically, two approaches were used for this purpose: (1) Character-oriented approach (2) Bit-oriented approach. 9/19/2018

6 Character-oriented framing approach/ Character-oriented Protocol
In a character-oriented approach, data to be carried are 8-bit characters from a coding system such as ASCII. The header, which normally carries the source and destination addresses and other control information, and the Trailer which carries error detection or error correction redundant bits, are also multiples of 8 bits. The flag, composed of protocol-dependent special characters, signals the start or end of a frame. Fig. shows the format of a frame in a character-oriented protocol 9/19/2018

7 Starting and ending character with byte stuffing
To fix this problem byte – stuffing was introduced in which a special byte called escape character was stuffed along with data whenever a flag pattern appeared in it. Whenever receiver comes across an escape character it removes it from data and treats next pattern as data. Now if data pattern resembles escape character then the receiver will ignore it. To solve this problem whenever an escape character pattern appears in data an extra escape character is added. Fig. Byte stuffing and unstuffing 9/19/2018

8 Bit-Oriented framing approach/ Bit-oriented protocol
Bit stuffing is the process of adding one extra 0 whenever five consecutive 1’s follow a 0 in the data, so that the receiver does not mistake the pattern for a flag. Figure : A frame in a bit-oriented protocol 9/19/2018

9 FLOW AND ERROR CONTROL 2. Error Control Flow Control
The most important responsibilities of the data link layer are Flow Control Flow Control is a technique for speed matching of transmitter and receiver. Flow control ensures that a transmitting station does not overflow a receiving station with data Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Two types of flow control: Feedback based & Rate based flow control. 2. Error Control Error control is both error detection and error correction. It allows the receiver to inform the sender of any frames lost or damaged in transmission and coordinates the retransmission of those frames by the sender. Error control in the data link layer is based on automatic repeat request (ARQ) which is the retransmission of data. 9/19/2018

10 DATA LINK PROTOCOLS ***
9/19/2018

11 1. Simplest Protocol (unrestricted ideal protocol)
9/19/2018

12 Algorithms for Simplest Protocol
Algorithm shows the procedure at the sender site. 9/19/2018

13 Algorithm shows the procedure at the receiver site.
9/19/2018

14 Example for simplex protocol
Fig. Flow diagram for above Example 9/19/2018

15 Stop-and-Wait Protocol
9/19/2018

16 Algorithms Algorithm Sender-site algorithm for the Stop-and-Wait Protocol 9/19/2018

17 Algorithm Receiver-site algorithm for the Stop-and-Wait Protocol
Algorithms Algorithm shows the procedure at the receiver site. Algorithm Receiver-site algorithm for the Stop-and-Wait Protocol 9/19/2018

18 Example for Stop-and-Wait protocol
Fig. Flow diagram for above Example 9/19/2018

19 DATA LINK PROTOCOLS NOISY CHANNELS
Stop-and-Wait Protocol gives us an idea of how to add flow control. Noiseless channels are nonexistent, hence error occur. We discuss three protocols in this section that use error control. Stop-and-Wait Automatic Repeat Request(ARQ) *** Go-Back-N Automatic Repeat Request (ARQ) *** Selective Repeat Automatic Repeat Request (ARQ) *** 9/19/2018

20 To each frame a field is added which holds the sequence number.
Sequence numbers To each frame a field is added which holds the sequence number. Since we want frame size to be small, we must choose minimum size for the sequence number. If we decide that the field is m bits long, the sequence numbers start from 0, go to 2m – 1. Let us assume we have used sequence number x then we only need x+1 and not x+2. To show this, assume sender has sent a frame with number x. There are 3 possibilities: 1.The frame arrives safe and sound at the receiver site; the receiver sends an acknowledgment. The acknowledgment arrives at the sender site, causing the sender to send the next frame numbered x+1. 2.The frame arrives safe and sound at the receiver site; the receiver sends an acknowledgment, but the acknowledgment is corrupted or lost. The sender resends the frame x after the time-out. Note that the frame here is a duplicate. The receiver can recognize this fact because it expects frame x+1 but frame x was received. 3.The frame is corrupted or never arrives at the receiver site; the sender resends the frame x after the time-out. 9/19/2018

21 Acknowledgement numbers
The acknowledgment numbers always announce the sequence number of the next frame expected by the receiver. For example, if frame 0 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 1 (meaning frame 1 is expected next). If frame 1 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 0 (meaning frame 0 is expected). 9/19/2018

22 Stop-and-Wait ARQ (Automatic Repeat reQuest) protocol
Design ( Figure shows Design of the Stop-and-Wait ARQ Protocol ) 9/19/2018

23 Algorithm :Sender-site algorithm for Stop-and-Wait ARQ
9/19/2018

24 Algorithm : Receiver-site algorithm for Stop-and-Wait ARQ Protocol
9/19/2018

25 Example 9/19/2018

26 Advantages of Stop-and-Wait ARQ It can be used for noisy channels
It has both error and flow control mechanism It has timer implementation Disadvantages of Stop-and-Wait ARQ Efficiency is very less. Only 1 frame is sent at a time Timer should be set for each individual frame No pipelining sender window size is 1( disadvantage over Go back N ARQ) receiver window size is 1( disadvantage over selective repeat ARQ) 9/19/2018

27 Go-Back-N Automatic Repeat reQuest
Concept Introduce a window of size n Can inject n packets into net before hearing an ACK Sliding window Sliding window is an abstract concept that defines the range of sequence numbers that is the concern of the sender and receiver. The sender and receiver need to deal with only part of the possible sequence numbers. Label each packet with a sequence number A window is a collection of adjacent sequence numbers The range which is the concern of the sender is called the send sliding window The range that is the concern of the receiver is called the receive sliding window. 9/19/2018

28 Fig. Send window for Go-Back-N ARQ
9/19/2018

29 Fig. Receive window for Go-Back-N ARQ
9/19/2018

30 Design of Go-Back-N ARQ
9/19/2018

31 Figure 6 Window size for Go-Back-N ARQ
Send Window Size In Go-Back-N ARQ, the size of the send window must be less than 2m ; the size of the receiver window is always 1. Figure 6 Window size for Go-Back-N ARQ 9/19/2018

32 Go-Back-N sender algorithm)
9/19/2018

33 Algorithms : Go-Back-N receiver algorithm
9/19/2018

34 Example ( Fig. Flow diagram for Example)
9/19/2018

35 Example ( Figure Flow diagram for Example)
9/19/2018

36 The sender can send many frames at a time.
Advantages: The sender can send many frames at a time. Timer can be set for a group of frames. Only one ACK can acknowledge one or more frames. Efficiency is more. Waiting time is pretty low. We can alter the size of the sender window Disadvantages: This protocol is very inefficient for a noisy link. Buffer requirement Transmitter needs to store the last N packets Scheme is inefficient when round-trip delay large and data transmission rate is high Retransmission of many error-free packets following an erroneous packet When RTT is large: for a high number of NACK, a lot of BW is wasted If NACK is lost , a long time is wasted until re-transmission of all packets (until another NACK is sent). 9/19/2018

37 Selective Repeat Automatic Repeat Request Type Of Windows
Figure Send window for Selective Repeat ARQ Figure Receive window for Selective Repeat ARQ 9/19/2018

38 Design of Selective Repeat ARQ
9/19/2018

39 Figure Selective Repeat ARQ, window size
In Selective Repeat ARQ, the size of the sender and receiver window must be at most one half of 2m 9/19/2018

40 Algorithms: Sender-site Selective Repeat algorithm
9/19/2018

41 Algorithms: Sender-site Selective Repeat algorithm (continued)
9/19/2018

42 Algorithms: Sender-site Selective Repeat algorithm (continued)
9/19/2018

43 Algorithm : Receiver-site Selective Repeat algorithm
9/19/2018

44 Algorithm : Receiver-site Selective Repeat algorithm (continued)
9/19/2018

45 Flow diagram for Example
9/19/2018

46 Fig. Design of piggybacking in Go-Back-N ARQ
9/19/2018

47 COMPARISON CHART PROTOCOL:- GO-BACK-N STOP AND WAIT SELECTIVE REPEAT
Bandwidth utilization Medium Low High Maximum sender Size Window 2^m-1 N.A 2^(m-1) Maximum receiver 1 Pipelining Implemented Not Implemented Out of order Frames Discarded Accepted Cumulative ACK Applicable NAK 9/19/2018

48 HDLC (High-Level Data Link Control )
INTRODUCTION : Old and still heavily used protocol. It is a classical bit-oriented protocol for communication over point-to-point and multipoint links. It implements the ARQ mechanisms. This protocol based on some principles. All are bit oriented. All uses bit stuffing for data transferency. HDLC is Mother of many LAN and WAN DLC protocols. 9/19/2018

49 Normal response mode (NRM)
9/19/2018

50 Asynchronous balanced mode (ABM):
Used with balanced configurations. Balanced: two combined stations. Either side may send data at any time. 9/19/2018

51 Frame Check Sequence (FCS) Field. Ending Flag Field.
HDLC Frames Description *** Each frame in HDLC may contain up to six fields, as shown in Figure below a beginning Flag Field. Address Field. Control Field. Information Field. Frame Check Sequence (FCS) Field. Ending Flag Field. In multiple-frame transmissions, the ending flag of one frame can serve as the beginning flag of the next frame. 9/19/2018

52 Control Field for different frame types
HDLC Frame format Control Field for different frame types The control field determines the type of frame and defines its functionality. The format is specific for the type of frame, as shown in Figure below Figure : Control field format for the different frame types 9/19/2018

53 Example Figure shown below explain how U-frames can be used for connection establishment and connection release. Node A asks for a connection with a set asynchronous balanced mode (SABM) frame; node B gives a positive response with an unnumbered acknowledgment (UA) frame. After these two exchanges, data can be transferred between the two nodes (not shown in the figure). After data transfer, node A sends a DISC (disconnect) frame to release the connection; it is confirmed by node B responding with a UA (unnumbered acknowledgment). Example of connection and disconnection 9/19/2018

54 Acknowledgement : MY SINCERE THANKS TO By Kala H S & Megha Gupta
THE AUTHOR PROF.BEHROUZ A FOROUZAN. BECAUSE THE ABOVE PRESENTATION MATERIALS ARE HEAVILY BORROWED FROM HIS TEXTBOOK “DATA COMMUNICATION & NETWORKING” 4TH EDITION, PUBLISHER TATA MCGRAW HILL SURESHA V. PROFESSOR, DEPT. OF E&C, KVG COLLEGE OF ENGINEERING. SULLIA, D.K By Kala H S & Megha Gupta Assistant Professor 9/19/2018


Download ppt "Subject Name: Computer Communication Networks Subject Code: 10EC71"

Similar presentations


Ads by Google