CS 453 Computer Networks Lecture 9 Layer 2 – Data Link Layer.

Slides:



Advertisements
Similar presentations
Why to learn OSI reference Model? The answer is too simple that It tells us that how communication takes place between computers on internet but how??
Advertisements

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
5/15/2015© 2008 Raymond P. Jefferis IIILect The Data Link Layer.
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,
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
The OSI Reference Model
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
The OSI Model A layered framework for the design of network systems that allows communication across all types of computer systems regardless of their.
Presentation on Osi & TCP/IP MODEL
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
Huda AL_Omairl - Network 71 Protocols and Network Software.
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
The OSI Model.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
TOBB ETÜ ELE46/ELE563 Communications Networks Lecture 01 May 6, 2014 Fall 2011 Tuesday 10:30 – 12:20 (310) Thursday 15:30 – 17:20 (372) İsrafil Bahçeci.
Transmission Control Protocol
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Chapter 3 THE DATA LINK LAYER
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Computer Networks Chapter 11 – Data Link Control and Protocols.
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.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
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.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 13.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
CS 453 Computer Networks Lecture 9 Layer 2 – Data Link Layer.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Error/Flow Control Modeling (ARQ Modeling). © Tallal Elshabrawy 2 Data Link Layer  Data Link Layer provides a service for Network Layer (transfer of.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
COMPUTER NETWORKS. Unit -2 Continue... Physical Layer Connection –Oriented Networks : X.25 Relay Frames Types of cables Co-axial Fiber optics Twisted.
Data Link Layer. Data link layer The communication between two machines that can directly communicate with each other. Basic property – If bit A is sent.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Data Link Layer Chapter 3.
Transmission Modes. Asynchronous Connections A type of connection defined at the data link layer To transmit data from sender to receiver, an asynchronous.
TCP/IP Protocol Suite Suresh Kr Sharma 1 The OSI Model and the TCP/IP Protocol Suite Established in 1947, the International Standards Organization (ISO)
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
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,
Data Link Control. The two main functions of the data link layer are data link control and media access control. The first, data link control, deals with.
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.
Computer Communication & Networks
Data Link Layer.
Data link layer (LLC).
Where we are in the Course
Chapter 3 The Data Link Layer
Data Link Layer What does it do?
Data Link Layer: Data Link Control
Overview Jaringan Komputer (2)
Chapter 3 The Data Link Layer.
CS412 Introduction to Computer Networking & Telecommunication
EEC-484/584 Computer Networks
Objectives of Today’s Lecture
Objectives of Today’s Lecture
UNIT-II The Data Link Layer.
ملاحظة: الكلام المسطر + الرسومات ذات السهم الاحمر*مهمة للمذاكرة
Error Checking continued
Data Link Layer. Position of the data-link layer.
Presentation transcript:

CS 453 Computer Networks Lecture 9 Layer 2 – Data Link Layer

Topics Introduction to the Data Link Layer Data Link Layer functionality Data Link Layer functionality Data framing Data framing Error correction and detection Error correction and detection Flow control Flow control

Remember Layer 1 In the Physical layer we were concerned with Physical connectivity – wires, fiber, lasers, etc. Physical connectivity – wires, fiber, lasers, etc. Pushing bit – causing bits to traverse the physical medium Pushing bit – causing bits to traverse the physical medium So, is that enough

Remembering Layer 1 Obviously, No. While we can build a physical infrastructure, we still have a number of problems Given a stream of incoming bit, how do we know where a given parcel of data starts and stops Given a stream of incoming bit, how do we know where a given parcel of data starts and stops How do we detect errors in the bit stream How do we detect errors in the bit stream What do we do about errors if we detect them What do we do about errors if we detect them …and other issues …and other issues

Data Link Layer While Layer 1 is responsible for delivering bit… Layer 2 – Data Link Layer – is, generally speaking, responsible for delivering bit streams… In some recognizable/usable form In some recognizable/usable form … and relatively cleanly … and relatively cleanly Layer 2 – to establish a logical channel that is “wirelike”

Data Link Layer On the source end of the link, the data link layer takes data from the network layer takes data from the network layer Packages it for “shipping” Packages it for “shipping” Hands it off to the physical layer for transmission Hands it off to the physical layer for transmission On the receiving end, the data link layer takes the incoming data from the physical layer takes the incoming data from the physical layer Checks it for errors Checks it for errors “Unpackages” it “Unpackages” it Hands it off to the network layer on the receiving machine Hands it off to the network layer on the receiving machine

Data Link Layer Data Link Layer functions Provide services to the Network Layer and the Physical Layer Provide services to the Network Layer and the Physical Layer Provide a service interface to the Network Layer and Physical Layer Provide a service interface to the Network Layer and Physical Layer Handle data errors Handle data errors Manage data traffic flow Manage data traffic flow

Data Link Layer Usually responsible for media access control (MAC) If you have a shared media how does a send/receiver get access and use of the media If you have a shared media how does a send/receiver get access and use of the media In competition with other senders/receivers In competition with other senders/receivers Can’t be done in a free-for-all fashion Can’t be done in a free-for-all fashion Must be arbitrated in an orderly manner Must be arbitrated in an orderly manner

Data Link Layer Data Link Layer services Unacknowledged connectionless service Unacknowledged connectionless service Data transmitted toward receiver No steps to establish connection (logical channel) No steps to establish connection (logical channel) No acknowledgement from receiver No acknowledgement from receiver If errors or lost frames – sender never knows If errors or lost frames – sender never knows Maybe good for low error media Real-time data transmission Can’t retransmit – late data can’t be used, better to drop the frame Can’t retransmit – late data can’t be used, better to drop the frame Sort of like sending a letter in regular mail No inherent acknowledgment No inherent acknowledgment

Data Link Layer Data Link Layer services Acknowledged connectionless service Acknowledged connectionless service No connection (logical channel) established between sender and receiver, but After transmission receiver sends an acknowledgement – received-good or received- bad If received-bad can retransmit If received-bad can retransmit Sort of like registered mail – return receipt

Data Link Layer Flow control Acknowledged Connect-oriented service Acknowledged Connect-oriented service Connection between sender and receiver before data transmission started (logical channel or logical circuit) All transmissions acknowledged Wide area network (WAN) links Sort of like a phone call or a fax transmission Sort of like a phone call or a fax transmission

Data Link Layer Flow control Note in acknowledged services we said Note in acknowledged services we said That the receive can send a received-good or a received-bad acknowledgement, but… That the receive can send a received-good or a received-bad acknowledgement, but… What if the sender never receives an acknowledgement? What if the sender never receives an acknowledgement? If sender is stuck waiting for an acknowledgement, but the acknowledgement is lost, all communications is deadlocked If sender is stuck waiting for an acknowledgement, but the acknowledgement is lost, all communications is deadlocked Solution: sender sets clock on each transmitted frame Solution: sender sets clock on each transmitted frame If now acknowledgement when clock runs out – Time-out error

Data Link Layer Framing In the physical layer we have bits flowing from one machine, across a physical transmission medium and pouring into another machine In the physical layer we have bits flowing from one machine, across a physical transmission medium and pouring into another machine …but how does the receiving machine know where one unit of data starts and where it stops? Where does one end and the next one start. At the physical layer level its just a continuous or non continuous flow of bits …but how does the receiving machine know where one unit of data starts and where it stops? Where does one end and the next one start. At the physical layer level its just a continuous or non continuous flow of bits

Data Link Layer Framing The data link layer structures data streams from the network layer (on the sending end) in frames The data link layer structures data streams from the network layer (on the sending end) in frames And, extracts the data from the frames on the receiving end… and hands it to the network layer And, extracts the data from the frames on the receiving end… and hands it to the network layer Can’t count on clocks to resolve data boundaries Can’t count on clocks to resolve data boundaries Build frames Build frames

Data Link Layer Frames are generally data packages composed of A header or a header/trailer combination A header or a header/trailer combination The data from/for the network layer The data from/for the network layer The data is referred to as the payload The data is referred to as the payload Data HeaderTrailer Data HeaderTrailer

Data Link Layer Four ways to make frames Byte Count Byte Count First byte of a frame always hold the count of the number of bytes in the frame that follows it. Receiving data link layer gets incoming data – reads number in first byte and extracts that number of bytes from the frame Next incoming byte must be a frame byte count

Data Link Layer Frames Bytes counts – some serious problems Bytes counts – some serious problems What if there is an error in the byte count of a frame Suppose the frame byte count = 5… a one bit error could make that value 7 Now the data link layer sees 7 as the byte count and extracts 7 bytes from the frame It believes the next bytes is a byte count (it isn’t) and uses it to read the next N bytes Data link layer has lost synchronization and there is no way to get it back

Data Link Layer Framing Flag bytes Flag bytes Add a special flag byte to the beginning of the frame (header). When the data link layer sees that flag byte that is the beginning of the frame When it sees the next flag byte, that is the beginning of the next frame …but what if the flag byte occurs naturally in the data stream? …use a special escape byte in front of the accidental “flag byte” Using the escape byte is called “byte stuffing”

Data Link Layer Framing Start/Stop flags with bit stuffing Start/Stop flags with bit stuffing Start and end frame with same special bit sequence Start and end frame with same special bit sequence When the sender data link layer sees the flag bit sequence in the data stream, it stuffs it with 0 bit. When the sender data link layer sees the flag bit sequence in the data stream, it stuffs it with 0 bit. When the receiver data link layer sees the flag bit sequence with a 0 at the end, it strips the 0 bit and considers the rest data When the receiver data link layer sees the flag bit sequence with a 0 at the end, it strips the 0 bit and considers the rest data

Data Link Layer Framing Special data encoding Special data encoding Represent each bit in the data stream with a special code 0 = 01 0 = 01 1 = 10 1 = and 11 then used for frame flags 00 and 11 then used for frame flags

Data Link Layer Data Link Layer is responsible for Error detection and error correction Error detection and error correction In designing the Data Link Layer you can- Add a minimal amount of redundancy to you’re the data and detect errors but not correct Add a minimal amount of redundancy to you’re the data and detect errors but not correct Add considerable redundancy to your data and correct errors Add considerable redundancy to your data and correct errors

Data Link Layer Error correction is more expensive than error detection in terms of bandwidth bandwidth Computationally Computationally Fiber optics transmissions are relatively error free More effective – detect and retransmit More effective – detect and retransmit Wireless media tend to have high error rates If clean data depended on retransmission, large percentage of data would be retransmitted – not efficient If clean data depended on retransmission, large percentage of data would be retransmitted – not efficient More efficient – add error correction code to transmitted data More efficient – add error correction code to transmitted data Let receiver detect and correct bad data, up to a point

Data Link Layer Flow control We have no inherent constraints on how much data can flow across a data link and how fast We have no inherent constraints on how much data can flow across a data link and how fast How do you keep a data sender from overrunning a receiver with too much data too fast? How do you keep a data sender from overrunning a receiver with too much data too fast?

Data Link Layer Flow control Feedback flow control – Feedback flow control – Negoitated/collaborative flow control Sender can only send when it have permission from receiver Sender transmits a request-to-send Sender transmits a request-to-send Receiver replies with ok-to-send or not-ok-to-send Receiver replies with ok-to-send or not-ok-to-send Sender transmits fixed quantity of data, etc… Sender transmits fixed quantity of data, etc… Receiver grants “license” to sender Receiver sends “ok to send n frames” Receiver sends “ok to send n frames” Sender transmits n frames Sender transmits n frames Sender waits for next “ok to send” Sender waits for next “ok to send”

Data Link Layer Flow control Rate base flow control Rate base flow control Data flow is controlled by a built in mechanism Like clock Like clock Data rate limited to something less than the medium and receiver can handle Data rate limited to something less than the medium and receiver can handle No conversation between sender and receiver No conversation between sender and receiver