Communication Networks NETW 501 Lecture 4 Introduction to Data Link Layer Course Instructor: Dr.-Ing. Maggie Mashaly maggie.ezzat@guc.edu.eg C3.220
Data Link Layer Data Link Layer provides a service for Network Layer (transfer of data from the network layer of a sender to the network layer of a receiver) Data Link Layer uses the Physical Layer (to transmit bits of Data Link Frames over the physical medium) LLC MAC Network Physical
Data Link Layer Functions Data Link layer is responsible for the following: Framing (Grouping Bits into Frames) Error Control Flow Control Medium Access Control
Framing Physical Layer deals with bit streams Framing reflects the ability of the Data Link Layer to identify frame boundaries Framing Methods Character Count Starting and Ending Flags with Bit Stuffing
Framing – Character Count Uses a Field in the header that specifies the number of characters in the frame Frame 1 6 Characters Frame 2 5 Characters Frame 3 8 Characters 6 5 8 If there is mistake in reading the header Synchronization is Lost The receiver has no way to know where does the frame start afterwards
Framing - Starting and Ending Flags with Bit Stuffing Each Frame begins and ends with a special bit pattern 01111110 (Flag Byte) Bit Stuffing If Data has 5 Consecutive 1S ADD 0 Data Flag Byte Flag Byte 01111110 0011011101111110101011111010 01111110 001101110111110101010111110010 01111110 Flag Byte Data
References NETW 501 Lectures slides by Assoc. Prof. Tallal El-Shabrawy “Communication Networks 2nd Edition”, A. Leon-Garcia and I. Widjaja, McGraw Hill, 2013 “Computer Networks 4th Edition”, A. S. Tanenbaum, Pearson International