PDF Google Drive Downloader v1.1


Báo lỗi sự cố

Nội dung text Unit 3 The Data Link Layer.pdf

Unit 3: The Data Link Layer Functions of Data Link Layer: • The data link layer transforms the physical layer, a raw transmission facility, to a link responsible for node-to-node (hop-to-hop) communication. • Specific responsibilities of the data link layer include framing, addressing, flow control, error control, and media access control. • The data link layer divides the stream of bits received from the network layer into manageable data units called frames. The data link layer adds a header to the frame to define the addresses of the sender and receiver of the frame. • If the rate at which the data are absorbed by the receiver is less than the rate at which data are produced in the sender, the data link layer imposes a flow control mechanism to avoid overwhelming the receiver. • The data link layer also adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged, duplicate, or lost frames. • When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time. Services Provided to Network Layer: • Data link layer provides several services to the network layer. The one of the major services provided is the transferring the data from network layer on the source machine to the network layer on destination machine. • On source machine data link layer receives the data from network layer and on destination machine pass on this data to the network layer as shown in Figure. The path shown in fig (a) is the virtual path. • But the actual path is Network layer -> Data link layer -> Physical layer on source machine, then to physical media and thereafter physical layer -> Data link layer -> Network layer on destination machine. Prepared By: Krishna Bhandari
The three major types of services offered by data link layer are: 1. Unacknowledged connectionless service. 2. Acknowledged connectionless service. 3. Acknowledged connection-oriented service. Framing: • In the physical layer, data transmission involves synchronized transmission of bits from the source to the destination. The data link layer packs these bits into frames. • Data-link layer takes the packets from the Network Layer and encapsulates them into frames. • If the frame size becomes too large, then the packet may be divided into small sized frames. • Smaller sized frames make flow control and error control more efficient. Then, it sends each frame bit-by-bit on the hardware. • At receiver’s end, data link layer picks up signals from hardware and assembles them into frames. Parts of a Frame A frame has the following parts − Frame Header − It contains the source and the destination addresses of the frame. Payload field − It contains the message to be delivered. Trailer − It contains the error detection and error correction bits. Flag − It marks the beginning and end of the frame. Types of Framing Framing can be of two types, fixed sized framing and variable sized framing. Fixed-sized Framing Here the size of the frame is fixed and so the frame length acts as delimiter of the frame. Consequently, it does not require additional boundary bits to identify the start and end of the frame. Example − ATM cells. Prepared By: Krishna Bhandari
Variable – Sized Framing Here, the size of each frame to be transmitted may be different. So additional mechanisms are kept to mark the end of one frame and the beginning of the next frame. It is used in local area networks. Flow Control: • Data link layer protocols are mainly responsible for flow control. When a data frame is sent from one host to another over a single medium, it is required that the sender and receiver should work at the same speed. • That is, sender sends at a speed on which the receiver can process and accept the data. If sender is sending too fast, the receiver may be overloaded and data may be lost. • Flow control is basically technique that gives permission to two of stations that are working and processing at different speeds to just communicate with one another. • Flow control in Data Link Layer simply restricts and coordinates number of frames or amount of data sender can send just before it waits for an acknowledgment from receiver. • Flow control is actually set of procedures that explains sender about how much data or frames it can transfer or transmit before data overwhelms receiver. Approaches to Flow Control: Flow Control is classified into two categories: Feedback-based Flow Control: In these protocols, the sender sends frames after it has received acknowledgments from the user. This is used in the data link layer. Rate-based Flow Control: These protocols have built in mechanisms to restrict the rate of transmission of data without requiring acknowledgment from the receiver. This is used in the transport layer. Prepared By: Krishna Bhandari
Two types of mechanisms can be deployed to control the flow based on the feedback: • A simple stop and wait Protocol • Sliding Window Protocol Simplex Stop and Wait • This flow control mechanism forces the sender after transmitting a data frame to stop and wait until the acknowledgement of the data-frame sent is received. • The sender sends the next frame only when it has received a positive acknowledgement from the receiver that it is available for further data processing. • Data transmission is one directional, but must have bidirectional line. Sliding Window • In this flow control mechanism, both sender and receiver agree on the number of data-frames after which the acknowledgement should be sent. • As we learnt, stop and wait flow control mechanism wastes resources, this protocol tries to make use of underlying resources as much as possible. • In this protocol, multiple frames can be sent by a sender at a time before receiving an acknowledgment from the receiver. • This protocol improves the efficiency of stop and wait protocol by allowing multiple frames to be transmitted before receiving an acknowledgment. • The working principle of this protocol can be described as follows − • Both the sender and the receiver have finite sized buffers called windows. The sender and the receiver agree upon the number of frames to be sent based upon the buffer size. • The sender sends multiple frames in a sequence, without waiting for acknowledgment. When its sending window is filled, it waits for acknowledgment. On receiving acknowledgment, it advances the window and transmits the next frames, according to the number of acknowledgments received. Prepared By: Krishna Bhandari

Tài liệu liên quan

x
Báo cáo lỗi download
Nội dung báo cáo



Chất lượng file Download bị lỗi:
Họ tên:
Email:
Bình luận
Trong quá trình tải gặp lỗi, sự cố,.. hoặc có thắc mắc gì vui lòng để lại bình luận dưới đây. Xin cảm ơn.