0% found this document useful (0 votes)
33 views2 pages

The TCP Segment Header

The TCP segment header contains information to identify the connection and endpoints, acknowledge received data, and control the connection. It begins with a 20-byte fixed format header containing fields for the source and destination ports and IP addresses to identify the connection. The header also includes fields for acknowledgement numbers, header length, flags to signal congestion or reset the connection, window size for flow control, checksum, and optional fields.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

The TCP Segment Header

The TCP segment header contains information to identify the connection and endpoints, acknowledge received data, and control the connection. It begins with a 20-byte fixed format header containing fields for the source and destination ports and IP addresses to identify the connection. The header also includes fields for acknowledgement numbers, header length, flags to signal congestion or reset the connection, window size for flow control, checksum, and optional fields.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

The TCP Segment Header

 Every segment begins with a fixed-format, 20-byte header.


 Segments without any data are legal and are commonly used for acknowledgements and control
messages.
 The Source port and Destination port fields identify the local end points of the connection.
 The source and destination end points together identify the connection. This connection identifier
is called a 5 tuple because it consists of five pieces of information: the protocol (TCP), source IP
and source port, and destination IP and destination port.

 Acknowledgement number is a cumulative acknowledgement because it summarizes the


received data with a single number. It does not go beyond lost data.
 The TCP header length tells how many 32-bit words are contained in the TCP header. This
information is needed because the Options field is of variable length, so the header is, too.
 Technically, this field really indicates the start of the data within the segment.
 Next comes a 4-bit field that is not used.
 CWR and ECE are used to signal congestion when ECN (Explicit Congestion Notification) is
used.
 ECE is set to signal an ECN-Echo to a TCP sender to tell it to slow down when the TCP receiver
gets a congestion indication from the network.
 CWR is set to signal Congestion Window Reduced from the TCP sender to the TCP receiver so
that it knows the sender has slowed down and can stop sending the ECN-Echo.
 URG is set to 1 if the Urgent pointer is in use. The Urgent pointer is used to indicate a byte offset
from the current sequence number at which urgent data are to be found.
 The ACK bit is set to 1 to indicate that the Acknowledgement number is valid.
 If ACK is 0, the segment does not contain an acknowledgement, so the Acknowledgement number
field is ignored.
 The PSH bit indicates PUSHed data. The receiver is hereby kindly requested to deliver the data to
the application upon arrival and not buffer it until a full buffer has been received (which it might
otherwise do for efficiency).
 The RST bit is used to abruptly reset a connection that has become confused due to a host crash or
some other reason. It is also used to reject an invalid segment or refuse an attempt to open a
connection.
 The SYN bit is used to denote both CONNECTION REQUEST and CONNECTION ACCEPTED. The
connection request has SYN 1 and ACK 0 to indicate that the piggyback acknowledgement
field is not in use. The connection reply does bear an acknowledgement, however, so it has SYN
1 and ACK 1.
 The FIN bit is used to release a connection. It specifies that the sender has no more data to
transmit.
 Both SYN and FIN segments have sequence numbers and are thus guaranteed to be processed in
the correct order.
 Flow control in TCP is handled using a variable-sized sliding window. The Window size field
tells how many bytes may be sent starting at the byte acknowledged.
 A Checksum is also provided for extra reliability. It checksums the header, the data, and a
conceptual pseudoheader in exactly the same way as UDP, except that the pseudoheader has the
protocol number for TCP (6) and the checksum is mandatory.
 The Options field provides a way to add extra facilities not covered by the regular header. The
options are of variable length, fill a multiple of 32 bits by using padding with zeros, and may
extend to 40 bytes to accommodate the longest TCP header that can be specified.
 widely used option is the one that allows each host to specify the MSS (Maximum Segment
Size) it is willing to accept. The maximum segment size in the two directions need not be the
same.
 The window scale option allows the sender and receiver to negotiate a window scale factor at the
start of a connection.
 The timestamp option carries a timestamp sent by the sender and echoed by the receiver. It is
included in every packet, once its use is established during connection setup, and used to compute
round-trip time samples that are used to estimate when a packet has been lost.
 The PAWS (Protection Against Wrapped Sequence numbers) scheme discards arriving
segments with old timestamps to prevent this problem.
 Finally, the SACK (Selective ACKnowledgement) option lets a receiver tell a sender the ranges
of sequence numbers that it has received.

You might also like