TCP Segment (M)
TCP Segment (M)
TCP Segment
A TCP segment consists of a segment header and a data section. The segment header
contains 10 mandatory fields, and an optional extension field.
TCP Header
Explanation
Source port (16 bits)
Identifies the sending port.
Destination port (16 bits)
Identifies the receiving port.
Sequence Number (32 bits)
ISN of 1st bit of each segment is the sequence number of that segment
Acknowledgement Number (32 bits)
The Acknowledgement number field contains the next sequence number that the sender of the
acknowledgement expects to receive. So the acknowledgement Number= Sequence number + 1. This
field is valid only if the ACK flag is on. Once a connection is established the Ack flag is always on.
Header Length(4 bits)
It describes the number of rows in the segment.
Flags Field (6 bits)
The 6-bit Flags field is used to relay control information between TCP peers.
• The SYN and Fin flags are used when establishing and terminating a TCP connection, respectively.
• The ACK flag is set any time the Acknowledgement field is valid.
• The URG flag signifies that this segment contains urgent data. When this flag is set, the URG field
indicates where the non-urgent data contained in this segment begins.
• The PUSH flag signifies that the sender invoked the push operation, which indicates to the receiving side
of TCP that it should notify the receiving process of this fact
• The RST flag resets the connection.