1/05/2019

TCP Notes (1)

How TCP Works @ youtube
  • TCP fundamentals Part 2
    • 2 related TCP windows: 
      • CWND - Congestion Window
      • RWND - Receive Window
      • Only RWND advertized in packets
      • minimum of CWND and RWND is the cap of transmission
      • CWND = n * MSS, n = 1,2,4...., slowstart
        • not advertised, changing
    • Example 1, slow backup between 2 local servers
      • from the trace, recvr to sender 只发ACKs, (len = 60) 
      • window size 每隔一段时间,会从64K一直降到1000 (小于MSS). 然后hold for 190ms. 然后window size back to 64K
      • 显示chart - statistics -> TCP stream graph -> Time sequence (tcptrace)
      • 足够的证据是server side问题
    • Example 2, 是sender application无法fill CWND,
    • Example 3, ip tcp mss-adjust问题
      • server/client, 2个pcap
      • client直接看到seq = 1461, 不是1
      • server一直re-send seq = 1, size = 1460 pkts. 
  • TCP NoOP option - 很简单,#TcpLen * 4 = Tcp Header Len,而TCP Options Len不全是4的倍数,所以TCP Header需要NoOp pad out header size to a multiple of 4B. 
  • TCP option - timestamp
    • TSval, EchoTSval, 为了计算RTT and RTO (retrans timeout)
  • Some TCP options:
    • 0 - end of TCP options
    • 1 - NoOP
    • 2 - MSS
    • 3 - Window Scale
    • 4/5 - SACK
    • 8 - timestamp

No comments:

Post a Comment