TCP Connection Management

Out-of-Order and Duplication(复制) Problem

  • Old segment from previous connections to come
  • Use long sequence number (32-bits)
  • Establish randomly selected initial sequence number (ISN)
  • Accept sequence numbers from a small window(To allow the network to clear old segments from the network)
  • Enforces a time-out period at end of connection, called maximum segment lifetime (MSL), usually 2 minutes but round-trip delay dependent

TCP Header – Seq and Ack

Sequence Number

  • Byte count
  • First byte in segment
  • 32 bits long
  • 0 <= SN <= 2^32-1
  • Initial sequence number (ISN) selected during connection setup (SYN flag bit is 1);

Acknowledgement Number

  • SN of next byte expected by receiver
  • Acknowledges that all prior bytes in stream have been received correctly
  • Valid if ACK flag is set

TCP Header – Control bits

Control

  • 6 bits
  • URG: urgent pointer flag
    • Urgent message end = SN + urgent pointer
  • ACK: ACK packet flag
    • PSH: override TCP buffering
  • RST: reset connection
    • Upon receipt of RST, connection is terminated and application layer notified(被通知)
  • SYN: establish connection
  • FIN: close connection

TCP Connection Management

  • “Three-way Handshake”
  • ISN’s protect against segments from prior connections

If host always uses the same ISN

TCP Connection Closing

“Graceful Close”

TCP Tree-way handshake

  • Establish connection
  • Transfer data
  • Close the connection

最新文章

  1. php将html转成word文档下载
  2. iOS开发之Socket
  3. 图形学基础教程02--顶点数据和SHADER寄存器 (带演示程序)
  4. java7笔记
  5. 深入理解“HelloWorld”小程序
  6. iOS开发UI篇—简单的浏览器查看程序
  7. Codeforces Round #295 (Div. 2)
  8. 第六篇、WebSphere8.5 (商业级服务器)大规模集群
  9. perl Mail::Sender模块发送邮件
  10. java如何调用接口方式一
  11. Python3 与 C# 扩展之~基础衍生
  12. win10 修改 无线名 无线网络属性 名称 修改
  13. SqlServer中的数据库分类
  14. [基础知识]PeopleSoft应用服务器上的进程含义
  15. 自定义yum源
  16. KVM源代码框架
  17. 第二章 logstash - 输出插件之redis与es
  18. 【转】oracle中的游标的原理和使用详解
  19. Angular6 学习笔记——组件详解之组件通讯
  20. 通过mysql自动同步redis

热门文章

  1. Linux必会必知
  2. C#学习笔记14
  3. SASS和SCSS标签详解与scoped局部和全局的使用
  4. BBS登录与注册功能
  5. sqlserver查询当月数据
  6. BNF巴科斯-诺尔范式
  7. 无需安装 vsftpd , 直接使用 FTP 来管理 docker 容器中的文件
  8. Build 2016: 发布明天的云创新来服务今天的开发者
  9. SQL Server -&gt;&gt; 自动创建表并从文件加载数据
  10. .Net程序员应该掌握的正则表达式