For working professionals
For fresh graduates
More
Learn Cyber Security Tutorial …
1. Cyber Security
2. Difference between Circuit Switching and Packet Switching
3. Difference Between Hub and Switch
4. Difference between IPv4 and IPv6
5. Distance Vector Routing (DVR) Protocol
6. Go-Back-N ARQ
7. What is Google Dorking
8. How Does The Internet Work
9. Identity And Access Management (IAM)
10. OSI Model
11. Selective Repeat ARQ
12. Sliding Window Protocol
Now Reading
13. Two Factor Authentication
14. Digital Signatures and Certificates
15. What is VPN and How It Works?
16. What is Firewall
17. What Is Network Topology
18. Subnetting in Computer Networks
19. Intrusion Prevention Systems
20. Network Segmentation
21. Endpoint Detection and Response
22. Security Information and Event Management (SIEM)
23. Data Loss Prevention (DLP)
24. Cross Site Scripting (XSS)
25. Software Bill of Materials(SBOM)
26. ESG Frameworks
Ever wondered how modern-day networking works so flawlessly? There are a lot of protocols and workarounds being used simultaneously to ensure friction-free and efficient transfer of data. One such key protocol of computer networking is the sliding window protocol.
The sliding window protocol is a method that helps senders and recipients exchange and receive data efficiently in the data link. Data packets can be sent and received in a regulated way thanks to it, guaranteeing optimal packet delivery without any issues.
Based on my years of knowledge and all the experience I have gathered as an expert in this field, I have curated this detailed tutorial for you to take you through the nitty-gritty of this particular protocol.
Let’s take a look!
In computer networks, the sliding window protocol is a technique that enables efficient and reliable data transfer between a sender and a recipient. Let me take you through the basic workings of this protocol. Then we will get into its different types in more detail.
There are two types of protocols for sliding windows in computer networks that can be differentiated by flow control in sliding window. Let me explain the types in detail.
While the Go-Back-N protocol is easy to set up, it can cause inefficiencies by redundantly resending multiple packets, especially in high-latency networks
In Go-Back-N, the sender continually transmits packets within a window of unacknowledged packets, up to a maximum window size. After filling the window, the sender awaits acknowledgments for the earliest sent packets. If an acknowledgment isn't received within a set buffering interval, the sender resends all unacknowledged packets from that point onward.
Let’s understand this with the help of the diagram above as an example of sliding window protocol (Go-Back-N).
Here, as you can see, the send sends the packets namely p1, p2, p3, p4. During the transmission, p2 gets lost. Then the receiver sends an acknowledgment letting the sender know that p2 was lost during transit and will discard every packet received after p2. The sender then resends all the packets again after p2. This process continues as long as the receiver sends an acknowledgment (ACK) letting the sender know it has received all the packets.
In Selective Repeat, the sender can send multiple packets simultaneously, keeping a window open for unacknowledged packets. If a specific packet isn't acknowledged within the timeout, only that packet is resent, unlike Go-Back-N where all unacknowledged packets are resent
Unlike Go-Back-N, the receiver saves network resources by buffering out-of-order packets until all missing ones arrive. Though more complex to implement, Selective Repeat is more efficient, particularly in networks with high packet loss and delays.
Now let us take a look into how SR protocol works with the help of this diagram.
As we can see, the first frame (frame0) is sent to the receiver. Then without waiting for acknowledgement from the receiver, the sender sends the frame1 and sets a timer.
Similarly, the sender then sends frame2. When the receiver gets the acknowledgement(ACK0) for frame0, it closes the time for frame0 and sends frame3. When the receiver does not receive an acknowledgment for a frame (in this case, which is frame 2) and the set timer runs out, it sends that particular frame (here frame2) again.
There are two types of sliding window protocol as I mentioned earlier. Let me take you through the differences between the two types of sliding window protocol we use:
Key Points | GBN protocol | SR protocol |
Strategy for Retransmission | Resends all unacknowledged packets from the last acknowledged one if a timeout occurs. | Only resends the specific unacknowledged packet if a timeout occurs, while keeping other unacknowledged packets untouched. |
Buffering for Receivers | Does not buffer out-of-order packets at the receiver; they are discarded until the missing packets are received. | Buffers out-of-order packets at the receiver until all missing packets are received, conserving network resources. |
Management of the Sender's Window | Uses a sliding window mechanism where the sender keeps sending packets within a window of unacknowledged packets, resending all unacknowledged packets upon timeout. | Also uses a sliding window mechanism but allows the sender to send multiple packets concurrently, maintaining a window for unacknowledged packets, and only resending the specific unacknowledged packet upon timeout. |
Efficiency | Simple to implement but can lead to inefficiencies due to redundant retransmissions, especially in high-latency networks. | More complex to implement but more efficient, particularly in networks with prevalent packet loss and delays, due to selective retransmission and better resource usage. |
Usage of the sliding window protocol brings a lot of advantages. In this section of the tutorial, I will discuss some of them.
The sliding window protocol has many drawbacks in addition to its many benefits for dependable and effective data transfer in computer networks. Here I will walk you through them one by one.
In present computer networks, the sliding window protocol is essential for guaranteeing the accuracy and effectiveness of data transfer. Hopefully, this tutorial has provided valuable insight into the workings of this protocol
If you are looking to hone your knowledge and learn about different protocols and working of the modern computer networks, be sure to check out certification courses provided by upGrad. The certified courses are curated by industry-experienced professionals and are sure to give you valuable insights into more complex topics.
In computer networks, the sliding window protocol is mostly used for efficient data transfer.
The sliding window technique increases the effectiveness and dependability of data transfer via a network connection by enabling the controlled transmission and acknowledgement of numerous packets.
The sliding window technique in TCP allows for reliable data transmission between a sender and a recipient as well as flow control.
The functionality of the sliding window protocol is determined by a number of concepts and parameters rather than a single formula.
The sliding window and congestion window function at different levels of the networking stack and have distinct functions.
Go-Back-N is just a type of sliding window protocol.
It is a technique used in networking protocols, namely in TCP, to maintain reliability and maximize the amount of data transmission over a network connection.
One of its advantages is that it allows the sender to send multiple packets without receiving any acknowledgment(ACK message) from the receiver.
It is measured by how well it uses network resources, achieves high speeds, reduces latency, and upholds dependable data transmission.
Yes, a method known as "two pointers" can be categorized as a sliding window approach in many situations.
Author
Talk to our experts. We are available 7 days a week, 9 AM to 12 AM (midnight)
Indian Nationals
1800 210 2020
Foreign Nationals
+918045604032
1.The above statistics depend on various factors and individual results may vary. Past performance is no guarantee of future results.
2.The student assumes full responsibility for all expenses associated with visas, travel, & related costs. upGrad does not provide any a.