Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views29 pages

Noisy Channels Protocols

Noisy Channel Protocols are communication protocols designed to handle errors in data transmission, ensuring accurate data reception through techniques like error detection and correction. The Stop-and-Wait Automatic Repeat Request (ARQ) protocol adds error control by using redundancy bits and requires acknowledgments for sent frames, while Go-Back-N ARQ allows multiple frames to be sent before receiving acknowledgments, improving efficiency but potentially increasing congestion due to retransmission of entire windows of frames. Both protocols utilize sequence and acknowledgment numbers to manage frame delivery and error correction.

Uploaded by

kavitha.priya86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views29 pages

Noisy Channels Protocols

Noisy Channel Protocols are communication protocols designed to handle errors in data transmission, ensuring accurate data reception through techniques like error detection and correction. The Stop-and-Wait Automatic Repeat Request (ARQ) protocol adds error control by using redundancy bits and requires acknowledgments for sent frames, while Go-Back-N ARQ allows multiple frames to be sent before receiving acknowledgments, improving efficiency but potentially increasing congestion due to retransmission of entire windows of frames. Both protocols utilize sequence and acknowledgment numbers to manage frame delivery and error correction.

Uploaded by

kavitha.priya86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

NOISY CHANNELS

NOISY CHANNELS

• A Noisy Channel Protocol is a type of communication protocol that is used in


communication systems where the transmission channel may introduce errors into
the transmitted data.

• This type of protocol is designed to deal with errors in the communication channel
and ensure that the data being transmitted is received accurately at the receiver
end.

• The main objective of Noisy Channel Protocols is to minimize the error rate in the
transmitted data by using techniques such as error detection and correction, flow
control, and retransmission of lost or corrupted data frames.
Types of Protocols
Stop-and-Wait Automatic Repeat Request

• Adds a simple error control mechanism to the Stop-and-Wait Protocol

• To detect and correct corrupted frames, need to add redundancy bits to our data
frame.

• When the frame arrives at the receiver site, it is checked and if it is corrupted, it is
silently discarded.

• The detection of errors in this protocol is manifested by the silence of the receiver.

• Lost frames are more difficult to handle than corrupted ones. The solution is to
number the frames.

• Here sender keeps a copy of the sent frame. At the same time, it starts a timer.
Stop-and-Wait Automatic Repeat Request

• If the timer expires and there is no ACK for the sent frame, the frame is resent, the
copy is held, and the timer is restarted.

• Since the protocol uses the stop-and-wait mechanism, there is only one specific
frame that needs an ACK even though several copies of the same frame can be in
the network.

• 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.

• Since an ACK frame can also be corrupted and lost, it too needs redundancy bits
and a sequence number.
Sequence Numbers

• This protocol specifies that frames need to be numbered. This is done by using
sequence numbers.

• A field is added to the data frame to hold the sequence number of that frame.

• Range of the sequence numbers

• For example, if we decide that the field is m bits long, the sequence numbers start
from 0, go to 2𝑚 -1.

• Assume we have used x as a sequence number; we only need to use x + 1 after


that. There is no need for x + 2.
Sequence Numbers
Sender has sent the frame numbered x. Three things can happen:

1. The frame arrives safe and sound at the receiver site; the receiver sends an
acknowledgment. The acknowledgment arrives at the sender site, causing the
sender to send the next frame numbered x + 1.

2. The frame arrives safe and sound at the receiver site; the receiver sends an
acknowledgment, but the acknowledgment is corrupted or lost. The sender
resends the frame (numbered x) after the time-out. Note that the frame here is a
duplicate. The receiver can recognize this fact because it expects frame x + I but
frame x was received.

3. The frame is corrupted or never arrives at the receiver site; the sender
resends the frame (numbered x) after the time-out.
Sequence Numbers
• Need for sequence numbers x and x + I. To distinguish between case 1 and case 2.

• If only x and x + 1 are needed, we can let x =0 and x + 1 = 1.

• This means that the sequence is 0, 1, 0, 1, 0, and so on.

• In Stop-and-Wait ARQ , we use sequence numbers to number the frames. The sequence
numbers are based on modul0-2 arithmetic.

Acknowledgment Numbers

• The acknowledgment numbers always announce the sequence number of the next
frame expected by the receiver .

• For example, if frame 0 has arrived safe and sound, the receiver sends an ACK frame with
acknowledgment 1.

• If frame 1 has arrived safe and sound, the receiver sends an ACK frame with
acknowledgment 0
Design
Design
Design
Example
Pipelining

• In networking and in other areas, a task is often begun before the previous task has
ended. This is known as pipelining.

• There is no pipelining in Stop-and-Wait ARQ because we need to wait for a
frame to reach the destination and be acknowledged before the next frame can be
sent.

• pipelining does apply to our next two protocols because several frames can be sent
before we receive news about the previous frames.

• Pipelining improves the efficiency of the transmission if the number of bits in


transition is large with respect to the bandwidth-delay product
Go-Back-N Automatic Repeat Request

• To improve the efficiency of transmission (filling the pipe), multiple


frames must be in transition while waiting for acknowledgment.

• Let more than one frame be outstanding to keep the channel busy
while the sender is waiting for acknowledgment.

• In this protocol we can send several frames before receiving


acknowledgments.

• Keep a copy of these frames until the acknowledgments arrive.


Sequence Numbers
• Frames from a sending station are numbered sequentially.

• we need to include the sequence number of each frame in the


header, we need to set a limit.

• If the header of the frame allows m bits for the sequence number, the
sequence numbers range from 0 to 2𝑚 -1.

• For example, if m is 4, the only sequence numbers are 0 through 15 inclusive.


However, we can repeat the sequence. So the sequence numbers are

0, 1,2,3,4,5,6, 7,8,9, 10, 11, 12, 13, 14, 15,0, 1,2,3,4,5,6,7,8,9,10, 11, ...
Sender Window
Receiver Window
Design
Example

• Size of the send window must


be less than 𝟐𝒎 .

• Choose m=2, which means the


size of the window can be 2𝑚 -1, or
3.

• The window is 3 (less than 22 )


and all three
acknowledgments are lost,
the frame timer expires and all
three frames are resent.

• The receiver is now expecting


frame 3, not frame 0, so the
duplicate frame is correctly
discarded.
Example

• On the other hand, if the size


of the window is 4 (equal to
22 ) and all
acknowledgments are lost,
the sender will send a
duplicate of frame 0.

• This time the window of the


receiver expects to receive
frame 0, so it accepts frame
0, not as a duplicate, but as the
first frame in the next cycle.
This is an error.
Algorithm :shows the procedure for the sender in this protocol.

1
Algorithm :shows the procedure for the sender in this protocol.

2
Algorithm :shows the procedure for the sender in this protocol.

3
Algorithm :Go-Back-N receiver algorithm.

1
Example
Example

• Example of a case where the


forward channel is reliable,
but the reverse is not. No
data frames are lost, but
some ACKs are delayed
and one is lost.

• Note that although ACK 2 is


lost, ACK 3 serves as both
ACK 2 and ACK3.

• Seven sender events

• Four receiver events

• There is no time-out event


Example
Example

• Frame 1 is lost. Frames 0, 1, 2, and 3


are sent

• The receiver receives frames 2 and


3, but they are discarded because they
are received out of order (frame 1 is
expected)

• The sender receives no


acknowledgment about frames 1, 2,
or 3. Its timer finally expires.

• The sender sends all outstanding


frames (1, 2, and 3) because it does
not know what is wrong.

• Before the second timer expires, all


outstanding frames have been sent and
the timer is stopped
Advantages of Go-Back-N ARQ

• In Go-Back-N ARQ, when a sender detects that a frame it has sent is corrupted (e.g., due to
transmission errors), it doesn't just retransmit the corrupted frame. Instead, it retransmits
the entire window of unacknowledged frames, starting with the corrupted frame

• It allows the sender to send multiple frames consecutively without waiting for
acknowledgments after each frame

• Pipelining is present, which means that the sender can send a continuous stream of
frames within the window without waiting for individual acknowledgments

Disadvantages of Go-Back-N ARQ

• If acknowledgement of one frame is not received, the entire window is retransmitted


instead of only the corrupted frame

• Retransmitting the entire window on detection of a corrupted frame increase congestion
and time consumption

You might also like