Introduction to TCP Packet architecture

Source: Internet
Author: User
Tags ack rfc
TCP Header

Follow figure bit coordinates: 0-0 to 0-15 Sender port, 0-16 to 0-31 receiver Port, 32-0 to 32-31 sequence number,tcp serial number; .... 64-0 to 64-31 Ack number,tcp confirmation number, TCP serial number +1, 96-0 to 96-3 data offset, 96-4 to 96-6 reserved bit, 96-7 to 96-15 flag flag, 96-16 to 96-31 buffer size; 128-0 to 128-15 check digit; 128-16 to 128-31 identifies the location of the urgent data; 160-0 to ... option segment;TCP flag Flag bitNS (1 bit): ecn-nonce-concealment protection (Experimental:see RFC 3540). CWR (1 bit): Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment WI Th the ECE flag set and had responded in congestion control mechanism (added to header by RFC 3168). ECE (1 bit): Ecn-echo have a dual role, depending on the value of the SYN flag. It indicates:
If the SYN flag is set (1), then the TCP peer is an ECN capable. If The SYN flag is clear (0), which a packet with congestion experienced flag set (ecn=11) in IP header was received during Normal transmission (added to header by RFC 3168). This serves as a indication of network congestion (or impending congestion) to the TCP sender. URG (1 bit): Indicates that the Urgent pointer field was significant ACK (1 bit): Indicates that the acknowledgment field I S significant. All packets after the initial SYN packet sent by the client should has this flag set. PSH (1 bit): Push function. Asks to push the buffered data to the receiving application. RST (1 bit): Reset the connection SYN (1 bit): Synchronize sequence numbers. Only the first packet sent from each end should has this flag set. Some other flags and fields change meaning based on the this flag, and Some was only valid for when it was set, and others when It is clear. FIN (1 bit): Last packet from sender.

The position of the

flags corresponds to the bit coordinates in the figure above: 96-7 to 96-15;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.