Introduction to Data Communications & Networking

Similar documents
Chapter 11 Data Link Control 11.1

Chapter 11 Data Link Control 11.1

Chapter 11 Data Link Control 11.1

Data Link Layer Lecture 7

Jaringan Komputer. Data Link Layer. The Data Link Layer. Study the design principles

DATA LINK LAYER UNIT 7.

Chapter 3. The Data Link Layer

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

The Data Link Layer Chapter 3

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Data Link Layer. Indian Institute of Technology Madras

CS422 Computer Networks

Networking Link Layer

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

Outline. EEC-484/584 Computer Networks. Data Link Layer Design Issues. Framing. Lecture 6. Wenbing Zhao Review.

06/05/2008. Chapter 3. The Data Link Layer. Data Link Layer Design Issues. Services Provided to the Network Layer. Error Control Flow Control

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

Chapter 3. The Data Link Layer

Inst: Chris Davison

COMPUTER NETWORKS UNIT-3

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

Data Link Layer (1) Networked Systems 3 Lecture 6

Where we are in the Course

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

Lecture / The Data Link Layer: Framing and Error Detection

The Data Link Layer Chapter 3

CS 4453 Computer Networks Winter

PART III. Data Link Layer MGH T MGH C I 204

Comparison of ISO-OSI and TCP/IP Suit. Functions of Data Link Layer:

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

ECE 4450:427/527 - Computer Networks Spring 2017

Introduction to Computer Networks. 03 Data Link Layer Introduction

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

Advantages and disadvantages

1.Write about the Data Link layer design issues.

Lecture 5: Data Link Layer Basics

Data Link Layer Overview

Direct Link Networks. Framing. Lecture - Encoding & Framing 1. Problems. Areas for Discussion

CSE123A discussion session

Lesson Schedule: Class No. Portion covered per hour (An estimate)

Packet/Frame, Error Detection How to send data efficiently & reliably?

CSCI-1680 Link Layer I Rodrigo Fonseca

Data Link Layer Overview

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

Data Link Layer Overview

5th Slide Set Computer Networks

Data Link Layer: Overview, operations

Data Link Control CHAPTER 11. Solutions to Review Questions and Exercises. Review Questions

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

UNIT-II 1. Discuss the issues in the data link layer. Answer:

Chapter 5 Data-Link Layer: Wired Networks

1999, Scott F. Midkiff

Analyzation of Automatic Repeat Request (ARQ) Protocols

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

Networking Technologies and Applications

The MAC Address Format

CSE 123: Computer Networks

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. Link Layer. Fundamentals of Communication Networks

Data Link Layer Overview

INF Data Communication Data Link Layer

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

UNIT II THE DATA LINK LAYER DESIGN ISSUES

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Links. CS125 - mylinks 1 1/22/14

Chapter 8 OSI Physical Layer

The Data Link Layer. Data Link Layer Design Issues

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Where we are in the Course

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Data Link Control Protocols

The flow of data must not be allowed to overwhelm the receiver

Introduction to Computer Networks

Data Link Layer. Srinidhi Varadarajan

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Data Link Control Layer, Error Detection, Error Correction, and Framing

1.Describe the layer presentation in the TCPIP model and explain the protocol of each layer. July 2014/Jan 2015

Unit 2.

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

CCNA Exploration1 Chapter 7: OSI Data Link Layer

Data Link Protocols. High Level Data. Control Protocol. HDLC Framing ~~~~~~~~ Functions of a Data Link Protocol. Framing PDUs. Addressing Destination

Physical and Data Link layers

infrared Disadvantage: 1. cannot use for long-range communication or outside a building due to sun s rays.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS

UNIT IV -- TRANSPORT LAYER

Frequency: it refers to the number of periods in 1 s. It is formally expressed in Hertz (Hz)

Lecture 26: Data Link Layer

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

Chapter 3 The Data Link Layer

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

Lecture 2: Links and Signaling

Transcription:

Introduction to Data Communications & Networking Data Link Layer (Set 5) Chapter 10 and Chapter 11 Dr. Ali Maqousi, Dr. Tatiana Balikhina amaqousi@uop.edu.jo, tbalikhina@uop.edu.jo Department of Computer Networks Faculty of Information Technology Petra University Dr. Maquosi & Dr. Balikhina 1

Data Link Layer The need for Data Link layer 1) Communication circuits make errors occasionally. 2) Communication circuits have a limited date rate. Dr. Maquosi & Dr. Balikhina 2

The two main functions of the data link layer are data link control and media access control. Data Link Layer The first, data link control, deals with the design and procedures for communication between two adjacent nodes: node-to-node communication. The second function of the data link layer is media access control, or how to share the link (MAC sublayer). We discuss MAC in the Set 6. Dr. Maquosi & Dr. Balikhina 3

Services Provided to Network Layer(1) Framing (a) Virtual communication. (b) Actual communication. Dr. Maquosi & Dr. Balikhina 4

Services Provided to Network Layer (2) Framing Placement of the data link protocol. Dr. Maquosi & Dr. Balikhina 5

Functions performed on Data Link Control are: 1- Framing 2- Flow Control 3- Error Control 4- Error Detection & Correction Data Link Layer Dr. Maquosi & Dr. Balikhina 6

The transmitted bit stream by the physical layer is not guaranteed to be error free. It is up to the data link layer to detect, and if necessary, to correct errors. The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. The data link layer breaks the bit stream up into discrete frames and compute the checksum for each frame. When a frame arrives at the destination, the checksum is recomputed. Framing Dr. Maquosi & Dr. Balikhina 7

Framing Sending machine Receiving machine Packet Packet Frame Header Payload field Trailer Header Payload field Trailer Relationship between packets and frames Dr. Maquosi & Dr. Balikhina 8

The easiest way to achieve framing is to insert time gaps between frames. Networks rarely make any guarantees about timing. Other Framing Methods are: 1) Character count. 2) Flag bytes with byte stuffing 3) Flags with bit stuffing Framing Dr. Maquosi & Dr. Balikhina 9

Framing Frames can be of fixed or variable size. In fixed-size framing, there is no need for defining the boundaries of the frames; the size itself can be used as a delimiter. Variable-size framing, prevalent in local area networks. In variable-size framing, we need a way to define the end of the frame and the beginning of the next. Historically, two approaches were used for this purpose: a character-oriented (byte) approach and a bit-oriented approach. Dr. Maquosi & Dr. Balikhina 10

Framing Character count framing uses a field in the header to specify the number of characters in the frame. Character count 4 1 2 3 6 1 2 3 4 5 2 1 Frame 1 4 Characters Frame 2 6 Characters Frame 3 2Characters Dr. Maquosi & Dr. Balikhina 11

Framing The problem with Character count algorithm is that the count can be distorted by a transmission error. Error 4 1 2 3 8 1 2 3 4 5 2 1 Frame 1 4 Characters Frame 2 (wrong) 6 Characters Frame 3 Dr. Maquosi & Dr. Balikhina 12

Framing In variable-size framing character-oriented (byte) approach data to be carried are 8-bit characters. This method uses in each frame start and end special bytes (Flag byte). - Flag bytes used as a delimiters. A Frame delimited by flag bytes Dr. Maquosi & Dr. Balikhina 13

Framing - Aproblem occurs with this method when binary data are being transmitted. It may easily happen that the flag byte s bit pattern occurs in the data. - one way to solve this problem is to have the sender s data link layer insert a special escape byte (ESC) just before each accidental flag byte in the data. - this technique is called byte stuffing or character stuffing. Dr. Maquosi & Dr. Balikhina 14

Framing Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text. Dr. Maquosi & Dr. Balikhina 15

Framing The byte-stuffing scheme with a slight simplification is used in the PPP (point-topoint) protocol. Today, millions of Internet users who need to connect their home computers to the server of an Internet service provider use PPP. - A major disadvantage of this framing method is that it is closely tied to the use of 8- bit characters. Dr. Maquosi & Dr. Balikhina 16

Framing The universal coding systems in use today, such as Unicode, have 16-bit and 32-bit characters that conflict with 8-bit characters. We can say that in general, the tendency is moving toward the bitoriented protocols. Dr. Maquosi & Dr. Balikhina 17

Framing This flag can create the same type of problem we saw in the byte-oriented protocols. That is, if the flag pattern appears in the data, we need to somehow inform the receiver that this is not the end of the frame. We do this by stuffing 1 single bit (instead of 1 byte) to prevent the pattern from looking like a flag. This process is called bit stuffing adds one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. Dr. Maquosi & Dr. Balikhina 18

Framing Bit stuffing and unstuffing Dr. Maquosi & Dr. Balikhina 19

Error Control - Error Control is needed to make sure all frames are eventually delivered to the network layer at the destination and in the proper order. - The technique of acknowledgment and retransmission is used to ensure reliable delivery. - This can be achieved by using timer and assigning sequence number for each frame. Dr. Maquosi & Dr. Balikhina 20

Flow control - Flow Control is needed to deal with the situation when the sender is running on a fast computer and the receiver is running on a slow machine. - The sender keeps transmitting the frames out at a higher rate until the receiver is completely swamped (flooded). - At a certain point the receiver will simply be unable to cope with the frames as they arrive, and will start to lose them. Dr. Maquosi & Dr. Balikhina 21

Flow control There are two approaches for flow control: 1) Feedback-based flow control, where the receiver sends back information to the sender giving it permission to send more data. 2) Rate-based flow control, where there is a rate limit at which senders may transmit data, without using feedback from the receiver. Dr. Maquosi & Dr. Balikhina 22

Error detection and correction In a single-bit error, only 1 bit in the data unit has changed. Dr. Maquosi & Dr. Balikhina 23

Error detection and correction A burst error means that 2 or more bits in the data unit have changed. Dr. Maquosi & Dr. Balikhina 24

Error detection and correction To detect or correct errors, we need to send extra (redundant) bits with data. The correction of errors is more difficult than the detection. - In error detection, we are looking only to see if any error has occurred. - In error correction, we need to know the exact number of bits that are corrupted and more importantly, their location in the message. Dr. Maquosi & Dr. Balikhina 25

The structure of encoder and decoder Error detection and correction Dr. Maquosi & Dr. Balikhina 26

Error detection and correction Two basic strategies to deal with errors: 1) Error-correcting codes, includes enough redundant information with each sent data, to enable receiver to deduce what the transmitted data must have been. 2) Error-detecting codes, includes only enough information to allow the receiver to deduce that an error occurred, but not which error, and have it request a retransmission. Dr. Maquosi & Dr. Balikhina 27

Error detection and correction - The simplest error-detection scheme is a Parity Check. - In this scheme a single parity bit is appended to the data. - The parity bit is chosen so that the number of 1 bits in the code is even (or odd). Dr. Maquosi & Dr. Balikhina 28

Error detection and correction A code for error detection An error-detecting code can detect only the types of errors for which it is designed; other types of errors may remain undetected. Dr. Maquosi & Dr. Balikhina 29

Error detection and correction E=f(DATA) Transmitter DATA DATA E E, E = Error-detecting codes Receiver DATA E f = Error-detecting code function E =f(data) Dr. Maquosi & Dr. Balikhina 30 Compare

Error detection and correction - Error-detection and retransmission is efficient where error rate is low (over copper wire or optical fiber). - With wireless links, where unacceptable delay caused by repetitive retransmissions Error-correction is more suitable. Dr. Maquosi & Dr. Balikhina 31

Protocols Now let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages. To make our discussions language-free, we have written in pseudocode a version of each protocol that concentrates mostly on the procedure instead of delving into the details of language rules. Dr. Maquosi & Dr. Balikhina 32

Protocols Noiseless channel is an ideal channel in which no frames are lost, duplicated, or corrupted. We discuss protocols for noiseless channel: 1) Simplest Protocol 2) Stop-and-Wait Protocol Dr. Maquosi & Dr. Balikhina 33

Protocols Simplest Protocol is one that has no flow or error control. Dr. Maquosi & Dr. Balikhina 34

Protocols Sender-site algorithm for the simplest protocol Dr. Maquosi & Dr. Balikhina 35

Protocols Receiver-site algorithm for the simplest protocol Dr. Maquosi & Dr. Balikhina 36

Protocols Next slide shows an example of communication using this protocol. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame. Dr. Maquosi & Dr. Balikhina 37

Protocols Dr. Maquosi & Dr. Balikhina 38

Protocols Stop-and-Wait Protocol adds flow control to Simplest protocol. To be able to send a new frame sender waits for permission from receiver - ACK frame (acknowledgement). ACK acknowledgment. NAK negative acknowledgment. Dr. Maquosi & Dr. Balikhina 39

Design of Stop-and-Wait Protocol Dr. Maquosi & Dr. Balikhina 40

Sender-site algorithm for Stop-and-Wait Protocol Dr. Maquosi & Dr. Balikhina 41

Receiver-site algorithm for Stop-and-Wait Protocol Stop-and-Wait Dr. Maquosi & Dr. Balikhina 42

Protocols Next slide shows an example of communication using Stop-and-Wait protocol. It is still very simple. The sender sends one frame and waits for feedback from the receiver. When the ACK arrives, the sender sends the next frame. Note that sending two frames in the protocol involves the sender in four events and the receiver in two events. Dr. Maquosi & Dr. Balikhina 43

Protocols Dr. Maquosi & Dr. Balikhina 44