THE DATA LINK LAYER Out of order with the book Dr. John P. Abraham University of Texas, Panam.

Slides:



Advertisements
Similar presentations
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Advertisements

Chapter 3 The Data Link Layer.
Transmission Control Protocol (TCP)
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
The Data Link Layer Framing Error Control Flow Control
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
The OSI Reference Model
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
1 Reliable Data Transfer. 2 r Problem: Reliability  Want an abstraction of a reliable link even though packets can be corrupted or get lost r Solution:
Example Data Link Protocols Quick review Reference Models? Layers? Flow Control? Bit stuffing? Connection Oriented? Synchronous transmission?
Process-to-Process Delivery:
Data Link Control Protocols
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
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.
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.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
Chapter 11 Data Link Control
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
CHAPTER-3 continues. Sliding Window Protocols previous protocols - data frames were transmitted in one direction In practical situations - need for transmitting.
13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA.
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
4343 X2 – The Transport Layer Tanenbaum Ch.6.
Point-to-Point Protocol
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
Data Link Layer.
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.
Chapter 3 The Data Link Layer.
HDLC and PPP.
The University of Adelaide, School of Computer Science
Data Link Layer.
Data link layer (LLC).
Data Link Layer What does it do?
Transport Layer Unit 5.
Process-to-Process Delivery:
CS412 Introduction to Computer Networking & Telecommunication
Chapter 11 Data Link Control
Objectives of Today’s Lecture
8-Reliability and Channel Coding
8-Reliability and Channel Coding
Objectives of Today’s Lecture
ملاحظة: الكلام المسطر + الرسومات ذات السهم الاحمر*مهمة للمذاكرة
Process-to-Process Delivery: UDP, TCP
Data Link Control (DLC) Services
Data Link Layer. Position of the data-link layer.
13-LAN, packets, frames and topologies
Presentation transcript:

THE DATA LINK LAYER Out of order with the book Dr. John P. Abraham University of Texas, Panam

The data link layer n Provides data transport across a physical link n Handles physical addressing, network topology, line discipline,Frame synchronization, error notification, orderly delivery of frames and flow control.

Services provided by data link layer n Unacknowledged connectionless service n Acknowledged connectionless service n Acknowledged connection-oriented service

Unacknowledged connectionless service n No connection established. n Send frames. No acknowledgment by receiving machine. n If lost, no attempt to recover by this layer. Recovery is left up to the higher layers n Good for reliable lines such as fiber, use for speech, video, etc. where late is worse than lost frames.

Acknowledged connectionless service n No connection established n Frames are sent and each is individually acknowledged n Frames are resent if acknowledgement received within timeout period. n Useful for unreliable channels such as wireless.

Acknowledged connection-oriented service n Reliable service n Source and destination establish connection n All frames are received in the right order n After transmission the connection is releasedaming

Framing n In order to provide service to the network layer, the data link layer must use the service provided to it by the Physical layer. The physical layer only accept a raw bit stream. For a long bit stream, if error occurred during transmission, the entire stream has to be sent again. Therefore, it is broken to smaller frames.

Each frame will have to be distinguished somehow. Three methods are used n Character count n Starting and ending characters, with character stuffing n Starting and ending flags, with bit stuffing

Character count n The first byte indicates how many characters are in the frame including the first byte. n Trouble with this scheme is that if the first byte of any frame gets corrupted, the destination will get out of sequence, having no way to find where the beginning of the next frame is. n This method is rarely used any more.

Start and end with control chars with character stuffing n Resynchronize at the beginning of each frame n Start with ASCII chars DLE & STX –Data Link Escape, Start of Text n End with the same sequence n If these ASCII char is part of the text then double it –like Jim’’s book - in pascal Problem - must use 8 bit ASCII which is not suitable for all communications

Start and end with flags with stuffing Each frame begins with bit pattern If senders data has five consecutive ones then stuff it with a zero which is deleted at the receiving end This bit pattern called flag byte is added at the end of each frame as well With this method boundary between two frames are easily recognized

Error control n How to make sure that all data arrived at the destination correctly and in the proper order. n The receiver sends special control characters indicating positive or negative acknowledgement about incoming frames. n What to do if the acknowledgment gets lost? -the computer will hang. –Introduce timers for each frame. –The time has to be set long enough to send/receive in both directions –The time will vary depending upon distance, conditions, etc. –We will examine this in more detail later.

Receives packets from network layer The packet is treated as pure data, even though it may contain data and control information. It is the data link’s job to transmit it to the receiver’s data link layer, which in turn gives it to the network layer. Data link encapsulates it in a frame by adding data link header and trailer to it. Appropriate checksums are computed and included in the frame. Elementary data link protocols

computes the checksum if checksum does not match send error message If checksum is ok notify sending data link layer Check all header trailer information If all OK strip off the header and trailer and pass the packet to the data link layer Receiving data link layer

Wait for an event to happen Fetch packet from the network layer for transmission on the channel Deliver information from inbound frame to network layer Go get an inbound frame from the physical layer Pass the frame to physical layer for transmission Start clocks and stop clocks as necessary etc, etc Pseudocode for data link layer routine

Sliding Window Protocols n For full duplex two transmission lines are required n One to send data and the other to receive data and/or ACKs n Sending ACKs in a packet of its own is waste of resources n May use piggybacking n The acknowledgement is attached to an outgoing data frame(ack field in the frame header) n Data link layer must wait until it has some thing to send before it can ack. n This may cause time out and the frame may be re- sent.

n The essence of sliding window protocols is that at any instant of time, the sender maintains a set of sequence numbers corresponding to frames it is permitted to send. These frames are said to fall within the sending window. Similarly, the receiver also maintains a receiving window corresponding to the set of frames it is permitted to accept. It is NOT necessary for the sender and receiver to have same number limits. n Sequence numbers of frames sent but not acknowledged are kept in the senders window. n Th receivers window corresponds to the frames it may accept.

One bit sliding window protocol n uses stop and wait scheme, since the sender transmits a frame and waits for its acknowledgement before sending the next one. n The acknowledgement field of the frame contains the number of the last frame received without error. If this number agrees with the sequence number of the frame the sender is trying to send, the sender knows that it is done and can proceed with the next frame.

A protocol using Go-Back-N n Takes into account of round trip transmission time. n Enough frames should be send to stuff the band with to avoid channel idling n Consider a 50-kbps satellite channel with 500 m-sec round-trip propagation delay –Let us send 1000 bit frames –At t=0 starts sending the first frame, at t=20 msec the frames has been send –Receiver fully receives only at t=270msc, and ack will be received at t=520 msec. –Sender would be blocked 96% of time- only 4% of available band width was used.

Go-Back-N continued. n Instead of sending 4 frames, the sender should have sent 26 frames. This will take t=520 msec. n at t=520 the acknowledgement for the first frame will be received. The senders maximum window size is 26. n This technique is called pipelining. n If a frame in the middle of a stream gets damaged, what should the receiver do? Should all frames starting at that point be re-sent? n Go-Back-N simply discards all frames including the damaged one, not sending acks. The time out at the sender will resend all subsequent frames. n Can waste a lot of bandwidth in an unreliable channel.

Selective Repeat Receiver stores all good frames after the damaged frame. Notifies the sender of the bad frame, and sender re- sends that one. This technique requires the data link layer to have large amount of memory for the cache.

Examples of Data Link Protocols n HDLC - HIGH LEVEL DATA LINK CONTROL –DERIVED FROM IBM’S SNA - LAYER CALLED SDLC (SYNCHRONOUS DATA LINK PROTOCOL). –ANSI MODIFIED IT TWICE FINALLY IT IS NOW HDLC –CCITT MODIFIED HDLC AS A PART OF X.25 CALLED LAPB (LINK ACCESS PROCEDURE B) n ALL ARE BIT ORIENTED PROTOCOLS –FRAME EXAMPLE – /ADDRESS/CONTROL/DATA/CHECKSUM/ –CONTROL FIELD IS FOR FRAME SEQUENCE NOS

DATA LINK LAYER IN THE INTERNET n HOME USER DIALS UP THE INTERNET PROVIDER n THE PC AT HOME FUNCTIONS AS A CHARACTER ORIENTED TERMINAL LOGGED INTO THE INTERNET SERVICE PROVIDER’S TIME SHARING SYSTEM. -This is called a SHELL ACCOUNT. CAN’T USE WWW. n THE HOME PC CAN CALL THE INTERNET PROVIDER’S ROUTER AND THEN ACT LIKE A FULL-BLOWN INTERNET HOST. CAN USE WWW. TO DO THIS SOME POINT-TO-POINT DATA LINK PROTOCOL IS REQUIRED.

n FRAMING, ERROR CONTROL AND OTHER DATA LINK LAYER FUNCTIONS n TWO POINT-TO-POINT PROTOCOLS –SLIP - SERIAL LINE IP –PPP - POINT-TO-POINT PROTOCOL POINT-TO-POINT DATA LINK PROTOCOL

n DEVISED IN 1984 TO CONNECT SUNS TO INTERNET USING MODEMS n SLIP DOES NOT DO ERROR CORRECTION n ONLY SUPPORTS IP -NOT IPX n EACH SIDE MUST KNOW EACH OTHER’S IP ADDRESS IN ADVANCE n SLIP DOES NOT PROVIDE USER AUTHENTICATION n SLIP IS NOT AN INTERNET APPROVED STANDARD THEREFORE MANY VERSIONS EXIST SLIP (SERIAL LINE IP)

n APPROVED INTERENT STANDARD n HANDLES ERROR CORRECTION n SUPPORTS MULTIPLE PROTOCOLS n IP ADDRESS CAN BE NEGOTIATED AT CONNECT TIME n PERMITS AUTHENTICATION n A LINK PROTOCOL CALLED LCP (LINK CONTROL PROTOCOL) CONNECTS, NEGOTIATES, AND TERMINATES CONNECTIONS PPP - POINT TO POINT PROTOCOL

n PC CALLS PROVIDER’S ROUTER VIA MODEM, ROUTER ESTABLISHES A PHYSICAL CONNECTION, THE PC THEN SENDS THE ROUTER A SERIES OF LCP (LINK CONTROL PROTOCOLS) TO NEGOTIATE PPP PERAMETERS TO BE USED. n THEN A SERIES OF NCP(NETWORK CONTROL PROTOCOLS) ARE SENT TO CONFIGURE THE NETWORK LAYER. A NETWORK ADDRESS IS ISSUED - THE PROVIDER HAS A LIMITED NUMBER. –IF TOTAL CUSTOMER CONNECTION EXCEEDS THE AVAILABLE NO OF IP ADDRESSES CAN’T CONTINUE. EXAMPLE OF PC CONNECTION