Module-III(3).pdf
Document Details
Uploaded by QuietStatueOfLiberty2506
IIIT Naya Raipur
Tags
Related
- APznzaa8W__0kdgdB7Aso0wPLtBTg8Bm-DmapgeMWnrmB8BI1iod1FNW9ro8iBJ1HH6FzohwRpHvwocaL3CWBTSLMSKWxo6zOPS3rqaQk_pf-R6w6FsMWfMC9S0v-4Dr1NsW8x1VT5cfwYtsbfc0o1-j8twrxjGh6uOkEIiEMn18EqDHRJSah25Ci6oM7jjtdOpG6nRhzCHy.pdf
- Introduction to Networks PDF
- UNIT-1 CSE-306.pdf
- Communication Subsystem PowerPoint PDF
- Computer Networks Lecture 2 PDF
- Network Protocol Layers PDF
Full Transcript
Data Communication and Computer Networks Assistant Professor Department of Computer Science & Engineering IIIT Naya Raipur Module III Data Link Layer Framing Character - Oriented Framing In character - oriented framing, data is transmitted a...
Data Communication and Computer Networks Assistant Professor Department of Computer Science & Engineering IIIT Naya Raipur Module III Data Link Layer Framing Character - Oriented Framing In character - oriented framing, data is transmitted as a sequence of bytes, from an 8-bit coding system like ASCII. Bit-oriented framing In bit-oriented framing, data is transmitted as a sequence of bits that can be interpreted in the upper layers both as text as well as multimedia data. Note Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text. Figure Byte stuffing and unstuffing Note Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. Figure Bit stuffing and unstuffing Flow Control Speed matching mechanism. Flow control coordinates the amount of data that can be sent before receiving an acknowledgment. Flow control is a set of procedures that tells the sender how much data it can transmit before it must wait for an acknowledgement from the receiver. Receiver has a limited speed at which it can process incoming data and a limited amount of memory in which to store incoming data. Receiver must inform the sender before the limits are reached and request that the transmitter to send fewer frames or stop temporarily. Note Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Note Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Figure The design of the simplest protocol with no flow or error control Algorithm Sender-site algorithm for the simplest protocol Algorithm Receiver-site algorithm for the simplest protocol Example Figure shows an example of communication using this protocol. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame. Figure Design of Stop-and-Wait Protocol Algorithm Sender-site algorithm for Stop-and-Wait Protocol Algorithm Receiver-site algorithm for Stop-and-Wait Protocol Example Figure shows an example of communication using this protocol. It is still very simple. The sender sends one frame and waits for feedback from the receiver. When the ACK arrives, the sender sends the next frame. Note that sending two frames in the protocol involves the sender in four events and the receiver in two events. Note Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires. In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic. Figure Design of the Stop-and-Wait ARQ Protocol Example Figure shows an example of Stop-and- Wa i t A R Q. F r a m e 0 i s s e n t a n d acknowledged. Frame 1 is lost and resent after the time-out. The resent frame 1 is acknowledged and the t imer stops. Frame 0 is sent and acknowledged, but the acknowledgment is lost. The sender has no idea if the frame or the acknowledgment is lost, so after the time- out, it resends frame 0, which is acknowledged. Sliding window protocol Send multiple frames at a time. Number of frames to be sent is based on Window size. Each frame is numbered -> Sequence number Go Back-N ARQ In Go-Back-N ARQ, N is the sender's window size. It uses the principle of protocol pipelining in which the multiple frames can be sent before receiving the acknowledgment of the first frame. In Go-Back-N ARQ, the frames are numbered sequentially as Go-Back-N ARQ sends the multiple frames at a time that requires the numbering approach to distinguish the frame from another frame. If the acknowledgment of a frame is not received within an agreed-upon time period, then all the frames available in the current window will be retransmitted. Selective Repeat ARQ In the selective repeat ARQ, we only resend the data f rames that are damaged or lost. If any frame is lost or damaged then the receiver sends a negative acknowledgment (NACK) to the sender. if the frame is correctly received, it sends back an acknowledgment (ACK). Question: 1. In Go Back 3 if every 5th packet that is being transmitted is lost and if we have to send 10 packets, the how many transmission are required? 2. Station A needs to send a message consisting of 9 packets to station B using a sliding window (window size 3) and go-back-h error control strategy. All packets are ready and immediately available for transmission. If every 5th packet that A transmits gets lost (but no ACKs from B ever get lost), then what is the number of packets that A will transmit for sending the message to B?