Chapter 3 The Data Link Layer

Slides:



Advertisements
Similar presentations
Chapter 3 The Data Link Layer.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
CIS 725 Data Link Layer. Physical Layer Figure 3-1 B. Forouzan, TCP/IP Protocol Suite.
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
OSI MODEL Maninder Kaur
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
CSC 3352 Computer Communications Chapter 3&41 The Link Layer Has 2 main Components The Data Link Layer Medium Access Control (MAC) Examples:SLIP, PPP,
The OSI Reference Model
Circuit Switching (a) Circuit switching. (b) Packet switching.
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
NETWORKING CONCEPTS. DATA LINK LAYER Data Link Control main functions of the data link layer are Data link control media access control. Data link control.
Presentation on Osi & TCP/IP MODEL
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
Review:. Chapter 3: The Data Link Layer –achieve reliable, efficient communication between two physically connected machines. –Example problems to be.
Data Link Layer : Services, Framing, Error Detection and Correction2.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
The data link layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
The Data Link Layer. Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Error detection.
The Data Link Layer Chapter 3 10/28/2015www.noteshit.com1.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 13.
Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015.
The Data Link Layer Chapter 3 1/21/2016www.ishuchita.com1.
COMPUTER NETWORKS. Unit -2 Continue... Physical Layer Connection –Oriented Networks : X.25 Relay Frames Types of cables Co-axial Fiber optics Twisted.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Data Link Layer Chapter 3.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Data Link Layer Chapter 3.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Computer Networks NYUS FCSIT Spring 2008 Igor TRAJKOVSKI, Ph.D. Associate Professor
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
The Data Link Layer RIS 251 Dr. ir. S.S. Msanjila.
24/11/1013-Datalink1 The Data Link Layer Role Services Functions –Framing –Encapsulation –Addressing –Connection Control –Ordered Delivery –Flow Control.
The Transport Layer Implementation Services Functions Protocols
The University of Adelaide, School of Computer Science
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
The ISO OSI Reference Model
Data link layer (LLC).
Chapter 1 Introduction Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011.
Process-to-Process Delivery, TCP and UDP protocols
CMPT 371 Data Communications and Networking
Data Link Layer What does it do?
Lecture on Data Link Control
Chapter 3 – Part 1 The Data Link Layer.
Data Link Layer: Data Link Control
CCNA 2 v3.1 Module 10 Intermediate TCP/IP
Overview Jaringan Komputer (2)
Net 221D : Computer Networks Fundamentals
Chapter 20 Network Layer: Internet Protocol
Chapter 3 The Data Link Layer.
CS412 Introduction to Computer Networking & Telecommunication
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
The Data Link Layer Chapter
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
EEC-484/584 Computer Networks
UNIT-II The Data Link Layer.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Error Checking continued
Data Link Layer. Position of the data-link layer.
data link Control layer (DLC) – ARQ protocols
Presentation transcript:

Chapter 3 The Data Link Layer Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Regulating data flow Slow receivers not swamped by fast senders Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

DLL Design Overview The goal of the data link layer is to provide reliable, efficient communication between adjacent machines connected by a single communication channel. Specifically: 1. Group the physical layer bit stream into units called frames. Note that frames are nothing more than "packets" or "messages". By convention, we'll use the term "frames" when discussing DLL packets. 2. Sender checksums the frame and transmits checksum together with data. The checksum allows the receiver to determine when a frame has been damaged in transit. 3. Receiver re-computes the checksum and compares it with the received value. If they differ, an error has occurred and the frame is discarded. 4. Perhaps return a positive or negative acknowledgment to the sender. A positive acknowledgment indicate the frame was received without errors, while a negative acknowledgment indicates the opposite. 5. Flow control. Prevent a fast sender from overwhelming a slower receiver. For example, a supercomputer can easily generate data faster than a PC can consume it. 6. In general, provide service to the network layer. The network layer wants to be able to send packets to its neighbors without worrying about the details of getting it there in one piece. At least, the above is what the OSI reference model suggests. As we will see later, not everyone agrees that the data link layer should perform all these tasks. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Functions of the Data Link Layer (2) Relationship between packets and frames. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Services Provided to Network Layer (a) Virtual communication. (b) Actual communication. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

SERVICES PROVIDED TO THE NETWORK LAYER DLL Design SERVICES PROVIDED TO THE NETWORK LAYER Delivery Mechanisms: Connection-Less Connection Oriented Acknowledged UN-Acknowledged “Best Effort” Better Quality Reliable Delivery Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

SERVICES PROVIDED TO THE NETWORK LAYER DLL Design SERVICES PROVIDED TO THE NETWORK LAYER Unacknowledged Connection-less Service -- Best Effort: The receiver does not return acknowledgments to the sender, so the sender has no way of knowing if a frame has been successfully delivered. When would such a service be appropriate? 1. When higher layers can recover from errors with little loss in performance. That is, when errors are so infrequent that there is little to be gained by the data link layer performing the recovery. It is just as easy to have higher layers deal with occasional lost packets. 2. For real-time applications requiring "better never than late" semantics. Old data may be worse than no data. For example, should an airplane bother calculating the proper wing flap angle using old altitude and wind speed data when newer data is already available? Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

SERVICES PROVIDED TO THE NETWORK LAYER DLL Design SERVICES PROVIDED TO THE NETWORK LAYER Acknowledged Connection-less Service -- Acknowledged Delivery: The receiver returns an acknowledgment frame to the sender indicating that a data frame was properly received. The sender keeps connection state, but may not necessarily retransmit unacknowledged frames. Likewise, the receiver may hand received frames to higher layers in the order in which they arrive, regardless of the original sending order. Typically, each frame is assigned a unique sequence number, which the receiver returns in an acknowledgment frame to indicate which frame the ACK refers to. The sender must retransmit unacknowledged (e.g., lost or damaged) frames. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

SERVICES PROVIDED TO THE NETWORK LAYER DLL Design SERVICES PROVIDED TO THE NETWORK LAYER Acknowledged Connection-Oriented Service -- Reliable Delivery: Frames are delivered to the receiver reliably and in the same order as generated by the sender. Connection state keeps track of sending order and which frames require retransmission. For example, receiver state includes which frames have been received, which ones have not, etc. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Services Provided to Network Layer (2) Placement of the data link protocol. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

DLL Design FRAMING The DLL translates the physical layer's raw bit stream into discrete units (messages) called frames. How can frame be transmitted so the receiver can detect frame boundaries? That is, how can the receiver recognize the start and end of a frame? We will discuss four ways: Character Count: Bit Stuffing: Character stuffing: Encoding Violations: Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

DLL Design FRAMING Character Count: Make the first field in the frame's header be the length of the frame. That way the receiver knows how big the current frame is and can determine where the next frame ends. Disadvantage: Receiver loses synchronization when bits become garbled. If the bits in the count become corrupted during transmission, the receiver will think that the frame contains fewer (or more) bits than it actually does. Although checksum will detect the frames are incorrect, the receiver will have difficulty re-synchronizing to the start of a new frame. This technique is not used anymore, since better techniques are available. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

A character stream. (a) Without errors. (b) With one error. Framing A character stream. (a) Without errors. (b) With one error. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

DLL Design FRAMING Character stuffing: Same idea as bit-stuffing, but operates on bytes instead of bits. Use reserved characters to indicate the start and end of a frame. For instance, use the two-character sequence DLE STX (Data-Link Escape, Start of TeXt) to signal the beginning of a frame, and the sequence DLE ETX (End of TeXt) to flag the frame's end. Problem: What happens if the two-character sequence DLE ETX happens to appear in the frame itself? Solution: Use character stuffing within the frame, replace every occurrence of DLE with the two-character sequence DLE DLE. The receiver reverses the process, replacing every occurrence of DLE DLE with a single DLE. Example: If the frame contained "A B DLE D E DLE", the characters transmitted over the channel would be "DLE STX A B DLE DLE D E DLE DLE DLE ETX". Disadvantage: A octet is the smallest unit that can be operated on; not all architectures are 8-bit oriented. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Framing (2) (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing. Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011