zoukankan      html  css  js  c++  java
  • TCP Three-way Handshake

    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
  • 相关阅读:
    random(1)
    django(1)
    python复习
    bootstrap(1)
    jquery(2)
    Jquery(3)
    day17 正则表达式 re模块
    文字笔记
    MATLAB之数学建模:深圳市生活垃圾处理社会总成本分析
    MATLAB之折线图、柱状图、饼图以及常用绘图技巧
  • 原文地址:https://www.cnblogs.com/vancasola/p/7703822.html
Copyright © 2011-2022 走看看