CINXE.COM

传输控制协议 - 维基百科,自由的百科全书

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="zh" dir="ltr"> <head> <meta charset="UTF-8"> <title>传输控制协议 - 维基百科,自由的百科全书</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )zhwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh", "wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRequestId":"70b737f8-9ed4-46a7-af22-5bd1a6a71d0a","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"传输控制协议","wgTitle":"传输控制协议","wgCurRevisionId":82562858,"wgRevisionId":82562858,"wgArticleId":11146,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["使用RFC魔术链接的页面","自2017年11月带有不当合理使用内容的条目","自2018年1月包含過多行話或專業術語的條目","含有英語的條目","使用ISBN魔术链接的页面","传输层协议","TCP/IP","TCP协议"],"wgPageViewLanguage":"zh","wgPageContentLanguage":"zh","wgPageContentModel":"wikitext","wgRelevantPageName":"传输控制协议","wgRelevantArticleId":11146,"wgUserVariant":"zh","wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true, "wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"zh","pageLanguageDir":"ltr","pageVariantFallbacks":["zh-hans","zh-hant","zh-cn","zh-tw","zh-hk","zh-sg","zh-mo","zh-my"]},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q8803","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false, "wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.large-font":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.edit0","ext.gadget.WikiMiniAtlas","ext.gadget.UnihanTooltips","ext.gadget.Difflink","ext.gadget.pseudonamespace-UI","ext.gadget.SpecialWikitext","ext.gadget.switcher", "ext.gadget.VariantAlly","ext.gadget.AdvancedSiteNotices","ext.gadget.hideConversionTab","ext.gadget.internalLinkHelper-altcolor","ext.gadget.noteTA","ext.gadget.NavFrame","ext.gadget.collapsibleTables","ext.gadget.scrollUpButton","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=zh&amp;modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=zh&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=zh&amp;modules=ext.gadget.large-font&amp;only=styles&amp;skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=zh&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="传输控制协议 - 维基百科,自由的百科全书"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//zh.m.wikipedia.org/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" type="application/x-wiki" title="编辑本页" href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (zh)"> <link rel="EditURI" type="application/rsd+xml" href="//zh.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://zh.wikipedia.org/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh" href="https://zh.wikipedia.org/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hans" href="https://zh.wikipedia.org/zh-hans/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hans-CN" href="https://zh.wikipedia.org/zh-cn/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hans-MY" href="https://zh.wikipedia.org/zh-my/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hans-SG" href="https://zh.wikipedia.org/zh-sg/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hant" href="https://zh.wikipedia.org/zh-hant/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hant-HK" href="https://zh.wikipedia.org/zh-hk/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hant-MO" href="https://zh.wikipedia.org/zh-mo/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="zh-Hant-TW" href="https://zh.wikipedia.org/zh-tw/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="alternate" hreflang="x-default" href="https://zh.wikipedia.org/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh"> <link rel="alternate" type="application/atom+xml" title="Wikipedia的Atom feed" href="/w/index.php?title=Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-传输控制协议 rootpage-传输控制协议 skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">跳转到内容</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="站点"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="主菜单" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">主菜单</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">主菜单</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">隐藏</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> 导航 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Wikipedia:%E9%A6%96%E9%A1%B5" title="访问首页[z]" accesskey="z"><span>首页</span></a></li><li id="n-indexpage" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%88%86%E7%B1%BB%E7%B4%A2%E5%BC%95" title="以分类索引搜寻中文维基百科"><span>分类索引</span></a></li><li id="n-Featured_content" class="mw-list-item"><a href="/wiki/Portal:%E7%89%B9%E8%89%B2%E5%85%A7%E5%AE%B9" title="查看中文维基百科的特色内容"><span>特色内容</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:%E6%96%B0%E8%81%9E%E5%8B%95%E6%85%8B" title="提供当前新闻事件的背景资料"><span>新闻动态</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9" title="列出维基百科中的最近修改[r]" accesskey="r"><span>最近更改</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:%E9%9A%8F%E6%9C%BA%E9%A1%B5%E9%9D%A2" title="随机载入一个页面[x]" accesskey="x"><span>随机条目</span></a></li> </ul> </div> </div> <div id="p-help" class="vector-menu mw-portlet mw-portlet-help" > <div class="vector-menu-heading"> 帮助 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:%E7%9B%AE%E5%BD%95" title="寻求帮助"><span>帮助</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:%E7%A4%BE%E7%BE%A4%E9%A6%96%E9%A1%B5" title="关于本计划、你可以做什么、应该如何做"><span>维基社群</span></a></li><li id="n-policy" class="mw-list-item"><a href="/wiki/Wikipedia:%E6%96%B9%E9%87%9D%E8%88%87%E6%8C%87%E5%BC%95" title="查看维基百科的方针和指引"><span>方针与指引</span></a></li><li id="n-villagepump" class="mw-list-item"><a href="/wiki/Wikipedia:%E4%BA%92%E5%8A%A9%E5%AE%A2%E6%A0%88" title="参与维基百科社群的讨论"><span>互助客栈</span></a></li><li id="n-Information_desk" class="mw-list-item"><a href="/wiki/Wikipedia:%E7%9F%A5%E8%AF%86%E9%97%AE%E7%AD%94" title="解答任何与维基百科无关的问题的地方"><span>知识问答</span></a></li><li id="n-conversion" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2" title="提出字词转换请求"><span>字词转换</span></a></li><li id="n-IRC" class="mw-list-item"><a href="/wiki/Wikipedia:IRC%E8%81%8A%E5%A4%A9%E9%A2%91%E9%81%93"><span>IRC即时聊天</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Wikipedia:%E8%81%94%E7%BB%9C%E6%88%91%E4%BB%AC" title="如何联络维基百科"><span>联络我们</span></a></li><li id="n-about" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%85%B3%E4%BA%8E" title="查看维基百科的简介"><span>关于维基百科</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Wikipedia:%E9%A6%96%E9%A1%B5" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="维基百科" src="/static/images/mobile/copyright/wikipedia-wordmark-zh.svg" style="width: 6.5625em; height: 1.375em;"> <img class="mw-logo-tagline" alt="自由的百科全书" src="/static/images/mobile/copyright/wikipedia-tagline-zh.svg" width="103" height="14" style="width: 6.4375em; height: 0.875em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:%E6%90%9C%E7%B4%A2" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="搜索维基百科[f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>搜索</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="搜索维基百科" aria-label="搜索维基百科" autocapitalize="sentences" title="搜索维基百科[f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:搜索"> </div> <button class="cdx-button cdx-search-input__end-button">搜索</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="个人工具"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="外观"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="更改页面字体大小、宽度和颜色的外观" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="外观" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">外观</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=zh.wikipedia.org&amp;uselang=zh" class=""><span>资助维基百科</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&amp;returnto=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="我们推荐您创建账号并登录,但这不是强制性的" class=""><span>创建账号</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&amp;returnto=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="建议你登录,尽管并非必须。[o]" accesskey="o" class=""><span>登录</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="更多选项" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="个人工具" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">个人工具</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="用户菜单" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=zh.wikipedia.org&amp;uselang=zh"><span>资助维基百科</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&amp;returnto=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="我们推荐您创建账号并登录,但这不是强制性的"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>创建账号</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&amp;returnto=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="建议你登录,尽管并非必须。[o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>登录</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> 未登录编辑者的页面 <a href="/wiki/Help:%E6%96%B0%E6%89%8B%E5%85%A5%E9%97%A8" aria-label="了解有关编辑的更多信息"><span>了解详情</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:%E6%88%91%E7%9A%84%E8%B4%A1%E7%8C%AE" title="来自此IP地址的编辑列表[y]" accesskey="y"><span>贡献</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:%E6%88%91%E7%9A%84%E8%AE%A8%E8%AE%BA%E9%A1%B5" title="对于来自此IP地址编辑的讨论[n]" accesskey="n"><span>讨论</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="站点"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="目录" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">目录</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">隐藏</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">序言</div> </a> </li> <li id="toc-简介" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#简介"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>简介</span> </div> </a> <ul id="toc-简介-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-运作方式" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#运作方式"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>运作方式</span> </div> </a> <button aria-controls="toc-运作方式-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>开关运作方式子章节</span> </button> <ul id="toc-运作方式-sublist" class="vector-toc-list"> <li id="toc-建立通路" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#建立通路"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>建立通路</span> </div> </a> <ul id="toc-建立通路-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-资源使用" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#资源使用"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>资源使用</span> </div> </a> <ul id="toc-资源使用-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-数据传输" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#数据传输"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>数据传输</span> </div> </a> <ul id="toc-数据传输-sublist" class="vector-toc-list"> <li id="toc-可靠传输" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#可靠传输"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.1</span> <span>可靠传输</span> </div> </a> <ul id="toc-可靠传输-sublist" class="vector-toc-list"> <li id="toc-基于重复累计确认的重传" class="vector-toc-list-item vector-toc-level-4"> <a class="vector-toc-link" href="#基于重复累计确认的重传"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.1.1</span> <span>基于重复累计确认的重传</span> </div> </a> <ul id="toc-基于重复累计确认的重传-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-超时重传" class="vector-toc-list-item vector-toc-level-4"> <a class="vector-toc-link" href="#超时重传"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.1.2</span> <span>超时重传</span> </div> </a> <ul id="toc-超时重传-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-数据传输举例" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#数据传输举例"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.2</span> <span>数据传输举例</span> </div> </a> <ul id="toc-数据传输举例-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-校验和" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#校验和"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.3</span> <span>校验和</span> </div> </a> <ul id="toc-校验和-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-流量控制" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#流量控制"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.4</span> <span>流量控制</span> </div> </a> <ul id="toc-流量控制-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-拥塞控制" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#拥塞控制"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.5</span> <span>拥塞控制</span> </div> </a> <ul id="toc-拥塞控制-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-最大分段大小" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#最大分段大小"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>最大分段大小</span> </div> </a> <ul id="toc-最大分段大小-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-选择确认" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#选择确认"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>选择确认</span> </div> </a> <ul id="toc-选择确认-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-TCP窗口缩放选项" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#TCP窗口缩放选项"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.6</span> <span>TCP窗口缩放选项</span> </div> </a> <ul id="toc-TCP窗口缩放选项-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-TCP时间戳" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#TCP时间戳"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.7</span> <span>TCP时间戳</span> </div> </a> <ul id="toc-TCP时间戳-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-带外数据" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#带外数据"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.8</span> <span>带外数据</span> </div> </a> <ul id="toc-带外数据-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-强制数据递交" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#强制数据递交"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.9</span> <span>强制数据递交</span> </div> </a> <ul id="toc-强制数据递交-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-终结通路" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#终结通路"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.10</span> <span>终结通路</span> </div> </a> <ul id="toc-终结通路-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-状态编码" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#状态编码"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.11</span> <span>状态编码</span> </div> </a> <ul id="toc-状态编码-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-端口" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#端口"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>端口</span> </div> </a> <ul id="toc-端口-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-封包結構" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#封包結構"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>封包結構</span> </div> </a> <ul id="toc-封包結構-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-發展過程" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#發展過程"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>發展過程</span> </div> </a> <ul id="toc-發展過程-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-应用" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#应用"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>应用</span> </div> </a> <ul id="toc-应用-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-参见" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#参见"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>参见</span> </div> </a> <ul id="toc-参见-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-参考资料" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#参考资料"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>参考资料</span> </div> </a> <ul id="toc-参考资料-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-外部链接" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#外部链接"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>外部链接</span> </div> </a> <ul id="toc-外部链接-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="目录" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="开关目录" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">开关目录</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">传输控制协议</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="前往另一种语言写成的文章。71种语言可用" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-71" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">71种语言</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%A8%D8%B1%D9%88%D8%AA%D9%88%D9%83%D9%88%D9%84_%D8%A7%D9%84%D8%AA%D8%AD%D9%83%D9%85_%D8%A8%D8%A7%D9%84%D8%A5%D8%B1%D8%B3%D8%A7%D9%84" title="بروتوكول التحكم بالإرسال – 阿拉伯语" lang="ar" hreflang="ar" data-title="بروتوكول التحكم بالإرسال" data-language-autonym="العربية" data-language-local-name="阿拉伯语" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 阿斯图里亚斯语" lang="ast" hreflang="ast" data-title="Transmission Control Protocol" data-language-autonym="Asturianu" data-language-local-name="阿斯图里亚斯语" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/TCP" title="TCP – 阿塞拜疆语" lang="az" hreflang="az" data-title="TCP" data-language-autonym="Azərbaycanca" data-language-local-name="阿塞拜疆语" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikipedia.org/wiki/TCP" title="TCP – 白俄罗斯语" lang="be" hreflang="be" data-title="TCP" data-language-autonym="Беларуская" data-language-local-name="白俄罗斯语" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/TCP" title="TCP – 保加利亚语" lang="bg" hreflang="bg" data-title="TCP" data-language-autonym="Български" data-language-local-name="保加利亚语" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%9F%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%A8%E0%A7%8D%E0%A6%B8%E0%A6%AE%E0%A6%BF%E0%A6%B6%E0%A6%A8_%E0%A6%95%E0%A6%A8%E0%A7%8D%E0%A6%9F%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%B2_%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%9F%E0%A7%8B%E0%A6%95%E0%A6%B2" title="ট্রান্সমিশন কন্ট্রোল প্রোটোকল – 孟加拉语" lang="bn" hreflang="bn" data-title="ট্রান্সমিশন কন্ট্রোল প্রোটোকল" data-language-autonym="বাংলা" data-language-local-name="孟加拉语" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-br mw-list-item"><a href="https://br.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 布列塔尼语" lang="br" hreflang="br" data-title="Transmission Control Protocol" data-language-autonym="Brezhoneg" data-language-local-name="布列塔尼语" class="interlanguage-link-target"><span>Brezhoneg</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Transmisijski_kontrolni_protokol" title="Transmisijski kontrolni protokol – 波斯尼亚语" lang="bs" hreflang="bs" data-title="Transmisijski kontrolni protokol" data-language-autonym="Bosanski" data-language-local-name="波斯尼亚语" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 加泰罗尼亚语" lang="ca" hreflang="ca" data-title="Transmission Control Protocol" data-language-autonym="Català" data-language-local-name="加泰罗尼亚语" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 捷克语" lang="cs" hreflang="cs" data-title="Transmission Control Protocol" data-language-autonym="Čeština" data-language-local-name="捷克语" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/TCP" title="TCP – 丹麦语" lang="da" hreflang="da" data-title="TCP" data-language-autonym="Dansk" data-language-local-name="丹麦语" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 德语" lang="de" hreflang="de" data-title="Transmission Control Protocol" data-language-autonym="Deutsch" data-language-local-name="德语" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%A0%CF%81%CF%89%CF%84%CF%8C%CE%BA%CE%BF%CE%BB%CE%BB%CE%BF_%CE%95%CE%BB%CE%AD%CE%B3%CF%87%CE%BF%CF%85_%CE%9C%CE%B5%CF%84%CE%B1%CF%86%CE%BF%CF%81%CE%AC%CF%82" title="Πρωτόκολλο Ελέγχου Μεταφοράς – 希腊语" lang="el" hreflang="el" data-title="Πρωτόκολλο Ελέγχου Μεταφοράς" data-language-autonym="Ελληνικά" data-language-local-name="希腊语" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 英语" lang="en" hreflang="en" data-title="Transmission Control Protocol" data-language-autonym="English" data-language-local-name="英语" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/TCP" title="TCP – 世界语" lang="eo" hreflang="eo" data-title="TCP" data-language-autonym="Esperanto" data-language-local-name="世界语" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Protocolo_de_control_de_transmisi%C3%B3n" title="Protocolo de control de transmisión – 西班牙语" lang="es" hreflang="es" data-title="Protocolo de control de transmisión" data-language-autonym="Español" data-language-local-name="西班牙语" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Edastusohje_protokoll" title="Edastusohje protokoll – 爱沙尼亚语" lang="et" hreflang="et" data-title="Edastusohje protokoll" data-language-autonym="Eesti" data-language-local-name="爱沙尼亚语" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 巴斯克语" lang="eu" hreflang="eu" data-title="Transmission Control Protocol" data-language-autonym="Euskara" data-language-local-name="巴斯克语" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%BE%D8%B1%D9%88%D8%AA%DA%A9%D9%84_%D9%87%D8%AF%D8%A7%DB%8C%D8%AA_%D8%A7%D9%86%D8%AA%D9%82%D8%A7%D9%84" title="پروتکل هدایت انتقال – 波斯语" lang="fa" hreflang="fa" data-title="پروتکل هدایت انتقال" data-language-autonym="فارسی" data-language-local-name="波斯语" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/TCP" title="TCP – 芬兰语" lang="fi" hreflang="fi" data-title="TCP" data-language-autonym="Suomi" data-language-local-name="芬兰语" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 法语" lang="fr" hreflang="fr" data-title="Transmission Control Protocol" data-language-autonym="Français" data-language-local-name="法语" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/TCP" title="TCP – 加利西亚语" lang="gl" hreflang="gl" data-title="TCP" data-language-autonym="Galego" data-language-local-name="加利西亚语" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-gu mw-list-item"><a href="https://gu.wikipedia.org/wiki/%E0%AA%AA%E0%AB%8D%E0%AA%B0%E0%AA%B8%E0%AA%BE%E0%AA%B0%E0%AA%A3_%E0%AA%A8%E0%AA%BF%E0%AA%AF%E0%AA%82%E0%AA%A4%E0%AB%8D%E0%AA%B0%E0%AA%A3_%E0%AA%AA%E0%AB%8D%E0%AA%B0%E0%AB%8B%E0%AA%9F%E0%AB%8B%E0%AA%95%E0%AB%8B%E0%AA%B2" title="પ્રસારણ નિયંત્રણ પ્રોટોકોલ – 古吉拉特语" lang="gu" hreflang="gu" data-title="પ્રસારણ નિયંત્રણ પ્રોટોકોલ" data-language-autonym="ગુજરાતી" data-language-local-name="古吉拉特语" class="interlanguage-link-target"><span>ગુજરાતી</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 希伯来语" lang="he" hreflang="he" data-title="Transmission Control Protocol" data-language-autonym="עברית" data-language-local-name="希伯来语" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%9F%E0%A5%8D%E0%A4%B0%E0%A4%BE%E0%A4%82%E0%A4%B8%E0%A4%AE%E0%A4%BF%E0%A4%B6%E0%A4%A8_%E0%A4%95%E0%A4%82%E0%A4%9F%E0%A5%8D%E0%A4%B0%E0%A5%8B%E0%A4%B2_%E0%A4%AA%E0%A5%8D%E0%A4%B0%E0%A5%8B%E0%A4%9F%E0%A5%8B%E0%A4%95%E0%A5%89%E0%A4%B2" title="ट्रांसमिशन कंट्रोल प्रोटोकॉल – 印地语" lang="hi" hreflang="hi" data-title="ट्रांसमिशन कंट्रोल प्रोटोकॉल" data-language-autonym="हिन्दी" data-language-local-name="印地语" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/TCP" title="TCP – 克罗地亚语" lang="hr" hreflang="hr" data-title="TCP" data-language-autonym="Hrvatski" data-language-local-name="克罗地亚语" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 匈牙利语" lang="hu" hreflang="hu" data-title="Transmission Control Protocol" data-language-autonym="Magyar" data-language-local-name="匈牙利语" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D5%93%D5%B8%D5%AD%D5%A1%D5%B6%D6%81%D5%B4%D5%A1%D5%B6_%D5%AF%D5%A1%D5%BC%D5%A1%D5%BE%D5%A1%D6%80%D5%B4%D5%A1%D5%B6_%D5%B0%D5%A1%D5%B2%D5%B8%D6%80%D5%A4%D5%A1%D5%AF%D5%A1%D6%80%D5%A3" title="Փոխանցման կառավարման հաղորդակարգ – 亚美尼亚语" lang="hy" hreflang="hy" data-title="Փոխանցման կառավարման հաղորդակարգ" data-language-autonym="Հայերեն" data-language-local-name="亚美尼亚语" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Protokol_Kontrol_Transmisi" title="Protokol Kontrol Transmisi – 印度尼西亚语" lang="id" hreflang="id" data-title="Protokol Kontrol Transmisi" data-language-autonym="Bahasa Indonesia" data-language-local-name="印度尼西亚语" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/TCP" title="TCP – 冰岛语" lang="is" hreflang="is" data-title="TCP" data-language-autonym="Íslenska" data-language-local-name="冰岛语" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 意大利语" lang="it" hreflang="it" data-title="Transmission Control Protocol" data-language-autonym="Italiano" data-language-local-name="意大利语" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 日语" lang="ja" hreflang="ja" data-title="Transmission Control Protocol" data-language-autonym="日本語" data-language-local-name="日语" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/TCP" title="TCP – 哈萨克语" lang="kk" hreflang="kk" data-title="TCP" data-language-autonym="Қазақша" data-language-local-name="哈萨克语" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%A0%84%EC%86%A1_%EC%A0%9C%EC%96%B4_%ED%94%84%EB%A1%9C%ED%86%A0%EC%BD%9C" title="전송 제어 프로토콜 – 韩语" lang="ko" hreflang="ko" data-title="전송 제어 프로토콜" data-language-autonym="한국어" data-language-local-name="韩语" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-lb mw-list-item"><a href="https://lb.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 卢森堡语" lang="lb" hreflang="lb" data-title="Transmission Control Protocol" data-language-autonym="Lëtzebuergesch" data-language-local-name="卢森堡语" class="interlanguage-link-target"><span>Lëtzebuergesch</span></a></li><li class="interlanguage-link interwiki-lmo mw-list-item"><a href="https://lmo.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 倫巴底文" lang="lmo" hreflang="lmo" data-title="Transmission Control Protocol" data-language-autonym="Lombard" data-language-local-name="倫巴底文" class="interlanguage-link-target"><span>Lombard</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/TCP" title="TCP – 立陶宛语" lang="lt" hreflang="lt" data-title="TCP" data-language-autonym="Lietuvių" data-language-local-name="立陶宛语" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/TCP" title="TCP – 拉脱维亚语" lang="lv" hreflang="lv" data-title="TCP" data-language-autonym="Latviešu" data-language-local-name="拉脱维亚语" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/TCP" title="TCP – 马其顿语" lang="mk" hreflang="mk" data-title="TCP" data-language-autonym="Македонски" data-language-local-name="马其顿语" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%9F%E0%B5%8D%E0%B4%B0%E0%B4%BE%E0%B5%BB%E0%B4%B8%E0%B5%8D%E0%B4%AE%E0%B4%BF%E0%B4%B7%E0%B5%BB_%E0%B4%95%E0%B5%BA%E0%B4%9F%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B5%BE_%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B4%9F%E0%B5%8D%E0%B4%9F%E0%B5%8B%E0%B4%95%E0%B5%8B%E0%B5%BE" title="ട്രാൻസ്മിഷൻ കൺട്രോൾ പ്രോട്ടോകോൾ – 马拉雅拉姆语" lang="ml" hreflang="ml" data-title="ട്രാൻസ്മിഷൻ കൺട്രോൾ പ്രോട്ടോകോൾ" data-language-autonym="മലയാളം" data-language-local-name="马拉雅拉姆语" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 蒙古语" lang="mn" hreflang="mn" data-title="Transmission Control Protocol" data-language-autonym="Монгол" data-language-local-name="蒙古语" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/Protokol_Kawalan_Penghantaran" title="Protokol Kawalan Penghantaran – 马来语" lang="ms" hreflang="ms" data-title="Protokol Kawalan Penghantaran" data-language-autonym="Bahasa Melayu" data-language-local-name="马来语" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 荷兰语" lang="nl" hreflang="nl" data-title="Transmission Control Protocol" data-language-autonym="Nederlands" data-language-local-name="荷兰语" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 挪威尼诺斯克语" lang="nn" hreflang="nn" data-title="Transmission Control Protocol" data-language-autonym="Norsk nynorsk" data-language-local-name="挪威尼诺斯克语" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/TCP" title="TCP – 书面挪威语" lang="nb" hreflang="nb" data-title="TCP" data-language-autonym="Norsk bokmål" data-language-local-name="书面挪威语" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikipedia.org/wiki/%E0%A8%9F%E0%A8%B0%E0%A8%BE%E0%A8%82%E0%A8%B8%E0%A8%AE%E0%A8%BF%E0%A8%B8%E0%A8%BC%E0%A8%A8_%E0%A8%95%E0%A9%B0%E0%A8%9F%E0%A8%B0%E0%A9%8B%E0%A8%B2_%E0%A8%AA%E0%A9%8D%E0%A8%B0%E0%A9%8B%E0%A8%9F%E0%A9%8B%E0%A8%95%E0%A9%8B%E0%A8%B2" title="ਟਰਾਂਸਮਿਸ਼ਨ ਕੰਟਰੋਲ ਪ੍ਰੋਟੋਕੋਲ – 旁遮普语" lang="pa" hreflang="pa" data-title="ਟਰਾਂਸਮਿਸ਼ਨ ਕੰਟਰੋਲ ਪ੍ਰੋਟੋਕੋਲ" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="旁遮普语" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pam mw-list-item"><a href="https://pam.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 邦板牙语" lang="pam" hreflang="pam" data-title="Transmission Control Protocol" data-language-autonym="Kapampangan" data-language-local-name="邦板牙语" class="interlanguage-link-target"><span>Kapampangan</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Protok%C3%B3%C5%82_sterowania_transmisj%C4%85" title="Protokół sterowania transmisją – 波兰语" lang="pl" hreflang="pl" data-title="Protokół sterowania transmisją" data-language-autonym="Polski" data-language-local-name="波兰语" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Protocolo_de_Controle_de_Transmiss%C3%A3o" title="Protocolo de Controle de Transmissão – 葡萄牙语" lang="pt" hreflang="pt" data-title="Protocolo de Controle de Transmissão" data-language-autonym="Português" data-language-local-name="葡萄牙语" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 罗马尼亚语" lang="ro" hreflang="ro" data-title="Transmission Control Protocol" data-language-autonym="Română" data-language-local-name="罗马尼亚语" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/TCP" title="TCP – 俄语" lang="ru" hreflang="ru" data-title="TCP" data-language-autonym="Русский" data-language-local-name="俄语" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Transmisioni_kontrolni_protokol" title="Transmisioni kontrolni protokol – 塞尔维亚-克罗地亚语" lang="sh" hreflang="sh" data-title="Transmisioni kontrolni protokol" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="塞尔维亚-克罗地亚语" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – Simple English" lang="en-simple" hreflang="en-simple" data-title="Transmission Control Protocol" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Protokol_riadenia_prenosu" title="Protokol riadenia prenosu – 斯洛伐克语" lang="sk" hreflang="sk" data-title="Protokol riadenia prenosu" data-language-autonym="Slovenčina" data-language-local-name="斯洛伐克语" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sq badge-Q70893996 mw-list-item" title=""><a href="https://sq.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 阿尔巴尼亚语" lang="sq" hreflang="sq" data-title="Transmission Control Protocol" data-language-autonym="Shqip" data-language-local-name="阿尔巴尼亚语" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%A2%D1%80%D0%B0%D0%BD%D1%81%D0%BC%D0%B8%D1%81%D0%B8%D0%BE%D0%BD%D0%B8_%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%BD%D0%B8_%D0%BF%D1%80%D0%BE%D1%82%D0%BE%D0%BA%D0%BE%D0%BB" title="Трансмисиони контролни протокол – 塞尔维亚语" lang="sr" hreflang="sr" data-title="Трансмисиони контролни протокол" data-language-autonym="Српски / srpski" data-language-local-name="塞尔维亚语" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 瑞典语" lang="sv" hreflang="sv" data-title="Transmission Control Protocol" data-language-autonym="Svenska" data-language-local-name="瑞典语" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-sw mw-list-item"><a href="https://sw.wikipedia.org/wiki/Itifaki_ya_Kidhibiti_Peleshi" title="Itifaki ya Kidhibiti Peleshi – 斯瓦希里语" lang="sw" hreflang="sw" data-title="Itifaki ya Kidhibiti Peleshi" data-language-autonym="Kiswahili" data-language-local-name="斯瓦希里语" class="interlanguage-link-target"><span>Kiswahili</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%AA%E0%AE%B0%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%95%E0%AF%88_%E0%AE%95%E0%AE%9F%E0%AF%8D%E0%AE%9F%E0%AF%81%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AE%BE%E0%AE%9F%E0%AF%81_%E0%AE%A8%E0%AF%86%E0%AE%B1%E0%AE%BF%E0%AE%AE%E0%AF%81%E0%AE%B1%E0%AF%88" title="பரப்புகை கட்டுப்பாடு நெறிமுறை – 泰米尔语" lang="ta" hreflang="ta" data-title="பரப்புகை கட்டுப்பாடு நெறிமுறை" data-language-autonym="தமிழ்" data-language-local-name="泰米尔语" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%97%E0%B8%B5%E0%B8%8B%E0%B8%B5%E0%B8%9E%E0%B8%B5" title="ทีซีพี – 泰语" lang="th" hreflang="th" data-title="ทีซีพี" data-language-autonym="ไทย" data-language-local-name="泰语" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tl mw-list-item"><a href="https://tl.wikipedia.org/wiki/TCP" title="TCP – 他加禄语" lang="tl" hreflang="tl" data-title="TCP" data-language-autonym="Tagalog" data-language-local-name="他加禄语" class="interlanguage-link-target"><span>Tagalog</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/TCP" title="TCP – 土耳其语" lang="tr" hreflang="tr" data-title="TCP" data-language-autonym="Türkçe" data-language-local-name="土耳其语" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/TCP" title="TCP – 乌克兰语" lang="uk" hreflang="uk" data-title="TCP" data-language-autonym="Українська" data-language-local-name="乌克兰语" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D8%AA%D8%B6%D8%A8%DB%8C%D8%B7_%D8%AA%D8%B1%D8%B3%DB%8C%D9%84_%D8%AF%D8%B3%D8%AA%D9%88%D8%B1" title="تضبیط ترسیل دستور – 乌尔都语" lang="ur" hreflang="ur" data-title="تضبیط ترسیل دستور" data-language-autonym="اردو" data-language-local-name="乌尔都语" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-uz mw-list-item"><a href="https://uz.wikipedia.org/wiki/TCP" title="TCP – 乌兹别克语" lang="uz" hreflang="uz" data-title="TCP" data-language-autonym="Oʻzbekcha / ўзбекча" data-language-local-name="乌兹别克语" class="interlanguage-link-target"><span>Oʻzbekcha / ўзбекча</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/TCP" title="TCP – 越南语" lang="vi" hreflang="vi" data-title="TCP" data-language-autonym="Tiếng Việt" data-language-local-name="越南语" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://wuu.wikipedia.org/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="传输控制协议 – 吴语" lang="wuu" hreflang="wuu" data-title="传输控制协议" data-language-autonym="吴语" data-language-local-name="吴语" class="interlanguage-link-target"><span>吴语</span></a></li><li class="interlanguage-link interwiki-yo mw-list-item"><a href="https://yo.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 约鲁巴语" lang="yo" hreflang="yo" data-title="Transmission Control Protocol" data-language-autonym="Yorùbá" data-language-local-name="约鲁巴语" class="interlanguage-link-target"><span>Yorùbá</span></a></li><li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://zh-min-nan.wikipedia.org/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol – 闽南语" lang="nan" hreflang="nan" data-title="Transmission Control Protocol" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="闽南语" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E5%82%B3%E8%BC%B8%E6%8E%A7%E5%88%B6%E5%8D%94%E8%AD%B0" title="傳輸控制協議 – 粤语" lang="yue" hreflang="yue" data-title="傳輸控制協議" data-language-autonym="粵語" data-language-local-name="粤语" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zu mw-list-item"><a href="https://zu.wikipedia.org/wiki/IGumelo_lokulawula_ukufufukisa" title="IGumelo lokulawula ukufufukisa – 祖鲁语" lang="zu" hreflang="zu" data-title="IGumelo lokulawula ukufufukisa" data-language-autonym="IsiZulu" data-language-local-name="祖鲁语" class="interlanguage-link-target"><span>IsiZulu</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q8803#sitelinks-wikipedia" title="编辑跨语言链接" class="wbc-editpage">编辑链接</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="命名空间"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="浏览条目正文[c]" accesskey="c"><span>条目</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" rel="discussion" title="关于此页面的讨论[t]" accesskey="t"><span>讨论</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown " > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="更改语言变体" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">不转换</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-varlang-0" class="selected ca-variants-zh mw-list-item"><a href="/zh/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh" hreflang="zh"><span>不转换</span></a></li><li id="ca-varlang-1" class="ca-variants-zh-Hans mw-list-item"><a href="/zh-hans/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hans" hreflang="zh-Hans"><span>简体</span></a></li><li id="ca-varlang-2" class="ca-variants-zh-Hant mw-list-item"><a href="/zh-hant/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hant" hreflang="zh-Hant"><span>繁體</span></a></li><li id="ca-varlang-3" class="ca-variants-zh-Hans-CN mw-list-item"><a href="/zh-cn/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hans-CN" hreflang="zh-Hans-CN"><span>大陆简体</span></a></li><li id="ca-varlang-4" class="ca-variants-zh-Hant-HK mw-list-item"><a href="/zh-hk/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hant-HK" hreflang="zh-Hant-HK"><span>香港繁體</span></a></li><li id="ca-varlang-5" class="ca-variants-zh-Hant-MO mw-list-item"><a href="/zh-mo/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hant-MO" hreflang="zh-Hant-MO"><span>澳門繁體</span></a></li><li id="ca-varlang-6" class="ca-variants-zh-Hans-MY mw-list-item"><a href="/zh-my/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hans-MY" hreflang="zh-Hans-MY"><span>大马简体</span></a></li><li id="ca-varlang-7" class="ca-variants-zh-Hans-SG mw-list-item"><a href="/zh-sg/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hans-SG" hreflang="zh-Hans-SG"><span>新加坡简体</span></a></li><li id="ca-varlang-8" class="ca-variants-zh-Hant-TW mw-list-item"><a href="/zh-tw/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" lang="zh-Hant-TW" hreflang="zh-Hant-TW"><span>臺灣正體</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="查看"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"><span>阅读</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit" title="编辑该页面[e]" accesskey="e"><span>编辑</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=history" title="本页面的早前版本。[h]" accesskey="h"><span>查看历史</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="页面工具"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="工具" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">工具</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">工具</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">隐藏</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="更多选项" > <div class="vector-menu-heading"> 操作 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"><span>阅读</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit" title="编辑该页面[e]" accesskey="e"><span>编辑</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=history"><span>查看历史</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> 常规 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:%E9%93%BE%E5%85%A5%E9%A1%B5%E9%9D%A2/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="列出所有与本页相链的页面[j]" accesskey="j"><span>链入页面</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:%E9%93%BE%E5%87%BA%E6%9B%B4%E6%94%B9/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" rel="nofollow" title="页面链出所有页面的更改[k]" accesskey="k"><span>相关更改</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Project:%E4%B8%8A%E4%BC%A0" title="上传图像或多媒体文件[u]" accesskey="u"><span>上传文件</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:%E7%89%B9%E6%AE%8A%E9%A1%B5%E9%9D%A2" title="全部特殊页面的列表[q]" accesskey="q"><span>特殊页面</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;oldid=82562858" title="此页面该修订版本的固定链接"><span>固定链接</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=info" title="关于此页面的更多信息"><span>页面信息</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:%E5%BC%95%E7%94%A8%E6%AD%A4%E9%A1%B5%E9%9D%A2&amp;page=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;id=82562858&amp;wpFormIdentifier=titleform" title="有关如何引用此页面的信息"><span>引用此页</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:URL%E7%BC%A9%E7%9F%AD%E7%A8%8B%E5%BA%8F&amp;url=https%3A%2F%2Fzh.wikipedia.org%2Fwiki%2F%25E4%25BC%25A0%25E8%25BE%2593%25E6%258E%25A7%25E5%2588%25B6%25E5%258D%258F%25E8%25AE%25AE"><span>获取短链接</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fzh.wikipedia.org%2Fwiki%2F%25E4%25BC%25A0%25E8%25BE%2593%25E6%258E%25A7%25E5%2588%25B6%25E5%258D%258F%25E8%25AE%25AE"><span>下载二维码</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> 打印/导出 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=show-download-screen"><span>下载为PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="本页面的可打印版本[p]" accesskey="p"><span>打印页面</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> 在其他项目中 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Transmission_Control_Protocol" hreflang="en"><span>维基共享资源</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q8803" title="链接到连接的数据仓库项目[g]" accesskey="g"><span>维基数据项目</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="页面工具"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="外观"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">外观</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">隐藏</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> <div id="mw-indicator-noteTA-47816ed9" class="mw-indicator"><div class="mw-parser-output"><span class="skin-invert" typeof="mw:File"><span title="本页使用了标题或全文手工转换"><img alt="本页使用了标题或全文手工转换" src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/35px-Zh_conversion_icon_m.svg.png" decoding="async" width="35" height="22" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/53px-Zh_conversion_icon_m.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/70px-Zh_conversion_icon_m.svg.png 2x" data-file-width="32" data-file-height="20" /></span></span></div></div> </div> <div id="siteSub" class="noprint">维基百科,自由的百科全书</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="zh" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r83732972">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}html.client-js body.skin-minerva .mw-parser-output .mbox-text-span{margin-left:23px!important}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .ambox{border-left-color:#36c!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-speedy,html.skin-theme-clientpref-night .mw-parser-output .ambox-delete{border-left-color:#b32424!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-speedy{background-color:#300!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-content{border-left-color:#f28500!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-style{border-left-color:#fc3!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-move{border-left-color:#9932cc!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-protection{border-left-color:#a2a9b1!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .ambox{border-left-color:#36c!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-speedy,html.skin-theme-clientpref-os .mw-parser-output .ambox-delete{border-left-color:#b32424!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-speedy{background-color:#300!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-content{border-left-color:#f28500!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-style{border-left-color:#fc3!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-move{border-left-color:#9932cc!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-protection{border-left-color:#a2a9b1!important}}</style><table class="box-Non-free plainlinks metadata ambox ambox-content" role="presentation"><tbody><tr><td class="mbox-image"><div style="width:52px"><span typeof="mw:File"><a href="/wiki/File:Copyright-problem.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Copyright-problem.svg/50px-Copyright-problem.svg.png" decoding="async" width="50" height="54" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Copyright-problem.svg/75px-Copyright-problem.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Copyright-problem.svg/100px-Copyright-problem.svg.png 2x" data-file-width="111" data-file-height="120" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">此條目<b>或許过多或不当使用<a href="/wiki/Wikipedia:%E8%91%97%E4%BD%9C%E6%9D%83%E4%BF%A1%E6%81%AF" title="Wikipedia:著作权信息">受版权保护</a>的文字、图像及多媒体文件。</b><span class="hide-when-compact"></span> <small class="date-container"><i>(<span class="date">2017年11月25日</span>)</i></small><span class="hide-when-compact"><br /><small>请细阅有关合理使用媒体文件的<a href="/wiki/Wikipedia:%E9%9D%9E%E8%87%AA%E7%94%B1%E5%86%85%E5%AE%B9%E4%BD%BF%E7%94%A8%E5%87%86%E5%88%99" title="Wikipedia:非自由内容使用准则">方针</a>和<a href="/wiki/Wikipedia:%E5%90%88%E7%90%86%E4%BD%BF%E7%94%A8" title="Wikipedia:合理使用">指引</a>,并协助改正<a href="/wiki/Wikipedia:%E4%B8%8D%E8%A6%81%E5%8C%85%E5%90%AB%E5%8E%9F%E5%A7%8B%E8%B5%84%E6%96%99%E7%9A%84%E5%89%AF%E6%9C%AC" title="Wikipedia:不要包含原始资料的副本">违规內容</a>,然后移除此消息框。<a href="/wiki/Talk:%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="Talk:传输控制协议">条目讨论页</a>可能有更多資訊。</small></span><span class="hide-when-compact"></span></div></td></tr></tbody></table> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r83732972"><table class="box-Cleanup-jargon plainlinks metadata ambox ambox-style" role="presentation"><tbody><tr><td class="mbox-image"><div style="width:52px"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Edit-clear.svg/40px-Edit-clear.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Edit-clear.svg/60px-Edit-clear.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Edit-clear.svg/80px-Edit-clear.svg.png 2x" data-file-width="48" data-file-height="48" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">此條目<b>包含過多<a href="/wiki/Wikipedia:%E8%A1%8C%E8%AF%9D%E8%A7%A3%E9%87%8A" title="Wikipedia:行话解释">行話或專業術語</a>,可能需要簡化或提出進一步解釋。</b><span class="hide-when-compact"></span> <small class="date-container"><i>(<span class="date">2018年1月31日</span>)</i></small><span class="hide-when-compact"><br /><small>請在<a href="/wiki/Talk:%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="Talk:传输控制协议">討論頁</a>中發表對於本議題的看法,並移除或解釋本條目中的行話。</small></span><span class="hide-when-compact"></span></div></td></tr></tbody></table> <div id="noteTA-47816ed9" class="noteTA"><div class="noteTA-group"><div data-noteta-group-source="module" data-noteta-group="IT"></div></div><div class="noteTA-local"><div data-noteta-code="zh-cn:面向连接;zh-tw:連接導向"></div></div></div> <style data-mw-deduplicate="TemplateStyles:r84265675">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:" :"}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist-pipe dd::after,.mw-parser-output .hlist-pipe li::after{content:" | ";font-weight:normal}.mw-parser-output .hlist-hyphen dd::after,.mw-parser-output .hlist-hyphen li::after{content:" - ";font-weight:normal}.mw-parser-output .hlist-comma dd::after,.mw-parser-output .hlist-comma li::after{content:"、";font-weight:normal}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:"("counter(listitem)"\a0 "}.mw-parser-output ul.cslist,.mw-parser-output ul.sslist{margin:0;padding:0;display:inline-block;list-style:none}.mw-parser-output .cslist li,.mw-parser-output .sslist li{margin:0;display:inline-block}.mw-parser-output .cslist li::after{content:","}.mw-parser-output .sslist li::after{content:";"}.mw-parser-output .cslist li:last-child::after,.mw-parser-output .sslist li:last-child::after{content:none}</style><style data-mw-deduplicate="TemplateStyles:r84913072">.mw-parser-output .sidebar{width:22em;float:right;clear:right;margin:0.5em 0 1em 1em;background:var(--background-color-neutral-subtle,#f8f9fa);border:1px solid var(--border-color-base,#a2a9b1);padding:0.2em;text-align:center;line-height:1.4em;font-size:88%;border-collapse:collapse;display:table}body.skin-minerva .mw-parser-output .sidebar{display:table!important;float:right!important;margin:0.5em 0 1em 1em!important}.mw-parser-output .sidebar-subgroup{width:100%;margin:0;border-spacing:0}.mw-parser-output .sidebar-left{float:left;clear:left;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-none{float:none;clear:both;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-outer-title{padding:0 0.4em 0.2em;font-size:125%;line-height:1.2em;font-weight:bold}.mw-parser-output .sidebar-top-image{padding:0.4em}.mw-parser-output .sidebar-top-caption,.mw-parser-output .sidebar-pretitle-with-top-image,.mw-parser-output .sidebar-caption{padding:0.2em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-pretitle{padding:0.4em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-title,.mw-parser-output .sidebar-title-with-pretitle{padding:0.2em 0.8em;font-size:145%;line-height:1.2em}.mw-parser-output .sidebar-title-with-pretitle{padding:0.1em 0.4em}.mw-parser-output .sidebar-image{padding:0.2em 0.4em 0.4em}.mw-parser-output .sidebar-heading{padding:0.1em 0.4em}.mw-parser-output .sidebar-content{padding:0 0.5em 0.4em}.mw-parser-output .sidebar-content-with-subgroup{padding:0.1em 0.4em 0.2em}.mw-parser-output .sidebar-above,.mw-parser-output .sidebar-below{padding:0.3em 0.8em;font-weight:bold}.mw-parser-output .sidebar-collapse .sidebar-above,.mw-parser-output .sidebar-collapse .sidebar-below{border-top:1px solid #aaa;border-bottom:1px solid #aaa}.mw-parser-output .sidebar-navbar{text-align:right;font-size:100%;padding:0 0.4em 0.4em}.mw-parser-output .sidebar-list-title{padding:0 0.4em;text-align:left;font-weight:bold;line-height:1.6em;font-size:105%}.mw-parser-output .sidebar-list-title-c{padding:0 0.4em;text-align:center;margin:0 3.3em}@media(max-width:640px){body.mediawiki .mw-parser-output .sidebar{width:100%!important;clear:both;float:none!important;margin-left:0!important;margin-right:0!important}}body.skin--responsive .mw-parser-output .sidebar a>img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-subgroup,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-pretitle,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-heading,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-above,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-below{background:inherit!important;color:inherit!important;border-color:#54595d!important}html.skin-theme-clientpref-night .mw-parser-output .sidebar a:not(.new):not(.mw-selflink):link{color:var(--color-progressive)!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-subgroup,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-pretitle,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-heading,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-above,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-below{background:inherit!important;color:inherit!important;border-color:#54595d!important}html.skin-theme-clientpref-os .mw-parser-output .sidebar a:not(.new):not(.mw-selflink):link{color:var(--color-progressive)!important}}@media print{body.ns-0 .mw-parser-output .sidebar{display:none!important}}</style><table class="sidebar nomobile nowraplinks hlist"><tbody><tr><th class="sidebar-title"><a href="/wiki/TCP/IP%E5%8D%8F%E8%AE%AE%E6%97%8F" title="TCP/IP协议族">網際網路协议套組</a></th></tr><tr><th class="sidebar-heading"> <a href="/wiki/%E5%BA%94%E7%94%A8%E5%B1%82" title="应用层">應用層</a></th></tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/%E8%BE%B9%E7%95%8C%E7%BD%91%E5%85%B3%E5%8D%8F%E8%AE%AE" title="边界网关协议">BGP</a></li> <li><a href="/wiki/%E5%8A%A8%E6%80%81%E4%B8%BB%E6%9C%BA%E8%AE%BE%E7%BD%AE%E5%8D%8F%E8%AE%AE" title="动态主机设置协议">DHCP</a></li> <li><a href="/wiki/%E5%9F%9F%E5%90%8D%E7%B3%BB%E7%BB%9F" title="域名系统">DNS</a></li> <li><a href="/wiki/%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="文件传输协议">FTP</a></li> <li><a href="/wiki/%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="超文本传输协议">HTTP</a></li> <li><a href="/wiki/%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%AE%89%E5%85%A8%E5%8D%8F%E8%AE%AE" title="超文本传输安全协议">HTTPS</a></li> <li><a href="/wiki/%E5%9B%A0%E7%89%B9%E7%BD%91%E4%BF%A1%E6%81%AF%E8%AE%BF%E9%97%AE%E5%8D%8F%E8%AE%AE" title="因特网信息访问协议">IMAP</a></li> <li><a href="/wiki/%E8%BD%BB%E5%9E%8B%E7%9B%AE%E5%BD%95%E8%AE%BF%E9%97%AE%E5%8D%8F%E8%AE%AE" title="轻型目录访问协议">LDAP</a></li> <li><span class="ilh-all" data-orig-title="媒體閘道控制協定" data-lang-code="en" data-lang-name="英语" data-foreign-title="Media Gateway Control Protocol"><span class="ilh-page"><a href="/w/index.php?title=%E5%AA%92%E9%AB%94%E9%96%98%E9%81%93%E6%8E%A7%E5%88%B6%E5%8D%94%E5%AE%9A&amp;action=edit&amp;redlink=1" class="new" title="媒體閘道控制協定(页面不存在)">MGCP</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/Media_Gateway_Control_Protocol" class="extiw" title="en:Media Gateway Control Protocol"><span lang="en" dir="auto">Media Gateway Control Protocol</span></a></span>)</span></span></li> <li><a href="/wiki/MQTT" title="MQTT">MQTT</a></li> <li><a href="/wiki/%E7%B6%B2%E8%B7%AF%E6%96%B0%E8%81%9E%E5%82%B3%E8%BC%B8%E5%8D%94%E5%AE%9A" title="網路新聞傳輸協定">NNTP</a></li> <li><a href="/wiki/%E7%B6%B2%E8%B7%AF%E6%99%82%E9%96%93%E5%8D%94%E5%AE%9A" title="網路時間協定">NTP</a></li> <li><a href="/wiki/%E9%83%B5%E5%B1%80%E5%8D%94%E5%AE%9A" title="郵局協定">POP</a></li> <li><a href="/wiki/%E9%96%8B%E6%94%BE%E7%B6%B2%E8%B7%AF%E9%81%8B%E7%AE%97%E9%81%A0%E7%AB%AF%E7%A8%8B%E5%BA%8F%E5%91%BC%E5%8F%AB" title="開放網路運算遠端程序呼叫">ONC/RPC</a></li> <li><a href="/wiki/%E5%AE%9E%E6%97%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="实时传输协议">RTP</a></li> <li><a href="/wiki/%E5%8D%B3%E6%99%82%E4%B8%B2%E6%B5%81%E5%8D%94%E5%AE%9A" title="即時串流協定">RTSP</a></li> <li><a href="/wiki/%E5%B0%8D%E8%A9%B1%E5%95%9F%E5%8B%95%E5%8D%94%E5%AE%9A" title="對話啟動協定">SIP</a></li> <li><a href="/wiki/%E7%AE%80%E5%8D%95%E9%82%AE%E4%BB%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="简单邮件传输协议">SMTP</a></li> <li><a href="/wiki/%E7%AE%80%E5%8D%95%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86%E5%8D%8F%E8%AE%AE" title="简单网络管理协议">SNMP</a></li> <li><a href="/wiki/Telnet" title="Telnet">Telnet</a></li> <li><a href="/wiki/%E5%82%B3%E8%BC%B8%E5%B1%A4%E5%AE%89%E5%85%A8%E6%80%A7%E5%8D%94%E5%AE%9A" title="傳輸層安全性協定">TLS/SSL</a></li> <li><a href="/wiki/Secure_Shell" title="Secure Shell">SSH</a></li> <li><a href="/wiki/XMPP" title="XMPP">XMPP</a></li> <li><a href="/wiki/Category:%E5%BA%94%E7%94%A8%E5%B1%82%E5%8D%8F%E8%AE%AE" title="Category:应用层协议"><i>更多...</i></a></li></ul></td> </tr><tr><th class="sidebar-heading"> <a href="/wiki/%E4%BC%A0%E8%BE%93%E5%B1%82" title="传输层">傳輸層</a></th></tr><tr><td class="sidebar-content"> <ul><li><a class="mw-selflink selflink">TCP</a></li> <li><a href="/wiki/%E7%94%A8%E6%88%B7%E6%95%B0%E6%8D%AE%E6%8A%A5%E5%8D%8F%E8%AE%AE" title="用户数据报协议">UDP</a></li> <li><a href="/wiki/%E6%95%B0%E6%8D%AE%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE" title="数据拥塞控制协议">DCCP</a></li> <li><a href="/wiki/%E6%B5%81%E6%8E%A7%E5%88%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="流控制传输协议">SCTP</a></li> <li><a href="/wiki/%E8%B5%84%E6%BA%90%E9%A2%84%E7%95%99%E5%8D%8F%E8%AE%AE" title="资源预留协议">RSVP</a></li> <li><a href="/wiki/Category:%E4%BC%A0%E8%BE%93%E5%B1%82%E5%8D%8F%E8%AE%AE" title="Category:传输层协议"><i>更多...</i></a></li></ul></td> </tr><tr><th class="sidebar-heading"> <a href="/wiki/%E7%B6%B2%E7%B5%A1%E5%B1%A4" class="mw-redirect" title="網絡層">網路層</a></th></tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/%E7%BD%91%E9%99%85%E5%8D%8F%E8%AE%AE" title="网际协议">IP</a> <ul><li><a href="/wiki/IPv4" title="IPv4">IPv4</a></li> <li><a href="/wiki/IPv6" title="IPv6">IPv6</a></li></ul></li> <li><a href="/wiki/%E4%BA%92%E8%81%94%E7%BD%91%E6%8E%A7%E5%88%B6%E6%B6%88%E6%81%AF%E5%8D%8F%E8%AE%AE" title="互联网控制消息协议">ICMP</a></li> <li><a href="/wiki/%E4%BA%92%E8%81%94%E7%BD%91%E6%8E%A7%E5%88%B6%E6%B6%88%E6%81%AF%E5%8D%8F%E8%AE%AE%E7%AC%AC%E5%85%AD%E7%89%88" title="互联网控制消息协议第六版">ICMPv6</a></li> <li><a href="/wiki/%E6%98%BE%E5%BC%8F%E6%8B%A5%E5%A1%9E%E9%80%9A%E7%9F%A5" title="显式拥塞通知">ECN</a></li> <li><a href="/wiki/%E5%9B%A0%E7%89%B9%E7%BD%91%E7%BB%84%E7%AE%A1%E7%90%86%E5%8D%8F%E8%AE%AE" title="因特网组管理协议">IGMP</a></li> <li><a href="/wiki/%E5%BC%80%E6%94%BE%E5%BC%8F%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84%E4%BC%98%E5%85%88" title="开放式最短路径优先">OSPF</a></li> <li><a href="/wiki/IPsec" title="IPsec">IPsec</a></li> <li><a href="/wiki/%E8%B7%AF%E7%94%B1%E4%BF%A1%E6%81%AF%E5%8D%8F%E8%AE%AE" title="路由信息协议">RIP</a></li> <li><a href="/wiki/Category:%E7%BD%91%E7%BB%9C%E5%B1%82%E5%8D%8F%E8%AE%AE" title="Category:网络层协议"><i>更多...</i></a></li></ul></td> </tr><tr><th class="sidebar-heading"> <a href="/wiki/%E9%80%A3%E7%B5%90%E5%B1%A4" title="連結層">連結層</a></th></tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90%E5%8D%8F%E8%AE%AE" title="地址解析协议">ARP</a></li> <li><a href="/wiki/%E9%82%BB%E5%B1%85%E5%8F%91%E7%8E%B0%E5%8D%8F%E8%AE%AE" title="邻居发现协议">NDP</a></li> <li><a href="/wiki/%E9%9A%A7%E9%81%93%E5%8D%8F%E8%AE%AE" title="隧道协议">Tunnels</a> <ul><li><a href="/wiki/%E7%AC%AC%E4%BA%8C%E5%B1%82%E9%9A%A7%E9%81%93%E5%8D%8F%E8%AE%AE" title="第二层隧道协议">L2TP</a></li></ul></li> <li><a href="/wiki/%E7%82%B9%E5%AF%B9%E7%82%B9%E5%8D%8F%E8%AE%AE" title="点对点协议">PPP</a></li> <li><a href="/wiki/%E4%BB%8B%E8%B4%A8%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6" title="介质访问控制">MAC</a> <ul><li><a href="/wiki/%E4%BB%A5%E5%A4%AA%E7%BD%91" title="以太网">Ethernet</a></li> <li><a href="/wiki/%E6%95%B0%E5%AD%97%E7%94%A8%E6%88%B7%E7%BA%BF%E8%B7%AF" title="数字用户线路">DSL</a></li> <li><a href="/wiki/%E7%BB%BC%E5%90%88%E4%B8%9A%E5%8A%A1%E6%95%B0%E5%AD%97%E7%BD%91" title="综合业务数字网">ISDN</a></li> <li><a href="/wiki/%E5%85%89%E7%BA%A4%E5%88%86%E5%B8%83%E5%BC%8F%E6%95%B0%E6%8D%AE%E6%8E%A5%E5%8F%A3" title="光纤分布式数据接口">FDDI</a></li></ul></li> <li><a href="/wiki/Category:%E9%93%BE%E8%B7%AF%E5%8D%8F%E8%AE%AE" title="Category:链路协议"><i>更多...</i></a></li></ul></td> </tr><tr><td class="sidebar-navbar" style="line-height:1.6"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r84265675"><style data-mw-deduplicate="TemplateStyles:r84244141">.mw-parser-output .navbar{display:inline;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:110%;margin:0 8em}.mw-parser-output .navbar-ct-mini{font-size:110%;margin:0 5em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:%E7%BD%91%E7%BB%9C%E5%8D%8F%E8%AE%AE" title="Template:网络协议"><abbr title="查看该模板">查</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:%E7%BD%91%E7%BB%9C%E5%8D%8F%E8%AE%AE" title="Template talk:网络协议"><abbr title="讨论该模板">论</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:%E7%BC%96%E8%BE%91%E9%A1%B5%E9%9D%A2/Template:%E7%BD%91%E7%BB%9C%E5%8D%8F%E8%AE%AE" title="Special:编辑页面/Template:网络协议"><abbr title="编辑该模板">编</abbr></a></li></ul></div></td></tr></tbody></table> <p><b>传输控制协议</b>(英語:<span lang="en"><b>T</b>ransmission <b>C</b>ontrol <b>P</b>rotocol</span>,縮寫:<span lang="en"><b>TCP</b></span>)是一种面向连接的、可靠的、基于<a href="/wiki/%E5%AD%97%E7%AF%80%E6%B5%81" class="mw-redirect" title="字節流">字节流</a>的<a href="/wiki/%E4%BC%A0%E8%BE%93%E5%B1%82" title="传输层">传输层</a><a href="/wiki/%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE" title="通信协议">通信协议</a>,由<a href="/wiki/IETF" class="mw-redirect" title="IETF">IETF</a>的<a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc793" class="extiw" title="rfc:793">793</a>定义。在简化的计算机网络<a href="/wiki/OSI%E6%A8%A1%E5%9E%8B" title="OSI模型">OSI模型</a>中,它完成第四层传输层所指定的功能。<a href="/wiki/%E7%94%A8%E6%88%B7%E6%95%B0%E6%8D%AE%E6%8A%A5%E5%8D%8F%E8%AE%AE" title="用户数据报协议">用户数据报协议</a>(UDP)是同一层内另一个重要的传输协议。 </p><p>在因特网协议族(<span lang="en">Internet protocol suite</span>)中,TCP层是位于<a href="/wiki/%E7%BD%91%E9%99%85%E5%8D%8F%E8%AE%AE" title="网际协议">IP</a>层之上,<a href="/wiki/%E5%BA%94%E7%94%A8%E5%B1%82" title="应用层">应用层</a>之下的中间层。不同主机的应用层之间经常需要可靠的、像<a href="/wiki/%E7%AE%A1%E9%81%93_(Unix)" title="管道 (Unix)">管道</a>一样的连接,但是IP层不提供这样的流机制,而是提供不可靠的包交换。 </p><p>应用层向TCP层发送用于网间传输的、用8位字节表示的数据流,然后TCP把数据流分割成适当长度的报文段(通常受该计算机连接的网络的数据链路层的<a href="/wiki/%E6%9C%80%E5%A4%A7%E4%BC%A0%E8%BE%93%E5%8D%95%E5%85%83" title="最大传输单元">最大传输单元</a>(MTU)的限制)。之后TCP把结果包传给IP层,由它来透过网络将包传送给接收端实体的TCP层。TCP为了保证不发生丢包,就给每个包一个序号,同时序号也保证了传送到接收端实体的包的按序接收。然后接收端实体对已成功收到的包发回一个相应的<a href="/wiki/%E7%A2%BA%E8%AA%8D%E8%A8%8A%E6%81%AF" title="確認訊息">确认信息</a>(ACK);如果发送端实体在合理的<a href="/wiki/%E4%BE%86%E5%9B%9E%E9%80%9A%E8%A8%8A%E5%BB%B6%E9%81%B2" title="來回通訊延遲">往返时延</a>(RTT)内未收到确认,那么对应的数据包就被假设为<a href="/wiki/%E4%B8%A2%E5%8C%85" title="丢包">已丢失</a>并进行重传。TCP用一个<a href="/wiki/%E6%A0%A1%E9%AA%8C%E5%92%8C" title="校验和">校验和</a>函数来检验数据是否有错误,在发送和接收时都要计算校验和。 </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="简介"><span id=".E7.AE.80.E4.BB.8B"></span>简介</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=1" title="编辑章节:简介"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>数据在TCP层称为流(Stream),数据分组称为分段(Segment)。作为比较,数据在IP层称为Datagram,数据分组称为分片(Fragment)。 UDP 中分组称为Message。 </p> <div class="mw-heading mw-heading2"><h2 id="运作方式"><span id=".E8.BF.90.E4.BD.9C.E6.96.B9.E5.BC.8F"></span>运作方式</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=2" title="编辑章节:运作方式"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Tcp_state_diagram_fixed_new.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Tcp_state_diagram_fixed_new.svg/250px-Tcp_state_diagram_fixed_new.svg.png" decoding="async" width="250" height="188" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Tcp_state_diagram_fixed_new.svg/375px-Tcp_state_diagram_fixed_new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Tcp_state_diagram_fixed_new.svg/500px-Tcp_state_diagram_fixed_new.svg.png 2x" data-file-width="1084" data-file-height="817" /></a><figcaption>简化版的TCP状态图。更详细的版本见: <a rel="nofollow" class="external text" href="http://www.medianet.kent.edu/techreports/TR2005-07-22-tcp-EFSM.pdf">TCP EFSM 图</a> (<a rel="nofollow" class="external text" href="//web.archive.org/web/20200327140827/http://www.medianet.kent.edu/techreports/TR2005-07-22-tcp-EFSM.pdf">页面存档备份</a>,存于<a href="/wiki/%E4%BA%92%E8%81%94%E7%BD%91%E6%A1%A3%E6%A1%88%E9%A6%86" title="互联网档案馆">互联网档案馆</a>),包含了ESTABLISHED状态的内部状态。</figcaption></figure> <p>TCP协议的运行可划分为三个阶段:连接建立(<i>connection establishment</i>)、数据传送(<i>data transfer</i>)和连接终止(<i>connection termination</i>)。操作系统将TCP连接抽象为<a href="/wiki/Berkeley%E5%A5%97%E6%8E%A5%E5%AD%97" title="Berkeley套接字">套接字</a>表示的本地端点(local end-point),作为编程接口给程序使用。在TCP连接的生命期内,本地端点要经历一系列的<a href="#状态编码">状态</a>改变。<sup id="cite_ref-#1_1-0" class="reference"><a href="#cite_note-#1-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="建立通路"><span id=".E5.BB.BA.E7.AB.8B.E9.80.9A.E8.B7.AF"></span>建立通路</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=3" title="编辑章节:建立通路"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>TCP用三次<a href="/wiki/%E6%8F%A1%E6%89%8B_(%E6%8A%80%E6%9C%AF)" title="握手 (技术)">握手</a>(或称三路握手,<span lang="en">three-way handshake</span>)过程建立一个连接。在连接建立过程中,很多参数要被初始化,例如序号被初始化以保证按序传输和连接的强壮性。 </p> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Connection_TCP.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Connection_TCP.png/220px-Connection_TCP.png" decoding="async" width="220" height="189" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Connection_TCP.png/330px-Connection_TCP.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Connection_TCP.png/440px-Connection_TCP.png 2x" data-file-width="525" data-file-height="451" /></a><figcaption>TCP连接的正常建立</figcaption></figure> <p>一对终端同时初始化一个它们之间的连接是可能的。但通常是由一端(服务器端)打开一个<a href="/wiki/Berkeley%E5%A5%97%E6%8E%A5%E5%AD%97" title="Berkeley套接字">套接字</a>(<a href="/wiki/Socket" class="mw-redirect" title="Socket">socket</a>)然后监听来自另一方(客户端)的连接,这就是通常所指的被动打开(passive open)。服务器端被被动打开以后,客户端就能开始建立主动打开(active open)。 </p><p>服务器端执行了listen函数后,就在服务器上建立起两个队列: </p> <ul><li>SYN队列:存放完成了二次握手的结果。 队列长度由listen函数的参数backlog指定。</li> <li>ACCEPT队列:存放完成了三次握手的结果。队列长度由listen函数的参数backlog指定。</li></ul> <p>三次握手协议的过程: </p> <ol><li>客户端(通过执行connect函数)向服务器端发送一个SYN包,请求一个主动打开。该包携带客户端为这个连接请求而设定的随机数<b>A</b>作为消息序列号。</li> <li>服务器端收到一个合法的SYN包后,把该包放入SYN队列中;回送一个SYN/ACK。ACK的确认码应为<b>A+1</b>,SYN/ACK包本身携带一个随机产生的序号<b>B</b>。</li> <li>客户端收到SYN/ACK包后,发送一个<a href="/wiki/%E7%A2%BA%E8%AA%8D%E8%A8%8A%E6%81%AF" title="確認訊息">ACK包</a>,该包的序号被设定为<b>A+1</b>,而ACK的确认码则为<b>B+1</b>。然后客户端的connect函数成功返回。当服务器端收到这个ACK包的时候,把请求帧从SYN队列中移出,放至ACCEPT队列中;这时accept函数如果处于阻塞状态,可以被唤醒,从ACCEPT队列中取出ACK包,重新建立一个新的用于双向通信的sockfd,并返回。</li></ol> <p>如果服务器端接到了客户端发的SYN后回了SYN-ACK后客户端掉线了,服务器端没有收到客户端回来的ACK,那么,这个连接处于一个中间状态,既没成功,也没失败。于是,服务器端如果在一定时间内没有收到的TCP会重发SYN-ACK。在Linux下,默认重试次数为5次,重试的间隔时间从1s开始每次都翻倍,5次的重试时间间隔为1s, 2s, 4s, 8s, 16s,总共31s,第5次发出后还要等32s才知道第5次也超时了,所以,总共需要 1s + 2s + 4s+ 8s+ 16s + 32s = 63s,TCP才会断开这个连接。使用三个TCP参数来调整行为:tcp_synack_retries 减少重试次数;tcp_max_syn_backlog,增大SYN连接数;tcp_abort_on_overflow决定超出能力时的行为。 </p><p>“三次握手”的目的是“为了防止已失效的连接(connect)请求报文段传送到了服务端,因而产生错误”,也即为了解决“网络中存在延迟的重复分组”问题。例如:client发出的第一个连接请求报文段并没有丢失,而是在某个网络结点长时间的滞留了,以致延误到连接释放以后的某个时间才到达server。本来这是一个早已失效的报文段。但server收到此失效的连接请求报文段后,就误认为是client发出的一个新的连接请求。于是就向client发出确认报文段,同意建立连接。假设不采用“三次握手”,那么只要server发出确认,新的连接就建立了。由于现在client并没有发出建立连接的请求,因此不会理睬server的确认,也不会向server发送数据。但server却以为新的运输连接已经建立,并一直等待client发来数据。这样,server的很多资源就白白浪费掉了。采用“三次握手”的办法可以防止上述现象发生,client不会向server的确认发出确认。server由于收不到确认,就知道client并没有要求建立连接。 </p> <div class="mw-heading mw-heading3"><h3 id="资源使用"><span id=".E8.B5.84.E6.BA.90.E4.BD.BF.E7.94.A8"></span>资源使用</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=4" title="编辑章节:资源使用"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>主机收到一个TCP包时,用两端的IP地址与端口号来标识这个TCP包属于哪个session。使用一张表来存储所有的session,表中的每条称作Transmission Control Block(TCB),tcb结构的定义包括连接使用的源端口、目的端口、目的ip、序号、应答序号、对方窗口大小、己方窗口大小、tcp状态、tcp输入/输出队列、应用层输出队列、tcp的重传有关变量等。 </p><p>服务器端的连接数量是无限的,只受内存的限制。客户端的连接数量,过去由于在发送第一个SYN到服务器之前需要先分配一个随机空闲的端口,这限制了客户端IP地址的对外发出连接的数量上限。从Linux 4.2开始,有了socket选项IP_BIND_ADDRESS_NO_PORT,它通知Linux内核不保留usingbind使用端口号为0时内部使用的临时端口(ephemeral port),在connect时会自动选择端口以组成独一无二的四元组(同一个客户端端口可用于连接不同的服务器<a href="/wiki/%E5%A5%97%E6%8E%A5%E5%AD%97" class="mw-redirect" title="套接字">套接字</a>;同一个服务器端口可用于接受不同客户端套接字的连接)。<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> </p><p>对于不能确认的包、接收但还没读取的数据,都会占用操作系统的资源。 </p> <div class="mw-heading mw-heading3"><h3 id="数据传输"><span id=".E6.95.B0.E6.8D.AE.E4.BC.A0.E8.BE.93"></span>数据传输</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=5" title="编辑章节:数据传输"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>在TCP的数据传送状态,很多重要的机制保证了TCP的可靠性和强壮性。它们包括:使用序号,对收到的TCP报文段进行排序以及检测重复的数据;使用校验和检测报文段的错误,即无错传输<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup>;使用确认和计时器来检测和纠正丢包或延时;流控制(Flow control);拥塞控制(Congestion control);丢失包的重传。 </p> <div class="mw-heading mw-heading4"><h4 id="可靠传输"><span id=".E5.8F.AF.E9.9D.A0.E4.BC.A0.E8.BE.93"></span>可靠传输</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=6" title="编辑章节:可靠传输"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>通常在每个TCP报文段中都有一对序号和确认号。TCP报文发送者称自己的字节流的编号为序号(<i>sequence number</i>),称接收到对方的字节流编号为确认号。TCP报文的接收者为了确保可靠性,在接收到一定数量的连续字节流后才发送确认。这是对TCP的一种扩展,称为选择确认(<span lang="en">Selective Acknowledgement</span>)。选择确认使得TCP接收者可以对乱序到达的数据块进行确认。每一个字节传输过后,SN号都会递增1。 </p><p>通过使用序号和确认号,TCP层可以把收到的报文段中的字节按正确的顺序交付给应用层。序号是32位的无符号数,在它增大到2<sup>32</sup>-1时,便会回绕到0。对于初始化序列号(ISN)的选择是TCP中关键的一个操作,它可以确保强壮性和安全性。 </p><p>TCP协议使用序号标识每端发出的字节的顺序,从而另一端接收数据时可以重建顺序,无惧传输时的<span class="ilh-all" data-orig-title="包的乱序交付" data-lang-code="en" data-lang-name="英语" data-foreign-title="packet reordering"><span class="ilh-page"><a href="/w/index.php?title=%E5%8C%85%E7%9A%84%E4%B9%B1%E5%BA%8F%E4%BA%A4%E4%BB%98&amp;action=edit&amp;redlink=1" class="new" title="包的乱序交付(页面不存在)">包的乱序交付</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/packet_reordering" class="extiw" title="en:packet reordering"><span lang="en" dir="auto">packet reordering</span></a></span>)</span></span>或<a href="/wiki/%E4%B8%A2%E5%8C%85" title="丢包">丢包</a>。在发送第一个包时(SYN包),选择一个随机数作为序号的初值,以克制<span class="ilh-all" data-orig-title="TCP序号预测攻击" data-lang-code="en" data-lang-name="英语" data-foreign-title="TCP sequence prediction attack"><span class="ilh-page"><a href="/w/index.php?title=TCP%E5%BA%8F%E5%8F%B7%E9%A2%84%E6%B5%8B%E6%94%BB%E5%87%BB&amp;action=edit&amp;redlink=1" class="new" title="TCP序号预测攻击(页面不存在)">TCP序号预测攻击</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/TCP_sequence_prediction_attack" class="extiw" title="en:TCP sequence prediction attack"><span lang="en" dir="auto">TCP sequence prediction attack</span></a></span>)</span></span>. </p><p>发送确认包(Acks),携带了接收到的对方发来的字节流的编号,称为确认号,以告诉对方已经成功接收的数据流的字节位置。Ack并不意味着数据已经交付了上层应用程序。 </p><p>可靠性通过发送方检测到丢失的传输数据并重传这些数据。包括超时重传(Retransmission timeout,RTO)与重复累计确认(duplicate cumulative acknowledgements,DupAcks)。 </p> <div class="mw-heading mw-heading5"><h5 id="基于重复累计确认的重传"><span id=".E5.9F.BA.E4.BA.8E.E9.87.8D.E5.A4.8D.E7.B4.AF.E8.AE.A1.E7.A1.AE.E8.AE.A4.E7.9A.84.E9.87.8D.E4.BC.A0"></span>基于重复累计确认的重传</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=7" title="编辑章节:基于重复累计确认的重传"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>如果一个包(不妨设它的序号是100,即该包始于第100字节)丢失,接收方就不能确认这个包及其以后的包,因为采用了累计ack。接收方在收到100以后的包时,发出对包含第99字节的包的确认。这种重复确认是包丢失的信号。发送方如果收到3次对同一个包的确认,就重传最后一个未被确认的包。阈值设为3被证实可以减少乱序包导致的无作用的重传(spurious retransmission)现象。<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> <a href="#选择性确认">选择性确认</a>(SACK)的使用能明确反馈哪个包收到了,极大改善了TCP重传必要的包的能力。 </p> <div class="mw-heading mw-heading5"><h5 id="超时重传"><span id=".E8.B6.85.E6.97.B6.E9.87.8D.E4.BC.A0"></span>超时重传</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=8" title="编辑章节:超时重传"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>发送方使用一个保守估计的时间作为收到数据包的确认的超时上限。如果超过这个上限仍未收到确认包,发送方将重传这个数据包。每当发送方收到确认包后,会重置这个重传定时器。典型地,定时器的值设定为 <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{smoothed RTT}}+\max(G,4\times {\text{RTT variation}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>smoothed RTT</mtext> </mrow> <mo>+</mo> <mo movablelimits="true" form="prefix">max</mo> <mo stretchy="false">(</mo> <mi>G</mi> <mo>,</mo> <mn>4</mn> <mo>&#x00D7;<!-- × --></mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>RTT variation</mtext> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{smoothed RTT}}+\max(G,4\times {\text{RTT variation}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/32319283141584248ce57da63837f20742f4c2ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:45.95ex; height:2.843ex;" alt="{\displaystyle {\text{smoothed RTT}}+\max(G,4\times {\text{RTT variation}})}"></span> 其中<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle G}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>G</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle G}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f5f3c8921a3b352de45446a6789b104458c9f90b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.827ex; height:2.176ex;" alt="{\displaystyle G}"></span>是时钟粒度。<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> 进一步,如果重传定时器被触发,仍然没有收到确认包,定时器的值将被设为前次值的二倍(直到特定阈值)。这是由于存在一类通过欺骗发送者使其重传多次,进而压垮接收者的攻击,而使用前述的定时器策略可以避免此类<a href="/wiki/%E4%B8%AD%E9%97%B4%E4%BA%BA%E6%94%BB%E5%87%BB" title="中间人攻击">中间人攻击</a>方式的<a href="/wiki/%E6%8B%92%E7%BB%9D%E6%9C%8D%E5%8A%A1%E6%94%BB%E5%87%BB" class="mw-redirect" title="拒绝服务攻击">拒绝服务攻击</a>。 </p> <div class="mw-heading mw-heading4"><h4 id="数据传输举例"><span id=".E6.95.B0.E6.8D.AE.E4.BC.A0.E8.BE.93.E4.B8.BE.E4.BE.8B"></span>数据传输举例</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=9" title="编辑章节:数据传输举例"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure typeof="mw:File/Thumb"><a href="/wiki/File:Tcp_transport_example.gif" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Tcp_transport_example.gif/350px-Tcp_transport_example.gif" decoding="async" width="350" height="207" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Tcp_transport_example.gif/525px-Tcp_transport_example.gif 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Tcp_transport_example.gif/700px-Tcp_transport_example.gif 2x" data-file-width="994" data-file-height="589" /></a><figcaption>TCP数据传输</figcaption></figure> <ol><li>发送方首先发送第一个包含序列号为1(可变化)和1460字节数据的TCP报文段给接收方。接收方以一个没有数据的TCP报文段来回复(只含报头),用确认号1461来表示已完全收到并请求下一个报文段。</li> <li>发送方然后发送第二个包含序列号为1461,长度为1460字节的数据的TCP报文段给接收方。正常情况下,接收方以一个没有数据的TCP报文段来回复,用确认号2921(1461+1460)来表示已完全收到并请求下一个报文段。发送接收这样继续下去。</li> <li>然而当这些数据包都是相连的情况下,接收方没有必要每一次都回应。比如,他收到第1到5条TCP报文段,只需回应第五条就行了。在例子中第3条TCP报文段被丢失了,所以尽管他收到了第4和5条,然而他只能回应第2条。</li> <li>发送方在发送了第三条以后,没能收到回应,因此当时钟(<span lang="en">timer</span>)过时(<span lang="en">expire</span>)时,他重发第三条。(每次发送者发送一条TCP报文段后,都会再次启动一次时钟:RTT)。</li> <li>这次第三条被成功接收,接收方可以直接确认第5条,因为4,5两条已收到。</li></ol> <div class="mw-heading mw-heading4"><h4 id="校验和"><span id=".E6.A0.A1.E9.AA.8C.E5.92.8C"></span>校验和</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=10" title="编辑章节:校验和"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>TCP的16位的<a href="/wiki/%E6%A0%A1%E9%AA%8C%E5%92%8C" title="校验和">校验和</a>(checksum)的计算和检验过程如下:发送者将TCP报文段的头部和数据部分的和计算出来,再对其求<a href="/wiki/%E5%8F%8D%E7%A0%81" class="mw-redirect" title="反码">反码</a>(<a href="/wiki/%E4%B8%80%E8%A3%9C%E6%95%B8" title="一補數">一的補數</a>),就得到了校验和,然后将结果装入报文中传输。(这里用反码和的原因是这种方法的循环进位使校验和可以在16位、32位、64位等情况下的计算结果再叠加后相同)接收者在收到报文后再按相同的算法计算一次校验和。这里使用的反码使得接收者不用再将校验和字段保存起来后清零,而可以直接将报文段连同校验加總。如果计算结果是全部為一,那么就表示了报文的完整性和正确性。 </p><p>注意:TCP校验和也包括了96位的伪头部,其中有源地址、目的地址、协议以及TCP的长度。这可以避免报文被错误地路由。 </p><p>按现在的标准,TCP的校验和是一个比较脆弱的校验。出错概率高的数据链路层需要更高的能力来探测和纠正连接错误。TCP如果是在今天设计的,它很可能有一个32位的<a href="/wiki/%E5%BE%AA%E7%8E%AF%E5%86%97%E4%BD%99%E6%A0%A1%E9%AA%8C" class="mw-redirect" title="循环冗余校验">CRC校验</a>来纠错,而不是使用校验和。但是通过在第二层使用通常的<a href="/wiki/%E5%BE%AA%E7%8E%AF%E5%86%97%E4%BD%99%E6%A0%A1%E9%AA%8C" class="mw-redirect" title="循环冗余校验">CRC校验</a>或更完全一点的校验可以部分地弥补这种脆弱的校验。第二层是在TCP层和IP层之下的,比如<a href="/wiki/PPP" class="mw-disambig" title="PPP">PPP</a>或<a href="/wiki/%E4%BB%A5%E5%A4%AA%E7%BD%91" title="以太网">以太网</a>,它们使用了这些校验。但是这也并不意味着TCP的16位校验和是冗余的,对于因特网传输的观察,表明在受<a href="/wiki/%E5%BE%AA%E7%8E%AF%E5%86%97%E4%BD%99%E6%A0%A1%E9%AA%8C" class="mw-redirect" title="循环冗余校验">CRC校验</a>保护的各跳之间,软件和硬件的错误通常也会在报文中引入错误,而端到端的TCP校验能够捕捉到大部分简单的错误。<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> 这就是应用中的<a href="/w/index.php?title=%E7%AB%AF%E5%88%B0%E7%AB%AF&amp;action=edit&amp;redlink=1" class="new" title="端到端(页面不存在)">端到端</a>原则。 </p> <div class="mw-heading mw-heading4"><h4 id="流量控制"><span id=".E6.B5.81.E9.87.8F.E6.8E.A7.E5.88.B6"></span>流量控制</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=11" title="编辑章节:流量控制"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/%E6%B5%81%E9%87%8F%E6%8E%A7%E5%88%B6_(%E6%95%B0%E6%8D%AE)" class="mw-redirect" title="流量控制 (数据)">流量控制</a>用来避免主机分组发送得过快而使接收方来不及完全收下,一般由接收方通告给发送方进行调控。 </p><p>TCP使用<span class="ilh-all" data-orig-title="滑动窗口协议" data-lang-code="en" data-lang-name="英语" data-foreign-title="Sliding Window Protocol"><span class="ilh-page"><a href="/w/index.php?title=%E6%BB%91%E5%8A%A8%E7%AA%97%E5%8F%A3%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;redlink=1" class="new" title="滑动窗口协议(页面不存在)">滑动窗口协议</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/Sliding_Window_Protocol" class="extiw" title="en:Sliding Window Protocol"><span lang="en" dir="auto">Sliding Window Protocol</span></a></span>)</span></span>实现流量控制。接收方在“接收窗口”域指出还可接收的字节数量。发送方在没有新的确认包的情况下至多发送“接收窗口”允许的字节数量。接收方可修改“接收窗口”的值。 </p> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Tcp.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/d/db/Tcp.svg/250px-Tcp.svg.png" decoding="async" width="250" height="229" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/db/Tcp.svg/375px-Tcp.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/db/Tcp.svg/500px-Tcp.svg.png 2x" data-file-width="600" data-file-height="550" /></a><figcaption>TCP包的序号与接收窗口的行为很像时钟。</figcaption></figure> <p>当接收方宣布接收窗口的值为0,发送方停止进一步发送数据,开始了“保持定时器”(persist timer),以避免因随后的修改接收窗口的数据包丢失使连接的双侧进入死锁,发送方无法发出数据直至收到接收方修改窗口的指示。当“保持定时器”到期时,TCP发送方尝试恢复发送一个小的ZWP包(Zero Window Probe),期待接收方回复一个带着新的接收窗口大小的确认包。一般ZWP包会设置成3次,如果3次过后还是0的话,有的TCP实现就会发RST把链接断了。 </p><p>如果接收方以很小的增量来处理到来的数据,它会发布一系列小的接收窗口。这被称作<a href="/wiki/%E6%84%9A%E8%A0%A2%E7%AA%97%E5%8F%A3%E7%BB%BC%E5%90%88%E7%97%87" class="mw-redirect" title="愚蠢窗口综合症">愚蠢窗口综合症</a>,因为它在TCP的数据包中发送很少的一些字节,相对于TCP包头是很大的开销。解决这个问题,就要避免对小的window size做出响应,直到有足够大的window size再响应: </p> <ul><li>接收端使用David D Clark算法:如果收到的数据导致window size小于某个值,可以直接ack把window给关闭了,阻止了发送端再发数据。等到接收端处理了一些数据后windows size大于等于了MSS,或者接收端buffer有一半为空,就可以把window打开让发送端再发数据过来。</li> <li>发送端使用Nagle算法来延时处理,条件一:Window Size&gt;=MSS 且 Data Size &gt;=MSS;条件二:等待时间或是超时200ms,这两个条件有一个满足,才会发数据,否则就是在积累数据。Nagle算法默认是打开的,所以对于一些需要小包场景的程序——比如像telnet或ssh这样的交互性程序,需要关闭这个算法。可以在Socket设置TCP_NODELAY选项来关闭这个算法。</li></ul> <div class="mw-heading mw-heading4"><h4 id="拥塞控制"><span id=".E6.8B.A5.E5.A1.9E.E6.8E.A7.E5.88.B6"></span>拥塞控制</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=12" title="编辑章节:拥塞控制"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/TCP%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6" title="TCP拥塞控制">拥塞控制</a>是发送方根据网络的承载情况控制分组的发送量,以获取高性能又能避免拥塞崩溃(congestion collapse,网络性能下降几个数量级)。这在网络流之间产生近似<span class="ilh-all" data-orig-title="最大最小公平" data-lang-code="en" data-lang-name="英语" data-foreign-title="max-min fairness"><span class="ilh-page"><a href="/w/index.php?title=%E6%9C%80%E5%A4%A7%E6%9C%80%E5%B0%8F%E5%85%AC%E5%B9%B3&amp;action=edit&amp;redlink=1" class="new" title="最大最小公平(页面不存在)">最大最小公平</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/max-min_fairness" class="extiw" title="en:max-min fairness"><span lang="en" dir="auto">max-min fairness</span></a></span>)</span></span>分配。 </p><p>发送方与接收方根据确认包或者包丢失的情况,以及定时器,估计网络拥塞情况,从而修改数据流的行为,这称为拥塞控制或网络拥塞避免。 </p><p>TCP的现代实现包含四种相互影响的拥塞控制算法:<a href="/wiki/%E6%85%A2%E5%BC%80%E5%A7%8B" class="mw-redirect" title="慢开始">慢开始</a>、拥塞避免、<a href="/wiki/TCP%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6#快速重传" title="TCP拥塞控制">快速重传</a>、<a href="/wiki/TCP%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6#快速恢复" title="TCP拥塞控制">快速恢复</a>。 </p><p>此外,发送方采取“超时重传”(retransmission timeout,RTO),这是估计出<a href="/wiki/%E4%BE%86%E5%9B%9E%E9%80%9A%E8%A8%8A%E5%BB%B6%E9%81%B2" title="來回通訊延遲">來回通訊延遲</a> (RTT) 以及RTT的方差。 </p><p>RFC793中定义的计算SRTT的经典算法:指数加权移动平均(Exponential weighted moving average) </p> <ol><li>先采样RTT,记下最近好几次的RTT值。</li> <li>做平滑计算SRTT公式为:<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle SRTT=(\alpha *SRTT)+((1-\alpha )*RTT)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>=</mo> <mo stretchy="false">(</mo> <mi>&#x03B1;<!-- α --></mi> <mo>&#x2217;<!-- ∗ --></mo> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">(</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>&#x03B1;<!-- α --></mi> <mo stretchy="false">)</mo> <mo>&#x2217;<!-- ∗ --></mo> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle SRTT=(\alpha *SRTT)+((1-\alpha )*RTT)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/157dde4d961b78f4af57965e8b5f0b501d1c2f12" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:40.842ex; height:2.843ex;" alt="{\displaystyle SRTT=(\alpha *SRTT)+((1-\alpha )*RTT)}"></span>,其中 α 取值在0.8 到 0.9之间</li> <li>计算RTO,公式:<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle RTO=min(UBOUND,max(LBOUND,(\beta *SRTT))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>R</mi> <mi>T</mi> <mi>O</mi> <mo>=</mo> <mi>m</mi> <mi>i</mi> <mi>n</mi> <mo stretchy="false">(</mo> <mi>U</mi> <mi>B</mi> <mi>O</mi> <mi>U</mi> <mi>N</mi> <mi>D</mi> <mo>,</mo> <mi>m</mi> <mi>a</mi> <mi>x</mi> <mo stretchy="false">(</mo> <mi>L</mi> <mi>B</mi> <mi>O</mi> <mi>U</mi> <mi>N</mi> <mi>D</mi> <mo>,</mo> <mo stretchy="false">(</mo> <mi>&#x03B2;<!-- β --></mi> <mo>&#x2217;<!-- ∗ --></mo> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle RTO=min(UBOUND,max(LBOUND,(\beta *SRTT))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/32b6102ea2628a6b1a935a1c3feb2a1de896c6f2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:55.744ex; height:2.843ex;" alt="{\displaystyle RTO=min(UBOUND,max(LBOUND,(\beta *SRTT))}"></span>,其中 UBOUND是最大的timeout时间上限值,LBOUND是最小的timeout时间下限值,β值一般在1.3到2.0之间。</li></ol> <p>1987年,出现计算RTT的<span class="ilh-all" data-orig-title="Karn算法" data-lang-code="en" data-lang-name="英语" data-foreign-title="Karn&#39;s Algorithm"><span class="ilh-page"><a href="/w/index.php?title=Karn%E7%AE%97%E6%B3%95&amp;action=edit&amp;redlink=1" class="new" title="Karn算法(页面不存在)">Karn算法</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/Karn%27s_Algorithm" class="extiw" title="en:Karn&#39;s Algorithm"><span lang="en" dir="auto">Karn's Algorithm</span></a></span>)</span></span>或TCP时间戳(<a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc1323" class="extiw" title="rfc:1323">1323</a>),最大特点是——忽略重传,不把重传的RTT做采样。但是,如果在某一时间,网络闪动,突然变慢了,产生了比较大的延时,这个延时导致要重传所有的包(因为之前的RTO很小),于是,因为重传的不算,所以,RTO就不会被更新,这是一个灾难。为此,Karn算法一发生重传,就对现有的RTO值翻倍。这就是的Exponential backoff。 </p><p>1988年,在<a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc6298" class="extiw" title="rfc:6298">6298</a>中给出<a href="/wiki/%E8%8C%83%C2%B7%E9%9B%85%E5%90%84%E5%B8%83%E6%A3%AE" title="范·雅各布森">范·雅各布森</a>算法取平均以获得平滑往返时延(Smoothed Round Trip Time,SRTT),作为最终的RTT估计值。这个算法在被用在今天的TCP协议中: </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle SRTT=SRTT+\alpha *(RTT-SRTT)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>=</mo> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>+</mo> <mi>&#x03B1;<!-- α --></mi> <mo>&#x2217;<!-- ∗ --></mo> <mo stretchy="false">(</mo> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>&#x2212;<!-- − --></mo> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle SRTT=SRTT+\alpha *(RTT-SRTT)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c0f11815a603949df6d75ef69ab5bdbbde8885b8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:38.915ex; height:2.843ex;" alt="{\displaystyle SRTT=SRTT+\alpha *(RTT-SRTT)}"></span> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle DevRTT=(1-\beta )*DevRTT+\beta *\left\vert RTT-SRTT\right\vert }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mi>e</mi> <mi>v</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>=</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>&#x03B2;<!-- β --></mi> <mo stretchy="false">)</mo> <mo>&#x2217;<!-- ∗ --></mo> <mi>D</mi> <mi>e</mi> <mi>v</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>+</mo> <mi>&#x03B2;<!-- β --></mi> <mo>&#x2217;<!-- ∗ --></mo> <mrow> <mo>|</mo> <mrow> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>&#x2212;<!-- − --></mo> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> </mrow> <mo>|</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle DevRTT=(1-\beta )*DevRTT+\beta *\left\vert RTT-SRTT\right\vert }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1f61694ef7af35e667516ca5836f49ebbc4ddab9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:52.855ex; height:2.843ex;" alt="{\displaystyle DevRTT=(1-\beta )*DevRTT+\beta *\left\vert RTT-SRTT\right\vert }"></span> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle RTO=\mu *SRTT+\partial *DevRTT}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>R</mi> <mi>T</mi> <mi>O</mi> <mo>=</mo> <mi>&#x03BC;<!-- μ --></mi> <mo>&#x2217;<!-- ∗ --></mo> <mi>S</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> <mo>+</mo> <mi mathvariant="normal">&#x2202;<!-- ∂ --></mi> <mo>&#x2217;<!-- ∗ --></mo> <mi>D</mi> <mi>e</mi> <mi>v</mi> <mi>R</mi> <mi>T</mi> <mi>T</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle RTO=\mu *SRTT+\partial *DevRTT}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/76f58065b6978558b9450476c677eacbd9103f8a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:33.929ex; height:2.676ex;" alt="{\displaystyle RTO=\mu *SRTT+\partial *DevRTT}"></span> </p><p>其中:DevRTT是Deviation RTT。在Linux下,α = 0.125,β = 0.25, μ = 1,∂= 4 </p><p>目前有很多<a href="/wiki/TCP%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6" title="TCP拥塞控制">TCP拥塞控制算法</a>在研究中。 </p> <div class="mw-heading mw-heading3"><h3 id="最大分段大小"><span id=".E6.9C.80.E5.A4.A7.E5.88.86.E6.AE.B5.E5.A4.A7.E5.B0.8F"></span>最大分段大小</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=13" title="编辑章节:最大分段大小"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/%E6%9C%80%E5%A4%A7%E5%88%86%E6%AE%B5%E5%A4%A7%E5%B0%8F" title="最大分段大小">最大分段大小</a> (MSS)是在单个分段中TCP愿意接受的数据的字节数最大值。MSS应当足够小以避免<a href="/wiki/IP%E5%88%86%E7%89%87" title="IP分片">IP分片</a>,它会导致丢包或过多的重传。在TCP连接建立时,双端在SYN报文中用MSS选项宣布各自的MSS,这是从双端各自直接相连的<a href="/wiki/%E6%95%B0%E6%8D%AE%E9%93%BE%E8%B7%AF%E5%B1%82" title="数据链路层">数据链路层</a>的<a href="/wiki/%E6%9C%80%E5%A4%A7%E4%BC%A0%E8%BE%93%E5%8D%95%E5%85%83" title="最大传输单元">最大传输单元</a>(MTU)的尺寸减去固定的IP首部和TCP首部长度。以太网MTU为1500字节, MSS值可达1460字节。使用IEEE 802.3的MTU为1492字节,MSS可达1452字节。如果目的IP地址为“非本地的”,MSS通常的默认值为536(这个默认值允许20字节的IP首部和20字节的TCP首部以适合576字节IP数据报)。此外,发送方可用<span class="ilh-all" data-orig-title="传输路径MTU发现" data-lang-code="en" data-lang-name="英语" data-foreign-title="path MTU discovery"><span class="ilh-page"><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E8%B7%AF%E5%BE%84MTU%E5%8F%91%E7%8E%B0&amp;action=edit&amp;redlink=1" class="new" title="传输路径MTU发现(页面不存在)">传输路径MTU发现</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/path_MTU_discovery" class="extiw" title="en:path MTU discovery"><span lang="en" dir="auto">path MTU discovery</span></a></span>)</span></span>(<a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc1191" class="extiw" title="rfc:1191">1191</a>)推导出从发送方到接收方的网络路径上的最小MTU,以此动态调整MSS以避免网络<a href="/wiki/IP%E5%88%86%E7%89%87" title="IP分片">IP分片</a>。 </p><p>MSS发布也被称作“MSS协商”(MSS negotiation)。严格讲,这并非是协商出来一个统一的MSS值,TCP允许连接两端使用各自不同的MSS值。<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> 例如,这会发生在参与TCP连接的一台设备使用非常少的内存处理到来的TCP分组。 </p> <div class="mw-heading mw-heading3"><h3 id="选择确认"><span id=".E9.80.89.E6.8B.A9.E7.A1.AE.E8.AE.A4"></span>选择确认</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=14" title="编辑章节:选择确认"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="anchor" id="选择性确认"></span> 最初采取累计确认的TCP协议在丢包时效率很低。例如,假设通过10个分组发出了1万个字节的数据。如果第一个分组丢失,在纯粹的累计确认协议下,接收方不能说它成功收到了1,000到9,999字节,但未收到包含0到999字节的第一个分组。因而,发送方可能必须重传所有1万个字节。 </p><p>为此,TCP采取了“选择确认”(selective acknowledgment,SACK)选项。RFC 2018 对此定义为<b>允许接收方确认它成功收到的分组的不连续的块</b>,以及基础TCP确认的成功收到最后连续字节序号。这种确认可以指出<i>SACK block</i>,包含了已经成功收到的连续范围的开始与结束字节序号。在上述例子中,接收方可以发出SACK指出序号1000到9999,发送方因此知道只需重发第一个分组(字节 0 到 999)。 </p><p>TCP发送方会把乱序收包当作丢包,因此会重传乱序收到的包,导致连接的性能下降。重复SACK选项(duplicate-SACK option)是定义在RFC 2883中的SACK的一项扩展,可解决这一问题。接收方发出D-ACK指出没有丢包,接收方恢复到高传输率。D-SACK使用了SACK的第一个段来做标志, </p> <ul><li>如果SACK的第一个段的范围被ACK所覆盖,那么就是D-SACK;</li> <li>如果SACK的第一个段的范围被SACK的第二个段覆盖,那么就是D-SACK</li></ul> <p>D-SACK旨在告诉发送端:收到了重复的数据,数据包没有丢,丢的是ACK包;或者“Fast Retransmit算法”触发的重传不是因为发出去的包丢了,也不是因为回应的ACK包丢了,而是因为网络延时导致的reordering。 </p><p>SACK选项并不是强制的。仅当双端都支持时才会被使用。TCP连接建立时会在TCP头中协商SACK细节。在 Linux下,可以通过tcp_sack参数打开SACK功能(Linux 2.4后默认打开)。Linux下的tcp_dsack参数用于开启D-SACK功能(Linux 2.4后默认打开)。选择确认也用于<a href="/wiki/%E6%B5%81%E6%8E%A7%E5%88%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="流控制传输协议">流控制传输协议</a> (SCTP). </p> <div class="mw-heading mw-heading3"><h3 id="TCP窗口缩放选项"><span id="TCP.E7.AA.97.E5.8F.A3.E7.BC.A9.E6.94.BE.E9.80.89.E9.A1.B9"></span>TCP窗口缩放选项</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=15" title="编辑章节:TCP窗口缩放选项"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>TCP窗口尺寸域控制数据包在2至65,535字节。RFC 1323 定义的<span class="ilh-all" data-orig-title="TCP窗口缩放选项" data-lang-code="en" data-lang-name="英语" data-foreign-title="TCP window scale option"><span class="ilh-page"><a href="/w/index.php?title=TCP%E7%AA%97%E5%8F%A3%E7%BC%A9%E6%94%BE%E9%80%89%E9%A1%B9&amp;action=edit&amp;redlink=1" class="new" title="TCP窗口缩放选项(页面不存在)">TCP窗口缩放选项</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/TCP_window_scale_option" class="extiw" title="en:TCP window scale option"><span lang="en" dir="auto">TCP window scale option</span></a></span>)</span></span>用于把最大窗口尺寸从65,535字节扩大至1G字节。扩大窗口尺寸是<span class="ilh-all" data-orig-title="TCP优化" data-lang-code="en" data-lang-name="英语" data-foreign-title="TCP tuning"><span class="ilh-page"><a href="/w/index.php?title=TCP%E4%BC%98%E5%8C%96&amp;action=edit&amp;redlink=1" class="new" title="TCP优化(页面不存在)">TCP优化</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/TCP_tuning" class="extiw" title="en:TCP tuning"><span lang="en" dir="auto">TCP tuning</span></a></span>)</span></span>的需要。 </p><p>窗口缩放选项尽在TCP三次握手时双端在SYN包中独立指出这个方向的缩放系数。该值是16比特窗口尺寸的向左位移数,从0 (表示不位移)至14。 </p><p>某些路由器或分组防火墙会重写窗口缩放选项,这可能导致不稳定的网络传输。<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="TCP时间戳"><span id="TCP.E6.97.B6.E9.97.B4.E6.88.B3"></span>TCP时间戳</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=16" title="编辑章节:TCP时间戳"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>RFC 1323 定义了TCP时间戳,并不对应于系统时钟,使用随机值初始化。许多操作系统每毫秒增加一次时间戳;但RFC只规定tick应当成比例。 </p><p>有两个时间戳域: </p> <dl><dd>4字节的发送时间戳值</dd> <dd>4字节的响应回复时间戳值(最近收到数据的时间戳)</dd></dl> <p>TCP时间戳用于“防止序列号回绕算法”(Protection Against Wrapped Sequence numbers,PAWS),细节见RFC 1323。PAWS用于接收窗口跨序号回绕边界。这种情形下一个包可能会重传以回答问题:“是否是第一个还是第二个4&#160;GB的序号?”时间戳可以打破这一问题。 </p><p>另外,Eifel检测算法( RFC 3522 )使用TCP时间戳确定如果重传发生是因为丢包还是简单乱序。 </p><p>最近统计表明时间戳的采用率停滞在~40%,这归因于Windows服务器从Windows Server 2008起降低了支持。<sup id="cite_ref-2017stats_9-0" class="reference"><a href="#cite_note-2017stats-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup>. </p> <div class="mw-heading mw-heading3"><h3 id="带外数据"><span id=".E5.B8.A6.E5.A4.96.E6.95.B0.E6.8D.AE"></span>带外数据</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=17" title="编辑章节:带外数据"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="ilh-all" data-orig-title="带外数据" data-lang-code="en" data-lang-name="英语" data-foreign-title="out-of-band data"><span class="ilh-page"><a href="/w/index.php?title=%E5%B8%A6%E5%A4%96%E6%95%B0%E6%8D%AE&amp;action=edit&amp;redlink=1" class="new" title="带外数据(页面不存在)">带外数据</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/out-of-band_data" class="extiw" title="en:out-of-band data"><span lang="en" dir="auto">out-of-band data</span></a></span>)</span></span>(OOB)是指对紧急数据,中断或放弃排队中的数据流;接收方应立即处理紧急数据。完成后,TCP通知应用程序恢复流队列的正常处理。 </p><p>OOB并不影响网络,“紧急”仅影响远程端的处理。这一协议很少被实现。<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="强制数据递交"><span id=".E5.BC.BA.E5.88.B6.E6.95.B0.E6.8D.AE.E9.80.92.E4.BA.A4"></span>强制数据递交</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=18" title="编辑章节:强制数据递交"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>正常情况下,TCP等待200&#160;ms以准备一个完整分组发出(<a href="/wiki/%E7%B4%8D%E6%A0%BC%E7%AE%97%E6%B3%95" title="納格算法">纳格算法</a>试图把小的信息组装为单一的包)。这产生了小的、但潜在很严重的延迟并在传递一个文件时不断重复延迟。例如,典型发送块是4&#160;KB,典型的MSS是1460字节,在10&#160;Mbit/s以太网上发出两个包,每个耗时约~1.2&#160;ms,随后是剩余1176个字节的包,之后是197&#160;ms停顿因为TCP等待装满缓冲区。 </p><p>对于telnet,每次用户击键的回应,如果有200&#160;ms将会非常烦人。 </p><p>socket选项<code>TCP_NODELAY</code>能放弃默认的200&#160;ms发送延迟。应用程序使用这个socket选项强制发出数据。 </p><p>RFC定义了<code>PSH</code>能立即发出比特。<a href="/wiki/Berkeley%E5%A5%97%E6%8E%A5%E5%AD%97" title="Berkeley套接字">Berkeley套接字</a>不能控制或指出这种情形,只能由<a href="/wiki/%E5%8D%8F%E8%AE%AE%E6%A0%88" title="协议栈">协议栈</a>控制。<sup id="cite_ref-Stevens2006_12-0" class="reference"><a href="#cite_note-Stevens2006-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="终结通路"><span id=".E7.BB.88.E7.BB.93.E9.80.9A.E8.B7.AF"></span>终结通路</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=19" title="编辑章节:终结通路"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Deconnection_TCP.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Deconnection_TCP.png/220px-Deconnection_TCP.png" decoding="async" width="220" height="207" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Deconnection_TCP.png/330px-Deconnection_TCP.png 1.5x, //upload.wikimedia.org/wikipedia/commons/2/2d/Deconnection_TCP.png 2x" data-file-width="424" data-file-height="398" /></a><figcaption>TCP连接的正常终止</figcaption></figure> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:TCP_CLOSE.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/5/55/TCP_CLOSE.svg/260px-TCP_CLOSE.svg.png" decoding="async" width="260" height="208" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/55/TCP_CLOSE.svg/390px-TCP_CLOSE.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/5/55/TCP_CLOSE.svg/520px-TCP_CLOSE.svg.png 2x" data-file-width="375" data-file-height="300" /></a><figcaption>连接终止</figcaption></figure> <p>连接终止使用了四路握手过程(或称四次握手,<span lang="en">four-way handshake</span>),在这个过程中连接的每一侧都独立地被终止。当一个端点要停止它这一侧的连接,就向对侧发送FIN,对侧回复ACK表示确认。因此,拆掉一侧的连接过程需要一对FIN和ACK,分别由两侧端点发出。 </p><p>首先发出FIN的一侧,如果给对侧的FIN响应了ACK,那么就会超时等待2*MSL时间,然后关闭连接。在这段超时等待时间内,本地的端口不能被新连接使用;避免延时的包的到达与随后的新连接相混淆。RFC793定义了MSL为2分钟,Linux设置成了30s。参数tcp_max_tw_buckets控制并发的TIME_WAIT的数量,默认值是180000,如果超限,那么,系统会把多的TIME_WAIT状态的连接给destory掉,然后在日志里打一个警告(如:time wait bucket table overflow) </p><p>连接可以工作在<span class="ilh-all" data-orig-title="TCP半开" data-lang-code="en" data-lang-name="英语" data-foreign-title="TCP half-open"><span class="ilh-page"><a href="/w/index.php?title=TCP%E5%8D%8A%E5%BC%80&amp;action=edit&amp;redlink=1" class="new" title="TCP半开(页面不存在)">TCP半开</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/TCP_half-open" class="extiw" title="en:TCP half-open"><span lang="en" dir="auto">TCP half-open</span></a></span>)</span></span>状态。即一侧关闭了连接,不再发送数据;但另一侧没有关闭连接,仍可以发送数据。已关闭的一侧仍然应接收数据,直至对侧也关闭了连接。 </p><p>也可以通过测三次握手关闭连接。主机A发出FIN,主机B回复FIN &amp; ACK,然后主机A回复ACK.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p><p>一些主机(如<a href="/wiki/Linux" title="Linux">Linux</a>或<a href="/wiki/HP-UX" title="HP-UX">HP-UX</a>)的TCP栈能实现半双工关闭序列。这种主机如果主动关闭一个连接但还没有读完从这个连接已经收到的数据,该主机发送RST代替FIN<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup>。这使得一个TCP应用程序能确认远程应用程序已经读了所有已发送数据,并等待远程侧发出的FIN。但是远程的TCP栈不能区分<i>Connection Aborting RST</i>与<i>Data Loss RST</i>,两种原因都会导致远程的TCP栈失去所有的收到数据。 </p><p>一些应用协议使用TCP open/close handshaking,因为应用协议的TCP open/close handshaking可以发现主动关闭的RST问题。例如: </p> <pre>s = connect(remote); send(s, data); close(s); </pre> <p>TCP/IP栈采用上述方法不能保证所有数据到达对侧,如果未读数据已经到达对侧。 </p> <div class="mw-heading mw-heading3"><h3 id="状态编码"><span id=".E7.8A.B6.E6.80.81.E7.BC.96.E7.A0.81"></span>状态编码</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=20" title="编辑章节:状态编码"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>下表为TCP状态码列表,以<b>S</b>指代服务器,<b>C</b>指代客户端,<b>S&amp;C</b>表示两者,<b>S/C</b>表示两者之一:<sup id="cite_ref-#1_1-1" class="reference"><a href="#cite_note-#1-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dt>LISTEN <span style="font-weight:normal">S</span></dt> <dd>服务器等待从任意远程TCP端口的连接请求。侦听状态。</dd> <dt>SYN-SENT <span style="font-weight:normal">C</span></dt> <dd>客户在发送连接请求后等待匹配的连接请求。通过connect()函数向服务器发出一个同步(SYNC)信号后进入此状态。</dd> <dt>SYN-RECEIVED <span style="font-weight:normal">S</span></dt> <dd>服务器已经收到并发送同步(SYNC)信号之后等待确认(ACK)请求。</dd> <dt>ESTABLISHED <span style="font-weight:normal">S&amp;C</span></dt> <dd>服务器与客户的连接已经打开,收到的数据可以发送给用户。数据传输步骤的正常情况。此时连接两端是平等的。这称作全连接。</dd> <dt>FIN-WAIT-1 <span style="font-weight:normal">S&amp;C</span></dt> <dd>(服务器或客户)主动关闭端调用close()函数发出FIN请求包,表示本方的数据发送全部结束,等待TCP连接另一端的ACK确认包或FIN&amp;ACK请求包。</dd> <dt>FIN-WAIT-2 <span style="font-weight:normal">S&amp;C</span></dt> <dd>主动关闭端在FIN-WAIT-1状态下收到ACK确认包,进入等待远程TCP的连接终止请求的半关闭状态。这时可以接收数据,但不再发送数据。</dd> <dt>CLOSE-WAIT <span style="font-weight:normal">S&amp;C</span></dt> <dd>被动关闭端接到FIN后,就发出ACK以回应FIN请求,并进入等待本地用户的连接终止请求的半关闭状态。这时可以发送数据,但不再接收数据。</dd> <dt>CLOSING <span style="font-weight:normal">S&amp;C</span></dt> <dd>在发出FIN后,又收到对方发来的FIN后,进入等待对方对己方的连接终止(FIN)的确认(ACK)的状态。少见。</dd> <dt>LAST-ACK <span style="font-weight:normal">S&amp;C</span></dt> <dd>被动关闭端全部数据发送完成之后,向主动关闭端发送FIN,进入等待确认包的状态。</dd> <dt>TIME-WAIT <span style="font-weight:normal">S/C</span></dt> <dd>主动关闭端接收到FIN后,就发送ACK包,等待足够时间以确保被动关闭端收到了终止请求的确认包。(按照RFC 793,一个连接可以在TIME-WAIT保证最大四分钟,即<a href="/wiki/%E6%9C%80%E5%A4%A7%E5%88%86%E6%AE%B5%E5%AF%BF%E5%91%BD" title="最大分段寿命">最大分段寿命</a>(maximum segment lifetime)的2倍)</dd> <dt>CLOSED <span style="font-weight:normal">S&amp;C</span></dt> <dd>完全没有连接。</dd></dl> <div class="mw-heading mw-heading2"><h2 id="端口"><span id=".E7.AB.AF.E5.8F.A3"></span>端口</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=21" title="编辑章节:端口"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>TCP使用了<a href="/wiki/%E9%80%9A%E4%BF%A1%E7%AB%AF%E5%8F%A3" class="mw-redirect" title="通信端口">通信端口</a>(<span lang="en">Port number</span>)的概念来标识发送方和接收方的应用层。对每个TCP连接的一端都有一个相关的16位元的无符号端口号分配给它们。端口被分为三类:众所周知的、注册的和动态/私有的。众所周知的端口号是由<a href="/wiki/%E5%9B%A0%E7%89%B9%E7%BD%91%E8%B5%8B%E5%8F%B7%E7%AE%A1%E7%90%86%E5%B1%80" class="mw-redirect" title="因特网赋号管理局">因特网赋号管理局</a>(IANA)来分配的,并且通常被用于系统一级或根进程。众所周知的应用程序作为服务器程序来运行,并被动地侦听经常使用这些端口的连接。例如:<a href="/wiki/FTP" class="mw-redirect" title="FTP">FTP</a>、<a href="/wiki/TELNET" class="mw-redirect" title="TELNET">TELNET</a>、<a href="/wiki/SMTP" class="mw-redirect" title="SMTP">SMTP</a>、<a href="/wiki/HTTP" class="mw-redirect" title="HTTP">HTTP</a>、<a href="/wiki/IMAP" class="mw-redirect" title="IMAP">IMAP</a>、<a href="/wiki/POP3" class="mw-redirect" title="POP3">POP3</a>等。注册的端口号通常被用来作为终端用户连接服务器时短暂地使用的源端口号,但它们也可以用来标识已被第三方注册了的、被命名的服务。动态/私有的端口号在任何特定的TCP连接外不具有任何意义。可能的、被正式承认的端口号有65535个。 </p> <div class="mw-heading mw-heading2"><h2 id="封包結構"><span id=".E5.B0.81.E5.8C.85.E7.B5.90.E6.A7.8B"></span>封包結構</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=22" title="编辑章节:封包結構"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <table class="wikitable" style="margin: 0 auto; text-align:center"> <caption>TCP表頭 </caption> <tbody><tr> <th style="border-bottom:none; border-right:none;">偏移 </th> <th style="border-left:none;"><a href="/wiki/%E4%BD%8D%E5%85%83%E7%BB%84" class="mw-redirect" title="位元组">位元組</a> </th> <th colspan="8">0 </th> <th colspan="8">1 </th> <th colspan="8">2 </th> <th colspan="8">3 </th></tr> <tr> <th style="border-top: none">位元組 </th> <th><tt><a href="/wiki/%E4%BD%8D%E5%85%83" title="位元">位元</a></tt></th> <th><tt>&#160;0</tt></th> <th><tt>&#160;1</tt></th> <th><tt>&#160;2</tt></th> <th><tt>&#160;3</tt></th> <th><tt>&#160;4</tt></th> <th><tt>&#160;5</tt></th> <th><tt>&#160;6</tt></th> <th><tt>&#160;7</tt></th> <th><tt>&#160;8</tt></th> <th><tt>&#160;9</tt></th> <th><tt>10</tt></th> <th><tt>11</tt></th> <th><tt>12</tt></th> <th><tt>13</tt></th> <th><tt>14</tt></th> <th><tt>15</tt></th> <th><tt>16</tt></th> <th><tt>17</tt></th> <th><tt>18</tt></th> <th><tt>19</tt></th> <th><tt>20</tt></th> <th><tt>21</tt></th> <th><tt>22</tt></th> <th><tt>23</tt></th> <th><tt>24</tt></th> <th><tt>25</tt></th> <th><tt>26</tt></th> <th><tt>27</tt></th> <th><tt>28</tt></th> <th><tt>29</tt></th> <th><tt>30</tt></th> <th><tt>31</tt> </th></tr> <tr> <th>0 </th> <th><tt> 0</tt> </th> <td colspan="16">來源連接埠</td> <td colspan="16">目的連接埠 </td></tr> <tr> <th>4 </th> <th><tt>32</tt> </th> <td colspan="32">序列號碼 </td></tr> <tr> <th>8 </th> <th><tt>64</tt> </th> <td colspan="32">確認號碼(當<tt>ACK</tt>設定) </td></tr> <tr> <th>12 </th> <th><tt>96</tt> </th> <td colspan="4">資料偏移</td> <td colspan="3">保留<br /><tt><b>0 0 0</b></tt></td> <td><tt>N<br />S</tt></td> <td><tt>C<br />W<br />R</tt></td> <td><tt>E<br />C<br />E</tt></td> <td><tt>U<br />R<br />G</tt></td> <td><tt>A<br />C<br />K</tt></td> <td><tt>P<br />S<br />H</tt></td> <td><tt>R<br />S<br />T</tt></td> <td><tt>S<br />Y<br />N</tt></td> <td><tt>F<br />I<br />N</tt></td> <td colspan="16">窗口大小 </td></tr> <tr> <th>16 </th> <th><tt>128</tt> </th> <td colspan="16">校验和</td> <td colspan="16">緊急指標(當<tt>URG</tt>設定) </td></tr> <tr> <th>20<br />... </th> <th><tt>160<br />...</tt> </th> <td colspan="32" style="background:#ffd0d0;">選项(如果資料偏移 &gt; 5,需要在結尾添加0。)<br />... </td></tr></tbody></table> <ul><li>來源連接埠(16位元長)-辨識傳送連接埠</li> <li>目的連接埠(16位元長)-辨識接收連接埠</li> <li>序列號(seq,32位元長) <ul><li>如果含有同步化旗標(SYN),則此為最初的序列號;第一個資料位元的序列碼為本序列號加一。</li> <li>如果沒有同步化旗標(SYN),則此為第一個資料位元的序列碼。</li></ul></li> <li>确认號(ack,32位元長)—期望收到的数据的开始序列号。也即已经收到的数据的字节长度加1。</li> <li>資料偏移(4位元長)—以4字节为单位计算出的数据段开始地址的偏移值。</li> <li>保留(3位元長)—须置0</li> <li>標誌符(9位元長) <ul><li>NS—ECN-nonce。ECN显式拥塞通知(Explicit Congestion Notification)是对TCP的扩展,定义于 RFC 3540 (2003)。ECN允许拥塞控制的端对端通知而避免丢包。ECN为一项可选功能,如果底层网络设施支持,则可能被启用ECN的两个端点使用。在ECN成功协商的情况下,ECN感知路由器可以在IP头中设置一个标记来代替丢弃数据包,以标明阻塞即将发生。数据包的接收端回应发送端的表示,降低其传输速率,就如同在往常中检测到包丢失那样。</li> <li>CWR—Congestion Window Reduced,定义于 RFC 3168(2001)。</li> <li>ECE—ECN-Echo有兩種意思,取決於SYN標誌的值,定义于 RFC 3168(2001)。</li> <li>URG—为1表示高优先级数据包,緊急指標字段有效。</li> <li>ACK—为1表示确认号字段有效</li> <li>PSH—为1表示是带有PUSH标志的数据,指示接收方应该尽快将这个报文段交给应用层而不用等待缓冲区装满。</li> <li>RST—为1表示出现严重差错。可能需要重新建立TCP连接。还可以用于拒绝非法的报文段和拒绝连接请求。</li> <li>SYN—为1表示这是连接请求或是连接接受请求,用于建立连接和使顺序号同步</li> <li>FIN—为1表示发送方没有数据要传输了,要求释放连接。</li></ul></li> <li>窗口(WIN,16位元長)—表示从确认号开始,本报文的发送方可以接收的字节数,即接收窗口大小。用于流量控制。</li> <li>校验和(Checksum,16位元長)—对整个的TCP报文段,包括TCP头部和TCP数据,以16位字进行计算所得。这是一个强制性的字段。</li> <li>緊急指標(16位元長)—本报文段中的紧急数据的最后一个字节的序号。</li> <li>選项字段—最多40字节。每个选项的开始是1字节的kind字段,说明选项的类型。 <ul><li>0:选项表结束(1字节)</li> <li>1:无操作(1字节)用于选项字段之间的字边界对齐。</li> <li>2:最大报文段长度(4字节,Maximum Segment Size,MSS)通常在建立连接而设置SYN标志的数据包中指明这个选项,指明本端所能接收的最大长度的报文段。通常将MSS设置为(MTU-40)字节,携带TCP报文段的IP数据报的长度就不会超过MTU(MTU最大长度为1518字节,最短为64字节),从而避免本机发生IP分片。只能出现在同步报文段中,否则将被忽略。</li> <li>3:窗口扩大因子(3字节,wscale),取值0-14。用来把TCP的窗口的值左移的位数,使窗口值乘倍。只能出现在同步报文段中,否则将被忽略。这是因为现在的TCP接收数据缓冲区(接收窗口)的长度通常大于65535字节。</li> <li>4:sackOK—发送端支持并同意使用SACK选项。</li> <li>5:SACK实际工作的选项。</li> <li>8:时间戳(10字节,TCP Timestamps Option,TSopt) <ul><li>发送端的时间戳(Timestamp Value field,TSval,4字节)</li> <li>时间戳回显应答(Timestamp Echo Reply field,TSecr,4字节)</li></ul></li> <li>19:MD5摘要,将TCP伪首部、校验和为0的TCP首部、TCP数据段、通信双方约定的密钥(可选)计算出<a href="/wiki/MD5" title="MD5">MD5</a>摘要值并附加到该选项中,作为类似对TCP报文的签名。通过 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2385">RFC 2385</a> 引入,主要用于增强<a href="/wiki/%E8%BE%B9%E7%95%8C%E7%BD%91%E5%85%B3%E5%8D%8F%E8%AE%AE" title="边界网关协议">BGP</a>通信的安全性。</li> <li>29:安全摘要,通过 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc5925">RFC 5925</a> 引入,将“MD5摘要”的散列方法更换为<a href="/wiki/SHA%E5%AE%B6%E6%97%8F" title="SHA家族">SHA散列算法</a>。</li></ul></li></ul> <div class="mw-heading mw-heading2"><h2 id="發展過程"><span id=".E7.99.BC.E5.B1.95.E9.81.8E.E7.A8.8B"></span>發展過程</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=23" title="编辑章节:發展過程"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>TCP是一个复杂的但同时又是在发展之中的协议。尽管许多重要的改进被提出和实施,发表于1981年的RFC793中说明的TCP(TCP-Tahoe)的许多基本操作还是未作多大改动。RFC1122:《因特网对主机的要求》阐明了许多TCP协议的实现要求。RFC2581:《TCP的拥塞控制》是一篇近年来关于TCP的很重要的RFC,描述了更新后的避免过度拥塞的算法。写于2001年的RFC3168描述了对明显拥塞的报告,这是一种拥塞避免的信号量机制。在21世纪早期,在所有因特网的数据包中,通常有大约95%的包使用了TCP协议。常见的使用TCP的应用层有<a href="/wiki/HTTP" class="mw-redirect" title="HTTP">HTTP</a>/<a href="/wiki/HTTPS" class="mw-redirect" title="HTTPS">HTTPS</a>(万维网协议),<a href="/wiki/SMTP" class="mw-redirect" title="SMTP">SMTP</a>/<a href="/wiki/POP3" class="mw-redirect" title="POP3">POP3</a>/<a href="/wiki/IMAP" class="mw-redirect" title="IMAP">IMAP</a>(电子邮件协议)以及<a href="/wiki/FTP" class="mw-redirect" title="FTP">FTP</a>(文件传输协议)。这些协议在今天被广泛地使用,这证明了它们的原作者的创造是卓越的。 </p><p>最近,一个新协议已经被<a href="/wiki/%E5%8A%A0%E5%B7%9E%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2" class="mw-redirect" title="加州理工学院">加州理工学院</a>的科研人员开发出来,命名为<a href="/w/index.php?title=FAST_TCP&amp;action=edit&amp;redlink=1" class="new" title="FAST TCP(页面不存在)">FAST TCP</a>(基于快速活动队列管理的规模可变的传输控制协议)。它使用排队延迟作为拥塞控制信号;但是因为端到端的延迟通常不仅仅包括排队延迟,所以FAST TCP(或更一般地,所有基于排队延迟的算法)在实际互联网中的能否工作仍然是一个没有解决的问题。 </p> <div class="mw-heading mw-heading2"><h2 id="应用"><span id=".E5.BA.94.E7.94.A8"></span>应用</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=24" title="编辑章节:应用"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>TCP并不是对所有的应用都适合,一些新的带有一些内在的脆弱性的运输层协议也被设计出来。比如,实时应用并不需要甚至无法忍受TCP的可靠传输机制。在这种类型的应用中,通常允许一些丢包、出错或拥塞,而不是去校正它们。例如通常不使用TCP的应用有:<a href="/wiki/%E6%B5%81%E5%AA%92%E4%BD%93" title="流媒体">流媒体</a>、<a href="/wiki/%E7%B6%B2%E7%B5%A1%E9%81%8A%E6%88%B2" class="mw-redirect" title="網絡遊戲">網絡游戏</a>、IP电话(<a href="/wiki/VoIP" title="VoIP">VoIP</a>)等等。任何不是很需要可靠性或者是想将功能减到最少的应用可以避免使用TCP。在很多情况下,当只需要多路复用应用服务时,<a href="/wiki/%E7%94%A8%E6%88%B7%E6%95%B0%E6%8D%AE%E6%8A%A5%E5%8D%8F%E8%AE%AE" title="用户数据报协议">用户数据报协议</a>(UDP)可以代替TCP为应用提供服务。 </p><p>除外,由于TCP的实现是由操作系统提供,而TCP的悠久历史、系统级别的配置机制,一些特性在特定的网络环境下会成为一种累赘而且无法优化,所以也有一些通过在UDP上重新实现用户层级的类似TCP的面向连接的、可靠的、基于字节流的类传输层协议,来代替TCP,例如<a href="/wiki/%E5%9F%BA%E4%BA%8EUDP%E7%9A%84%E6%95%B0%E6%8D%AE%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE" title="基于UDP的数据传输协议">基于UDP的数据传输协议</a>、<a href="/wiki/QUIC" title="QUIC">QUIC</a>。 </p> <div class="mw-heading mw-heading2"><h2 id="参见"><span id=".E5.8F.82.E8.A7.81"></span>参见</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=25" title="编辑章节:参见"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/TCP%E6%A0%A1%E9%AA%8C%E5%92%8C%E5%8D%B8%E8%BD%BD" title="TCP校验和卸载">TCP校验和卸载</a></li> <li><a href="/wiki/TCP/UDP%E7%AB%AF%E5%8F%A3%E5%88%97%E8%A1%A8" title="TCP/UDP端口列表">TCP/UDP端口列表</a></li> <li><a href="/wiki/SCTP" class="mw-redirect" title="SCTP">SCTP</a></li> <li><a href="/wiki/%E8%BF%9E%E6%8E%A5%E9%87%8D%E7%BD%AE" class="mw-redirect" title="连接重置">连接重置</a></li> <li><a href="/wiki/%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6" title="拥塞控制">拥塞控制</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="参考资料"><span id=".E5.8F.82.E8.80.83.E8.B5.84.E6.96.99"></span>参考资料</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=26" title="编辑章节:参考资料"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="references-small"> <ul><li>Timothy S. Ramteke: <i>Networks, Second Edition.</i>, Prentice-Hall 2001, <a href="/wiki/Special:%E7%BD%91%E7%BB%9C%E4%B9%A6%E6%BA%90/0139012656" class="internal mw-magiclink-isbn">ISBN 0-13-901265-6</a></li> <li>Torsten Braun , Martina Zitterbart: <i>Hochleistungskommunikation, Bd.2, Transportdienste und Transportprotokolle </i>, Oldenbourg 1996, <a href="/wiki/Special:%E7%BD%91%E7%BB%9C%E4%B9%A6%E6%BA%90/9783486230888" class="internal mw-magiclink-isbn">ISBN 978-3-486-23088-8</a></li></ul> </div> <div class="reflist columns references-column-count references-column-count-2" style="-moz-column-count: 2; -webkit-column-count: 2; column-count: 2; list-style-type: decimal;"> <ol class="references"> <li id="cite_note-#1-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-#1_1-0"><sup><b>1.0</b></sup></a> <a href="#cite_ref-#1_1-1"><sup><b>1.1</b></sup></a></span> <span class="reference-text"><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc793">RFC 793</a> Section 3.2</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.man7.org/linux/man-pages/man7/ip.7.html">存档副本</a>. <span class="reference-accessdate"> &#91;<span class="nowrap">2017-11-02</span>&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20201111230730/https://man7.org/linux/man-pages/man7/ip.7.html">存档</a>于2020-11-11).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.btitle=%E5%AD%98%E6%A1%A3%E5%89%AF%E6%9C%AC&amp;rft.genre=unknown&amp;rft_id=http%3A%2F%2Fwww.man7.org%2Flinux%2Fman-pages%2Fman7%2Fip.7.html&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.linfo.org/tcp.html">TCP Definition</a>. <span class="reference-accessdate"> &#91;<span class="nowrap">2011-03-12</span>&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20200506183752/http://www.linfo.org/tcp.html">存档</a>于2020-05-06).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.btitle=TCP+Definition&amp;rft.genre=unknown&amp;rft_id=http%3A%2F%2Fwww.linfo.org%2Ftcp.html&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation journal">Mathis; Mathew; Semke; Mahdavi; Ott. The macroscopic behavior of the TCP congestion avoidance algorithm. ACM SIGCOMM Computer Communication Review. 1997, <b>27.3</b>: 67–82.</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.atitle=The+macroscopic+behavior+of+the+TCP+congestion+avoidance+algorithm&amp;rft.au=Mahdavi&amp;rft.au=Mathew&amp;rft.au=Mathis&amp;rft.au=Ott&amp;rft.au=Semke&amp;rft.date=1997&amp;rft.genre=article&amp;rft.jtitle=ACM+SIGCOMM+Computer+Communication+Review&amp;rft.pages=67-82&amp;rft.volume=27.3&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><span class="citation IETF_document">Paxson,&#32;V.&#59;&#32;Allman,&#32;M.&#59;&#32;Chu,&#32;J.&#59;&#32;Sargent,&#32;M..&#32;<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc6298#section-2">The Basic Algorithm</a>.&#32;<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc6298">Computing TCP's Retransmission Timer</a>.&#32;<a href="/wiki/Internet_Engineering_Task_Force" class="mw-redirect" title="Internet Engineering Task Force">IETF</a>.&#32;June 2011:&#32;p.&#160;2.&#160;sec.&#160;2<span class="reference-accessdate">&#32;[October 24, 2015]</span>.&#32;RFC 6298.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=The+Basic+Algorithm&amp;rft.atitle=Computing+TCP%27s+Retransmission+Timer&amp;rft.aulast=Paxson&amp;rft.aufirst=V.&amp;rft.au=Paxson%2C%26%2332%3BV.&amp;rft.au=Allman%2C%26%2332%3BM.&amp;rft.au=Chu%2C%26%2332%3BJ.&amp;rft.au=Sargent%2C%26%2332%3BM.&amp;rft.date=June+2011&amp;rft.pages=p.%26nbsp%3B2.%26nbsp%3Bsec.%26nbsp%3B2&amp;rft.pub=%5B%5BInternet+Engineering+Task+Force%7CIETF%5D%5D&amp;rft_id=%2F%2Ftools.ietf.org%2Fhtml%2Frfc6298&amp;rfr_id=info:sid/zh.wikipedia.org:%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE"><span style="display: none;">&#160;</span></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation journal">Stone; Partridge. <a rel="nofollow" class="external text" href="http://citeseer.ist.psu.edu/stone00when.html">When The CRC and TCP Checksum Disagree</a>. Sigcomm. 2000 <span class="reference-accessdate"> &#91;<span class="nowrap">2017-11-02</span>&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20080505024952/http://citeseer.ist.psu.edu/stone00when.html">存档</a>于2008-05-05).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.atitle=When+The+CRC+and+TCP+Checksum+Disagree&amp;rft.au=Partridge&amp;rft.au=Stone&amp;rft.date=2000&amp;rft.genre=article&amp;rft.jtitle=Sigcomm&amp;rft_id=http%3A%2F%2Fciteseer.ist.psu.edu%2Fstone00when.html&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.faqs.org/rfcs/rfc879.html">RFC 879</a>. <span class="reference-accessdate"> &#91;<span class="nowrap">2017-11-02</span>&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20201127012716/http://www.faqs.org/rfcs/rfc879.html">存档</a>于2020-11-27).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.btitle=&#82;FC+879&amp;rft.genre=unknown&amp;rft_id=http%3A%2F%2Fwww.faqs.org%2Frfcs%2Frfc879.html&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="https://lwn.net/Articles/92727/">TCP window scaling and broken routers &#91;LWN.net&#93;</a>. <span class="reference-accessdate"> &#91;<span class="nowrap">2017-11-02</span>&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20200331213612/https://lwn.net/Articles/92727/">存档</a>于2020-03-31).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.btitle=TCP+window+scaling+and+broken+routers+%5BLWN.net%26%2393%3B&amp;rft.genre=unknown&amp;rft_id=https%3A%2F%2Flwn.net%2FArticles%2F92727%2F&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-2017stats-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-2017stats_9-0">^</a></b></span> <span class="reference-text"><cite class="citation web">David Murray; Terry Koziniec; Sebastian Zander; Michael Dixon; Polychronis Koutsakis. <a rel="nofollow" class="external text" href="http://profiles.murdoch.edu.au/myprofile/david-murray/files/2012/06/An_Analysis_of_Changing_Enterprise_Network_Traffic_Characteristics-22.pdf">An Analysis of Changing Enterprise Network Traffic Characteristics</a> <span style="font-size:85%;">(PDF)</span>. The 23rd Asia-Pacific Conference on Communications (APCC 2017). 2017 <span class="reference-accessdate"> &#91;<span class="nowrap">3 October</span> 2017&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20171003124654/http://profiles.murdoch.edu.au/myprofile/david-murray/files/2012/06/An_Analysis_of_Changing_Enterprise_Network_Traffic_Characteristics-22.pdf">存档</a> <span style="font-size:85%;">(PDF)</span>于2017-10-03).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.au=David+Murray&amp;rft.au=Michael+Dixon&amp;rft.au=Polychronis+Koutsakis&amp;rft.au=Sebastian+Zander&amp;rft.au=Terry+Koziniec&amp;rft.btitle=An+Analysis+of+Changing+Enterprise+Network+Traffic+Characteristics&amp;rft.date=2017&amp;rft.genre=unknown&amp;rft.pub=The+23rd+Asia-Pacific+Conference+on+Communications+%28APCC+2017%29&amp;rft_id=http%3A%2F%2Fprofiles.murdoch.edu.au%2Fmyprofile%2Fdavid-murray%2Ffiles%2F2012%2F06%2FAn_Analysis_of_Changing_Enterprise_Network_Traffic_Characteristics-22.pdf&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web">Gont, Fernando. <a rel="nofollow" class="external text" href="http://www.gont.com.ar/talks/IETF73/ietf73-tcpm-urgent-data.ppt">On the implementation of TCP urgent data</a>. 73rd IETF meeting. November 2008 <span class="reference-accessdate"> &#91;<span class="nowrap">2009-01-04</span>&#93;</span>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20190516181338/https://www.gont.com.ar/talks/IETF73/ietf73-tcpm-urgent-data.ppt">存档</a>于2019-05-16).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.aufirst=Fernando&amp;rft.aulast=Gont&amp;rft.btitle=On+the+implementation+of+TCP+urgent+data&amp;rft.date=2008-11&amp;rft.genre=unknown&amp;rft.pub=73rd+IETF+meeting&amp;rft_id=http%3A%2F%2Fwww.gont.com.ar%2Ftalks%2FIETF73%2Fietf73-tcpm-urgent-data.ppt&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation book">Peterson, Larry. <a rel="nofollow" class="external text" href="https://archive.org/details/computernetworks00pete_974">Computer Networks</a>. Morgan Kaufmann. 2003: <a rel="nofollow" class="external text" href="https://archive.org/details/computernetworks00pete_974/page/n419">401</a>. <a href="/wiki/Special:%E7%BD%91%E7%BB%9C%E4%B9%A6%E6%BA%90/1-55860-832-X" title="Special:网络书源/1-55860-832-X"><span title="国际标准书号">ISBN</span>&#160;1-55860-832-X</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.aufirst=Larry&amp;rft.aulast=Peterson&amp;rft.btitle=Computer+Networks&amp;rft.date=2003&amp;rft.genre=book&amp;rft.isbn=1-55860-832-X&amp;rft.pages=401&amp;rft.pub=Morgan+Kaufmann&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fcomputernetworks00pete_974&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-Stevens2006-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-Stevens2006_12-0">^</a></b></span> <span class="reference-text"><cite class="citation book">Richard W. Stevens. <a rel="nofollow" class="external text" href="https://books.google.co.uk/books/about/TCP_IP_Illustrated.html?id=X-l9NX3iemAC">TCP/IP Illustrated. Vol. 1, The protocols</a>. Addison-Wesley. 2006: Chapter 20 <span class="reference-accessdate"> &#91;<span class="nowrap">2017-11-02</span>&#93;</span>. <a href="/wiki/Special:%E7%BD%91%E7%BB%9C%E4%B9%A6%E6%BA%90/978-0-201-63346-7" title="Special:网络书源/978-0-201-63346-7"><span title="国际标准书号">ISBN</span>&#160;978-0-201-63346-7</a>. (原始内容<a rel="nofollow" class="external text" href="https://web.archive.org/web/20201025145241/https://books.google.co.uk/books/about/TCP_IP_Illustrated.html?id=X-l9NX3iemAC">存档</a>于2020-10-25).</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.au=Richard+W.+Stevens&amp;rft.btitle=TCP%2FIP+Illustrated.+Vol.+1%2C+The+protocols&amp;rft.date=2006&amp;rft.genre=book&amp;rft.isbn=978-0-201-63346-7&amp;rft.pages=Chapter+20&amp;rft.pub=Addison-Wesley&amp;rft_id=https%3A%2F%2Fbooks.google.co.uk%2Fbooks%2Fabout%2FTCP_IP_Illustrated.html%3Fid%3DX-l9NX3iemAC&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation book"><a href="/wiki/Andrew_S._Tanenbaum" class="mw-redirect" title="Andrew S. Tanenbaum">Tanenbaum, Andrew S.</a> <a rel="nofollow" class="external text" href="https://archive.org/details/computernetworks00tane_2">Computer Networks</a> Fourth. Prentice Hall. 2003-03-17. <a href="/wiki/Special:%E7%BD%91%E7%BB%9C%E4%B9%A6%E6%BA%90/0-13-066102-3" title="Special:网络书源/0-13-066102-3"><span title="国际标准书号">ISBN</span>&#160;0-13-066102-3</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzh.wikipedia.org%3A%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;rft.aufirst=Andrew+S.&amp;rft.aulast=Tanenbaum&amp;rft.btitle=Computer+Networks&amp;rft.date=2003-03-17&amp;rft.edition=Fourth&amp;rft.genre=book&amp;rft.isbn=0-13-066102-3&amp;rft.pub=Prentice+Hall&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fcomputernetworks00tane_2&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&#160;</span></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text">Section 4.2.2.13 in <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1122">RFC 1122</a></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="外部链接"><span id=".E5.A4.96.E9.83.A8.E9.93.BE.E6.8E.A5"></span>外部链接</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;action=edit&amp;section=27" title="编辑章节:外部链接"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc793" class="extiw" title="rfc:793">793</a>(1981年)</li> <li><a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc1323" class="extiw" title="rfc:1323">1323</a>(1992年)</li> <li><a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc3168" class="extiw" title="rfc:3168">3168</a>(2001年)</li> <li><a href="/wiki/RFC" title="RFC">RFC</a>&#160;<a href="//tools.ietf.org/html/rfc3540" class="extiw" title="rfc:3540">3540</a>(2003年)</li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐5c59558b9d‐w6l7t Cached time: 20241201104711 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.826 seconds Real time usage: 1.022 seconds Preprocessor visited node count: 4954/1000000 Post‐expand include size: 257906/2097152 bytes Template argument size: 4905/2097152 bytes Highest expansion depth: 25/100 Expensive parser function count: 15/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 33813/5000000 bytes Lua time usage: 0.384/10.000 seconds Lua memory usage: 23534517/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 729.010 1 -total 22.88% 166.779 1 Template:Reflist 19.87% 144.822 1 Template:网络协议 16.24% 118.362 1 Template:Lang-en 12.81% 93.374 1 Template:Non-free 12.10% 88.212 2 Template:Ambox 10.49% 76.492 8 Template:Lang 9.66% 70.407 8 Template:Category_handler 8.91% 64.988 6 Template:Cite_web 7.93% 57.780 1 Template:NoteTA --> <!-- Saved in parser cache with key zhwiki:pcache:idhash:11146-0!canonical!zh and timestamp 20241201104711 and revision id 82562858. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&amp;useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">检索自“<a dir="ltr" href="https://zh.wikipedia.org/w/index.php?title=传输控制协议&amp;oldid=82562858">https://zh.wikipedia.org/w/index.php?title=传输控制协议&amp;oldid=82562858</a>”</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:%E9%A1%B5%E9%9D%A2%E5%88%86%E7%B1%BB" title="Special:页面分类">分类</a>:​<ul><li><a href="/wiki/Category:%E4%BC%A0%E8%BE%93%E5%B1%82%E5%8D%8F%E8%AE%AE" title="Category:传输层协议">传输层协议</a></li><li><a href="/wiki/Category:TCP/IP" title="Category:TCP/IP">TCP/IP</a></li><li><a href="/wiki/Category:TCP%E5%8D%8F%E8%AE%AE" title="Category:TCP协议">TCP协议</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">隐藏分类:​<ul><li><a href="/wiki/Category:%E4%BD%BF%E7%94%A8RFC%E9%AD%94%E6%9C%AF%E9%93%BE%E6%8E%A5%E7%9A%84%E9%A1%B5%E9%9D%A2" title="Category:使用RFC魔术链接的页面">使用RFC魔术链接的页面</a></li><li><a href="/wiki/Category:%E8%87%AA2017%E5%B9%B411%E6%9C%88%E5%B8%A6%E6%9C%89%E4%B8%8D%E5%BD%93%E5%90%88%E7%90%86%E4%BD%BF%E7%94%A8%E5%86%85%E5%AE%B9%E7%9A%84%E6%9D%A1%E7%9B%AE" title="Category:自2017年11月带有不当合理使用内容的条目">自2017年11月带有不当合理使用内容的条目</a></li><li><a href="/wiki/Category:%E8%87%AA2018%E5%B9%B41%E6%9C%88%E5%8C%85%E5%90%AB%E9%81%8E%E5%A4%9A%E8%A1%8C%E8%A9%B1%E6%88%96%E5%B0%88%E6%A5%AD%E8%A1%93%E8%AA%9E%E7%9A%84%E6%A2%9D%E7%9B%AE" title="Category:自2018年1月包含過多行話或專業術語的條目">自2018年1月包含過多行話或專業術語的條目</a></li><li><a href="/wiki/Category:%E5%90%AB%E6%9C%89%E8%8B%B1%E8%AA%9E%E7%9A%84%E6%A2%9D%E7%9B%AE" title="Category:含有英語的條目">含有英語的條目</a></li><li><a href="/wiki/Category:%E4%BD%BF%E7%94%A8ISBN%E9%AD%94%E6%9C%AF%E9%93%BE%E6%8E%A5%E7%9A%84%E9%A1%B5%E9%9D%A2" title="Category:使用ISBN魔术链接的页面">使用ISBN魔术链接的页面</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> 本页面最后修订于2024年5月8日 (星期三) 09:37。</li> <li id="footer-info-copyright">本站的全部文字在<a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/deed.zh">知识共享 署名-相同方式共享 4.0协议</a>之条款下提供,附加条款亦可能应用。(请参阅<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">使用条款</a>)<br /> Wikipedia&#174;和维基百科标志是<a rel="nofollow" class="external text" href="https://wikimediafoundation.org/zh">维基媒体基金会</a>的注册商标;维基&#8482;是维基媒体基金会的商标。<br /> 维基媒体基金会是按美国国內稅收法501(c)(3)登记的<a class="external text" href="https://donate.wikimedia.org/wiki/Special:MyLanguage/Tax_deductibility">非营利慈善机构</a>。<br /></li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">隐私政策</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:%E5%85%B3%E4%BA%8E">关于维基百科</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:%E5%85%8D%E8%B4%A3%E5%A3%B0%E6%98%8E">免责声明</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">行为准则</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">开发者</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/zh.wikipedia.org">统计</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie声明</a></li> <li id="footer-places-mobileview"><a href="//zh.m.wikipedia.org/w/index.php?title=%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">手机版视图</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-w6l7t","wgBackendResponseTime":1233,"wgPageParseReport":{"limitreport":{"cputime":"0.826","walltime":"1.022","ppvisitednodes":{"value":4954,"limit":1000000},"postexpandincludesize":{"value":257906,"limit":2097152},"templateargumentsize":{"value":4905,"limit":2097152},"expansiondepth":{"value":25,"limit":100},"expensivefunctioncount":{"value":15,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":33813,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 729.010 1 -total"," 22.88% 166.779 1 Template:Reflist"," 19.87% 144.822 1 Template:网络协议"," 16.24% 118.362 1 Template:Lang-en"," 12.81% 93.374 1 Template:Non-free"," 12.10% 88.212 2 Template:Ambox"," 10.49% 76.492 8 Template:Lang"," 9.66% 70.407 8 Template:Category_handler"," 8.91% 64.988 6 Template:Cite_web"," 7.93% 57.780 1 Template:NoteTA"]},"scribunto":{"limitreport-timeusage":{"value":"0.384","limit":"10.000"},"limitreport-memusage":{"value":23534517,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5c59558b9d-w6l7t","timestamp":"20241201104711","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"\u4f20\u8f93\u63a7\u5236\u534f\u8bae","url":"https:\/\/zh.wikipedia.org\/wiki\/%E4%BC%A0%E8%BE%93%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE","sameAs":"http:\/\/www.wikidata.org\/entity\/Q8803","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q8803","author":{"@type":"Organization","name":"\u7ef4\u57fa\u5a92\u4f53\u9879\u76ee\u8d21\u732e\u8005"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2004-01-17T00:01:27Z","dateModified":"2024-05-08T09:37:33Z","headline":"\u7528\u65bc\u5728\u7db2\u969b\u5354\u8b70\u7db2\u7d61\u4e0a\u50b3\u8f38\u6578\u64da\u7684\u4e3b\u8981\u5354\u8b70"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10