{"id":160295,"date":"2023-09-25T15:28:10","date_gmt":"2023-09-25T09:58:10","guid":{"rendered":"https:\/\/www.gkseries.com\/blog\/?p=160295"},"modified":"2023-09-25T15:28:41","modified_gmt":"2023-09-25T09:58:41","slug":"consider-a-long-lived-tcp-session-with-an-end-to-end-bandwidth-of-1-gbps-109-bits-per-second","status":"publish","type":"post","link":"https:\/\/www.gkseries.com\/blog\/consider-a-long-lived-tcp-session-with-an-end-to-end-bandwidth-of-1-gbps-109-bits-per-second\/","title":{"rendered":"Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per- second)"},"content":{"rendered":"\n<p>Q. <span style=\"font-size:12.0pt;mso-bidi-font-size:11.0pt;\nfont-family:&quot;Times New Roman&quot;,serif;mso-fareast-font-family:&quot;Times New Roman&quot;;\nmso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA\">Consider<span style=\"letter-spacing:-.35pt\"> <\/span>a<span style=\"letter-spacing:-.3pt\"> <\/span>long-lived<span style=\"letter-spacing:-.15pt\"> <\/span>TCP<span style=\"letter-spacing:-.25pt\"> <\/span>session<span style=\"letter-spacing:-.25pt\"> <\/span>with<span style=\"letter-spacing:-.25pt\"> <\/span>an<span style=\"letter-spacing:-.15pt\"> <\/span>end-to-end<span style=\"letter-spacing:\n-.3pt\"> <\/span>bandwidth<span style=\"letter-spacing:-.25pt\"> <\/span>of<span style=\"letter-spacing:-.3pt\"> <\/span>1<span style=\"letter-spacing:-.15pt\"> <\/span>Gbps<span style=\"letter-spacing:-.15pt\"> <\/span>(=<span style=\"letter-spacing:-.05pt\"> <\/span><\/span><span style=\"font-size:12.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Cambria Math&quot;,serif;\nmso-fareast-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;;\nmso-bidi-font-family:&quot;Times New Roman&quot;;mso-ansi-language:EN-US;mso-fareast-language:\nEN-US;mso-bidi-language:AR-SA\">10<sup>9<\/sup><span style=\"letter-spacing:.7pt\"> <\/span><\/span><span style=\"font-size:12.0pt;mso-bidi-font-size:11.0pt;\nfont-family:&quot;Times New Roman&quot;,serif;mso-fareast-font-family:&quot;Times New Roman&quot;;\nmso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA\">bits-per-<span style=\"letter-spacing:-2.9pt\"> <\/span>second).<span style=\"letter-spacing:-.45pt\"> <\/span>The<span style=\"letter-spacing:-.5pt\"> <\/span>session<span style=\"letter-spacing:-.45pt\"> <\/span>starts<span style=\"letter-spacing:-.4pt\"> <\/span>with<span style=\"letter-spacing:-.4pt\"> <\/span>a<span style=\"letter-spacing:\n-.5pt\"> <\/span>sequence<span style=\"letter-spacing:-.45pt\"> <\/span>number<span style=\"letter-spacing:-.4pt\"> <\/span>of<span style=\"letter-spacing:-.45pt\"> <\/span>1234.<span style=\"letter-spacing:-.45pt\"> <\/span>The<span style=\"letter-spacing:-.5pt\"> <\/span>minimum<span style=\"letter-spacing:-.4pt\"> <\/span>time<span style=\"letter-spacing:-.45pt\"> <\/span>(in<span style=\"letter-spacing:-.45pt\"> <\/span>seconds,<span style=\"letter-spacing:-2.85pt\"> <\/span>rounded<span style=\"letter-spacing:-.1pt\"> <\/span>to the<span style=\"letter-spacing:-.1pt\"> <\/span>closest integer)<span style=\"letter-spacing:\n-.1pt\"> <\/span>before<span style=\"letter-spacing:-.1pt\"> <\/span>this sequence<span style=\"letter-spacing:-.1pt\"> <\/span>number<span style=\"letter-spacing:-.1pt\"> <\/span>can be<span style=\"letter-spacing:-.1pt\"> <\/span>used<span style=\"letter-spacing:\n.1pt\"> <\/span>again<span style=\"letter-spacing:-.05pt\"> <\/span>is<u>\u00a0\u00a0\u00a0\u00a0 <\/u><\/span><\/p>\n\n\n\n<p>Ans: 34<\/p>\n\n\n\n<p>Sol:<\/p>\n\n\n\n<p>As sequence number field of TCP is 32 bits, so there are total 2<sup>32<\/sup>&nbsp;unique sequence number are possible (from 0 to 2<sup>32<\/sup>-1), which is limit of TCP data.<\/p>\n\n\n\n<p>But if you want to send data more than 2<sup>32<\/sup>\u00a0bytes in TCP, then you need to repeat this procedure after sending 2<sup>32<\/sup>\u00a0bytes of data or unique sequence numbers. This concept is known as\u00a0<strong>wrap around<\/strong>\u00a0which allow sending unlimited data using TCP.<\/p>\n\n\n\n<p>Therefore, question is asking for&nbsp;<strong>wrap around<\/strong>&nbsp;time which is equal to pass all unique sequences first, i.e., 2<sup>32<\/sup>, TCP assigns 1 sequence number to each byte of data.T<sub>wrap\u2212around<\/sub> = (Total data) \/ (Bandwidth) = (2<sup>32<\/sup> bytes) \/ (10<sup>9<\/sup> bits per second) = (2<sup>32<\/sup> * 8 bits) \/ (10<sup>9<\/sup> bits per second) = 34.35 seconds = 34 (in seconds)<\/p>\n\n\n\n<p>GATE\u2019 answer is same as either ceiling value or floor value (i.e., 34 and 35 both are correct).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q. Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per- second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is\u00a0\u00a0\u00a0\u00a0 Ans: 34 Sol: As sequence number field of TCP is [&hellip;]<\/p>\n","protected":false},"author":419,"featured_media":160296,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5141],"tags":[5140],"class_list":["post-160295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gate","tag-gate-questions"],"_links":{"self":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/users\/419"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/comments?post=160295"}],"version-history":[{"count":1,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160295\/revisions"}],"predecessor-version":[{"id":160297,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160295\/revisions\/160297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media\/160296"}],"wp:attachment":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media?parent=160295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/categories?post=160295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/tags?post=160295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}