

















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















































INTRODUCTION TO COMPUTER NETWORKS
Prepared By: E RAMACHANDRA Assistant Professor MCA Dept Ashoka Women’s Engineering College, Kurnool
The Data Link Layer, Access Networks, and LANs: Data Link Layer Design Issues, Error Detection and Correction, Elementary Data Link Protocols, Sliding Window Protocols (Textbook 1) Introduction to the Link Layer, Error-Detection and - Correction Techniques, Multiple Access Links and Protocols, Switched Local Area Networks, Link Virtualization: A Network as a Link Layer, Data Center Networking, Retrospective: A Day in the Life of a Web Page (Packet) (Textbook 2)
1. Framing Data from the network layer is divided into manageable units called frames. Data-link layer takes the packets from the Network Layer and encapsulates them into frames. If the frame siz e becomes too large, then the packet may be divided into small siz ed frames. Smaller siz ed frames makes flow control and error control more eff icient. 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.
First framing method uses a f ield in the header to specify the number of characters in the frame. When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is. For Example, Consider a data − 1 2 3 4 5 6 7 8 9 0 1 2 3
sender receiver
In byte stuff ing, a special byte called the escape character (ESC) is stuffed before every byte in the message with the same pattern as the flag byte. If the ESC sequence is found in the message byte, then another ESC byte is stuffed before it.
Byte Stuffing Mechanism
2 .Error Control
Phases in Error Control
Acknowledgment acknowledgment may be positive or negative. Positive ACK On receiving a correct frame, the receiver sends a positive acknowledge. Negative ACK On receiving a damaged frame or a duplicate frame, the receiver sends a negative acknowledgment back to the sender. Retransmission The sender maintains a clock and sets a timeout period. If an acknowledgment of a data-frame previously transmitted does not arrive before the timeout, or a negative acknowledgment is received, the sender retransmits the frame.
A timeout counter is maintained by the sender, which is started when a frame is sent. If the sender receives acknowledgment of the sent frame within time, the sender is conf ir med about successful delivery of the frame. It then transmits the next frame in queue. If the sender does not receive the acknowledgment within time, the sender assumes that either the frame or its acknowledgment is lost in transit. It then retransmits the frame. If the sender receives a negative acknowledgment, the sender retransmits the frame.
The sender has buffers called sending window. The sender sends multiple frames based upon the sending-window size, without receiving the acknowledgment of the previous ones. The receiver receives frames one by one. It keeps track of incoming frames sequence number and sends the corresponding acknowledgment frames. After the sender has sent all the frames in the window, it checks up to what sequence number it has received positive acknowledgment. If the sender has received positive acknowledgment for all the frames, it sends the next set of frames. If the sender receives NACK or has not received any ACK for a particular frame, it retransmits all the frames after which it does not receive any positive ACK. E RAMACHANDRA
3 .Flow Control
Flow control can be broadly classif ied into two categories
Stop and Wait The sender sends a frame and waits for acknowledgment. Once the receiver receives the frame, it sends an acknowledgment frame back to the sender. On receiving the acknowledgment frame, the sender understands that the receiver is ready to accept the next frame. So it sender the next frame in queue.
There may be three types of errors: Single bit error
In a frame, there is only one bit, anywhere though, which is corrupt. Multiple bits error
Frame is received with more than one bits in corrupted state. Burst error Frame contains more than1 consecutive bits corrupted.
4 .Error Detection & Correction There are many reasons such as noise, cross-talk etc., which may help data to get corrupted during transmission.
One extra bit is sent along with the original bits to make number of 1s either even in case of even parity, or odd in case of odd parity.
Error Detection
2.Cyclic Redundancy Check (CRC)
1.Parity Check
even parity ---------if no of 1's even odd parity ---------if no of 1's odd E RAMACHANDRA