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

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

Chapter 10 Error Detection and Correction 10.1

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

Ch. 7 Error Detection and Correction

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

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

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

CMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.

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.

CS321: Computer Networks Error Detection and Correction

CS254 Network Technologies. Lecture 2: Network Models & Error Detection and Correction. Dr Nikos Antonopoulos

CSE 123: Computer Networks

DATA LINK LAYER UNIT 7.

Error Correction and Detection using Cyclic Redundancy Check

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

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

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

CSN Telecommunications. 5: Error Coding. Data, Audio, Video and Images Prof Bill Buchanan

Data Link Layer. Srinidhi Varadarajan

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

Chapter 3. The Data Link Layer

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

(Refer Slide Time: 2:20)

Inst: Chris Davison

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

LECTURE #34. Data Communication (CS601)

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 2 Data Representation in Computer Systems

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Introduction to Computer Networks. 03 Data Link Layer Introduction

Implementing CRCCs. Introduction. in Altera Devices

EE 6900: FAULT-TOLERANT COMPUTING SYSTEMS

Fault Tolerance & Reliability CDA Chapter 2 Additional Interesting Codes

CS 4453 Computer Networks Winter

CSE 123A Computer Networks

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

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

CSCI-1680 Link Layer I Rodrigo Fonseca

CSE 123: Computer Networks

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

4. Error correction and link control. Contents

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

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

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

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

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

Computer and Network Security

Lecture / The Data Link Layer: Framing and Error Detection

Networking Link Layer

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Some portions courtesy Robin Kravets and Steve Lumetta

COMPUTER NETWORKS UNIT-3

FAULT TOLERANT SYSTEMS

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING B.E. ECE UNIT I DATA COMMUNICATION PART A

CSE 461: Framing, Error Detection and Correction

Layer 2 functionality bridging and switching

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

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Achieving Reliable Digital Data Communication through Mathematical Algebraic Coding Techniques

Expected Time: 90 min PART-A Max Marks: 42

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

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

Lecture 2 Error Detection & Correction. Types of Errors Detection Correction

The Data Link Layer Chapter 3

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

The Data Link Layer Chapter 3

MODULE: NETWORKS MODULE CODE: CAN1102C. Duration: 2 Hours 15 Mins. Instructions to Candidates:

Error Detection and Correction

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

UNIT I FUNDAMENTALS & LINK LAYER

T325 Summary T305 T325 B BLOCK 4 T325. Session 3. Dr. Saatchi, Seyed Mohsen. Prepared by:

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

Chapter 5 Data-Link Layer: Wired Networks

Announcement. (CSC-3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. Seung-Jong Park (Jay)

1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

CS422 Computer Networks

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

CSCI-1680 Link Layer Reliability John Jannotti

CSE123A discussion session

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

Chapter 2. Data Representation in Computer Systems

Telecom Systems Chae Y. Lee. Contents. Flow Control Error Detection/Correction Link Control (Error Control) Link Performance (Utility)

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

Faculty of Science Final Examination. Computer Science B Basics of Computer Networks

COSC 6377 Mid-Term #2 Fall 2000

Data Link Layer: Overview, operations

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

Introduction to Data Communications & Networking

Data and Computer Communications. Protocols and Architecture

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

CompSci 356: Computer Network Architectures. Lecture 4: Link layer: Encoding, Framing, and Error Detection Ref. Chap 2.2, 2.3,2.4

CSEP 561 Error detection & correction. David Wetherall

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

Framing, Synchronization, and Error Detection

Lecture 6 Datalink Framing, Switching. From Signals to Packets

From Signals to Packets Computer Networking. Link Layer: Implementation. Datalink Functions. Lecture 5 - Coding and Error Control

Data Link Layer Overview

Transcription:

UNIT-II 1. Discuss the issues in the data link layer. Answer: Data Link Layer Design Issues: The data link layer has a number of specific functions it can carry out. These functions include 1. Providing a well-defined service interface to the network layer. 2. Dealing with transmission errors. 3. Regulating the flow of data so that slow receivers are not swamped by fast senders. To accomplish these goals, the data link layer takes the packets it gets from the network layer and encapsulates them into frames for transmission. Each frame contains a frame header, a payload field for holding the packet, and a frame trailer, as illustrated in Fig.1. Frame management forms the heart of what the data link layer does. In fact, in many networks, these functions are found only in the upper layers and not in the datalink layer. However, no matter where they are found, the principles are pretty much the same, so it does not really matter where we study them. In the data link layer they often show up in their simplest and purest forms, making this a good place to examine them. 2. Suppose we want to transmit the message 11001001 and protect it from errors using the CRC polynomial x 3 + 1. Use polynomial long division to determine the message that should be transmitted. Answer:

3. Discuss the principle of stop and wait flow control algorithm. Draw time line diagrams and explain how loss of a frame and loss of an ACK are handled. What is the effect of delay-bandwidth product on link utilization? Answer:

4. Assume that a frame consists of 6 characters encoded in 7-it ASCII. Attach a parity bit for every character to maintain even parity. Also attach a similar parity bit for each bit position across each of the bytes in the frame. Show that such a 2-dimensional parity scheme can detect all 1-bit, 2-bit and 3-bit errors and can correct a single bit error. 5. Explain the following Error Detection Mechanisms. (i) Cyclic Redundancy Check. (ii) Discuss briefly about link level flow control. 6. List the three main functions performed by the data link layer of the ISO OSI model. Answer : Data link layer is most reliable node to node delivery of data. It forms frames from the packets that are received from network layer and gives it to physical layer. It also synchronizes the information which is to be transmitted over the data. Error controlling is easily done. The encoded data are then passed to physical. Error detection bits are used by the data link layer. It also corrects the errors. Outgoing messages are assembled into frames. Then the system waits for the acknowledgements to be received after the transmission. It is reliable to send message. 1. Framing: Frames are the streams of bits received from the network layer into manageable data units. This division of stream of bits is done by Data Link Layer. 2. Physical Addressing: The Data Link layer adds a header to the frame in order to define physical address of the sender or receiver of the frame, if the frames are to be distributed to different systems on the network. 3. Flow Control: A flow control mechanism to avoid a fast transmitter from running a slow receiver by buffering the extra bit is provided by flow control. This prevents traffic jam at the receiver side. 4. Error Control: Error control is achieved by adding a trailer at the end of the frame. Duplication of frames are also prevented by using this mechanism. Data Link Layers adds mechanism to prevent duplication of frames. 5. Access Control: Protocols of this layer determine which of the devices has control over the link at any given time, when two or more devices are connected to the same link.

7. State which layers of the ISO OSI model does the following interconnecting devices operate. (1) Repeaters (2) Bridges (3) Routers (4) Gateways 8. What is cyclic code and explain Cyclic Redundancy Check (CRC) code? Answer: Cyclic codes in Error Detection and Correction Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a code word is cyclically shifted (rotated), the result is another code word. For example, if 1011000 is a code word and we cyclically left-shift, then 0110001 is also a code word. In this case, if we call the bits in the first word a0 to a6 and the bits in the second word b0 to b6, we can shift the bits by using the following: b1=a0 b2=a1 b3=a2 b4=a3 b5=a4 b6=a5 b0=a6 Cyclic Redundancy Check: One of the categories of cyclic codes called the cyclic redundancy check (CRC) that is used in networks such as LANs and WANs. The following table shows an example of a CRC code which shows both the linear and cyclic properties of this code. In the encoder, the data word has k bits (4 here); the code word has n bits (7 here). The size of the data word is augmented by adding n - k (3 here) 0s to the right-hand side of the word. The n- bit result is fed into the generator. The generator uses a divisor of size n - k + I (4 here), predefined and agreed upon. The generator divides the augmented Data word by the divisor (modulo-2 division). The quotient of the

division is discarded; the remainder (r2r1r0) is appended to the data word to create the code word. The decoder receives the possibly corrupted code word. A copy of all n bits is fed to the checker which is a replica of the generator. The remainder produced by the checker is a syndrome of n - k (3 here) bits, which is fed to the decision logic analyzer. The analyzer has a simple function. If the syndrome bits are all 0s, the 4 leftmost bits of the code word are accepted as the data word (interpreted as no error); otherwise, the 4 bits are discarded (error). Encoder: The process of modulo-2 binary division is the same as the familiar division process for decimal numbers. In each step, a copy of the divisor is XORed with the 4 bits of the dividend. The result of the XOR operation (remainder) is 3 bits (in this case), which is used for the next step after 1 extra bit is pulled down to make it 4 bits long. There is one important point we need to remember in this type of division. If the leftmost bit of the dividend (or the part used in each step) is 0, the step cannot use the regular divisor; we need to use an all-0s divisor. When there are no bits left to pull down, we have a result. The 3-bit remainder forms the check bits (r2, r1 and r0). They are appended to the data word to create the code word.

Decoder: The code word can change during transmission. The decoder does the same division process as the encoder. The remainder of the division is the syndrome. If the syndrome is all 0s, there is no error; the data word is separated from the received code word and accepted. Otherwise, everything is discarded. Consider the following figure which shows two cases: The left hand figure shows the value of syndrome when no error has occurred; the syndrome is 000. The righthand part of the figure shows the case in which there is one single error. The syndrome is not all 0s (it is 011). For example, consider the following figure where the encoder takes the data word and augments it with n - k number of 0s. It then divides the augmented data word by the divisor. 9. What is meant by linear Block Code and explain Simple Parity-Check Code? Answer: Simple Parity Check Code Linear Block Codes: A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid code words creates another valid code word. The scheme in the above table is a linear block code because the result of XORing any code word with any other code word is a valid code word. For example, the XORing of the second and third code words creates the fourth one. Minimum Distance for Linear Block Codes:

It is simple to find the minimum Hamming distance for a linear block code. The minimum Hamming distance is the number of 1s in the nonzero valid code word with the smallest number of 1s. In the above table the numbers of 1s in the nonzero code words are 2, 2, and 2. So the minimum Hamming distance is dmin =2. Simple Parity-Check Code: The simple parity-check code is the most familiar error-detecting code. In this code, a k-bit data word is changed to an n-bit code word where n = k + 1. The extra bit, called the parity bit, is selected to make the total number of 1s in the code word even. Although some implementations specify an odd number of 1s. The minimum Hamming distance for this category is dmin =2, which means that the code is a single-bit error-detecting code and it cannot correct any error. The following figure shows possible structure of an encoder (at the sender) and a decoder (at the receiver). The encoder uses a generator that takes a copy of a 4-bit data word (a0, a1, a2 and a3) and generates a parity bit r0. The data word bits and the parity bit create the 5-bit code word. The parity bit that is added makes the number of 1s in the code word even. This is normally done by adding the 4 bits of the data word (modulo-2). r0=a3+a2+a1+a0 (modulo-2) The result is the parity bit. In other words, If the number of 1s is even, the result is 0; if the number of 1s is odd, the result is 1.In both cases, the total number of 1s in the code word is even.

The sender sends the code word which may be corrupted during transmission. The receiver receives a 5-bit word. The checker at the receiver does the same thing as the generator in the sender with one exception: The addition is done over all 5 bits. s0=b3+b2+b1+b0+ q0 (modulo-2) The result, which is called the syndrome, is just 1 bit. The syndrome is 0 when the number of 1s in the received code word is even; otherwise, it is 1. The syndrome is passed to the decision logic analyzer. If the syndrome is 0, there is no error in the received code word, the data portion of the received code word is accepted as the data word, if the syndrome is 1, the data portion of the received code word is discarded. The data word is not created. For example, the sender sends the data word 1011. The code word created from this data word is 10111, which is sent to the receiver. We examine five cases: 1. No error occurs; the received code word is 10111. The syndrome is 0. The data word 1011 is created. 2. One single-bit error changes a1. The received code word is 10011. The syndrome is 1. No data word is created. 3. One single-bit error changes r0. The received code word is 10110. The syndrome is 1. No data word is created. Note that although none of the data word bits are corrupted, no data word is created because the code is not sophisticated enough to show the position of the corrupted bit. 4. An error changes r0 and a second error changes a3. The received code word is 00110. The syndrome is O. The data word 0011 is created at the receiver. Note that here the data word is wrongly created due to the syndrome value. The simple parity-check decoder cannot detect an even number of errors. The errors cancel each other out and give the syndrome a value of O. 5. Three bits-a3, a2, and a1-are changed by errors. The received code word is 01011. The syndrome is 1. The data word is not created. This shows that the simple parity check, guaranteed to detect one single error, can also find any odd number of errors. A better approach is the two-dimensional parity check. In this method, the data word is organized in a table (rows and columns). In the following figure, the data to be sent, five 7-bit bytes, are put in separate rows. For each row and each column, 1 parity-check bit is calculated. The whole table is then sent to the receiver, which finds the syndrome for each row and each column. As shown in the figure, the two-dimensional parity check can detect up to three errors that occur anywhere in the table (arrows point to the locations of the created nonzero syndromes). However, errors affecting 4 bits may not be detected.