

{"id":104844,"date":"2022-01-05T09:00:24","date_gmt":"2022-01-05T03:30:24","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=104844"},"modified":"2022-01-05T12:23:56","modified_gmt":"2022-01-05T06:53:56","slug":"stop-and-wait-protocol","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/","title":{"rendered":"Stop and Wait Protocol"},"content":{"rendered":"<h3>What is the Stop and Wait Protocol?<\/h3>\n<p>Stop and wait indicates that whatever data the sender wishes to convey is sent to the recipient. After transferring the data, he comes to a halt and waits for the receiver&#8217;s acknowledgment. The stop and wait protocol is classified as a flow control protocol. Flow control is one of the data connection layer&#8217;s services.<\/p>\n<p>Stop and wait protocol is a data-link layer protocol that is used for data transmission across noiseless channels. It supports unidirectional data transmission, which means that it can only send or receive data at the same time. It provides a flow-control mechanism but no error-control mechanism. The reason behind using this frame is that after delivering the frame, the sender waits for the acknowledgment before sending the next frame.<\/p>\n<h3>Rules of Stop and Wait Protocol:<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center\"><b>Sender Side<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: center\"><b>Receiver Side<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">The sender transfers data packets one at a time.<\/span><\/td>\n<td><span style=\"font-weight: 400\">The data packet is received and then consumed.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">When the preceding packet&#8217;s acknowledgment is received, the sender transmits the next packet.<\/span><\/td>\n<td><span style=\"font-weight: 400\">When a data packet is consumed, the receiver sends an acknowledgment back to the sender.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Working of Stop and Wait Protocol:<\/h3>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/working-of-stop-and-wait-protocol.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-105237\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/working-of-stop-and-wait-protocol.webp\" alt=\"working of stop and wait protocol\" width=\"576\" height=\"608\" \/><\/a><\/p>\n<p>The stop and wait technique is depicted in the diagram above. If there is a sender and a receiver, the sender sends the packet, which is referred to as a data packet. The sender will not transmit the second packet until the first packet is acknowledged. The acknowledgment for the data packet received is sent by the receiver.<\/p>\n<p>The sender transmits the next packet after receiving the acknowledgment. This method is repeated until all of the packets are not transmitted. This protocol&#8217;s major virtue is its simplicity, but it also has significant drawbacks.<\/p>\n<h3>Disadvantages of Stop and Wait Protocol:<\/h3>\n<h4>1. Lost Data:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/lost-data.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-105238\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/lost-data.webp\" alt=\"lost data\" width=\"414\" height=\"329\" \/><\/a><\/p>\n<p>Assume the sender sends the data and it is lost. For a long time, the receiver has been waiting for the data. Because the data is not received by the recipient, no acknowledgment is sent. The sender will not send the following packet since it has not received any acknowledgment. This issue arises as a result of missing data.<\/p>\n<p>This causes 2 problems:<\/p>\n<ul>\n<li>The sender waits indefinitely for an acknowledgment.<\/li>\n<li>The receiver waits an indefinite time for data.<\/li>\n<\/ul>\n<h4>2. Lost Acknowledgement:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/lost-acknowledgement.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-105239\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/lost-acknowledgement.webp\" alt=\"lost acknowledgement\" width=\"414\" height=\"329\" \/><\/a><\/p>\n<p>Assume the data is sent by the sender and received by the recipient. When the packet is received, the receiver sends an acknowledgment. In this situation, the acknowledgment is lost in a network, and the sender has no possibility of receiving it. There is also no way for the sender to transmit the following packet because in the stop and wait protocol, the next packet cannot be sent until the preceding packet&#8217;s acknowledgment is received.<\/p>\n<p>This causes the following problem:<\/p>\n<ul>\n<li>The sender waits indefinitely for an acknowledgment.<\/li>\n<\/ul>\n<h4>3. Delayed Data or Acknowledgement:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/delayed-data-or-acknowledgement.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-105240\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/delayed-data-or-acknowledgement.webp\" alt=\"delayed data or acknowledgement\" width=\"414\" height=\"329\" \/><\/a><\/p>\n<p>Assume the data is sent by the sender and received by the recipient. The receiver then transmits the acknowledgment, but it is received after the sender&#8217;s timeout period has expired. Because the acknowledgment is received late, it may be mistaken for the acknowledgment of another data packet.<\/p>\n<h3>Summary:<\/h3>\n<p>In this article, we covered the concept of the Stop and Wait Flow Control Protocol. We looked at the mechanism of this protocol, and the various problems that are inherent in this protocol. We also looked at the main rules of this protocol.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is the Stop and Wait Protocol? Stop and wait indicates that whatever data the sender wishes to convey is sent to the recipient. After transferring the data, he comes to a halt and&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":105236,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24974],"tags":[26040,26038,26039],"class_list":["post-104844","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-network","tag-disadvantages-of-stop-and-wait-protocol","tag-stop-and-wait-protocol","tag-working-of-stop-and-wait-protocol"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Stop and Wait Protocol - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about Stop and Wait Flow Control Protocol &amp; its rules. Look at its mechanism &amp; various problems that are inherent in it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Stop and Wait Protocol - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about Stop and Wait Flow Control Protocol &amp; its rules. Look at its mechanism &amp; various problems that are inherent in it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-05T03:30:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-05T06:53:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/stop-and-wait-protocol.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Stop and Wait Protocol - DataFlair","description":"Learn about Stop and Wait Flow Control Protocol & its rules. Look at its mechanism & various problems that are inherent in it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/","og_locale":"en_US","og_type":"article","og_title":"Stop and Wait Protocol - DataFlair","og_description":"Learn about Stop and Wait Flow Control Protocol & its rules. Look at its mechanism & various problems that are inherent in it.","og_url":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-01-05T03:30:24+00:00","article_modified_time":"2022-01-05T06:53:56+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/stop-and-wait-protocol.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Stop and Wait Protocol","datePublished":"2022-01-05T03:30:24+00:00","dateModified":"2022-01-05T06:53:56+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/"},"wordCount":563,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/stop-and-wait-protocol.webp","keywords":["Disadvantages of Stop and Wait Protocol","Stop and Wait Protocol","working of Stop and Wait Protocol"],"articleSection":["computer network tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/","url":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/","name":"Stop and Wait Protocol - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/stop-and-wait-protocol.webp","datePublished":"2022-01-05T03:30:24+00:00","dateModified":"2022-01-05T06:53:56+00:00","description":"Learn about Stop and Wait Flow Control Protocol & its rules. Look at its mechanism & various problems that are inherent in it.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/stop-and-wait-protocol.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/12\/stop-and-wait-protocol.webp","width":1200,"height":628,"caption":"stop and wait protocol"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/stop-and-wait-protocol\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"computer network tutorial","item":"https:\/\/data-flair.training\/blogs\/category\/computer-network\/"},{"@type":"ListItem","position":3,"name":"Stop and Wait Protocol"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/104844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=104844"}],"version-history":[{"count":2,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/104844\/revisions"}],"predecessor-version":[{"id":105241,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/104844\/revisions\/105241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/105236"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=104844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=104844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=104844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}