Fields in TCP segment
TCP Three-way Handshake
3 step process performed before TCP transmits the actual data. 1. Request for Connection (SYN) 2. Response to Request (SYN/ACK) 3. Connection Established (ACK)
TCP Header Length Field
Aka: Data Offset Field, Indicates the length of the TCP header in bytes. Min: 20 bytes - Max: 60 bytes Field Length: 4 bits
Checksum Field
Allows the receiving node to determine if the TCP segment was corrupted in transmission. Field Length: 16 bits
Acknowledgment Number (ACK) Field
Confirmation of data receipt via a return message Field Length: 32 bits
Padding Field
Contains filler information to ensure that the size of the TCP header is a multiple of 32 bits Field Length: Variable - as needed
Request for Connection (SYN)
First step of the Three-way Handshake. A random Sequence Number (Seq #) is sent from the initiating computer (A) to the receiving computer (B) this number is used to synchronize the communication. Ex. Request: Seq #- 937013558, Ack#- 0, Flags- SYN
Sequence Number Field
Identifies the data segment's position in the stream of data segments already sent. Field Length: 32 bits
Urgent Pointer Field
Indicates a location in the data field where urgent data resides Field Length: 16 bits
Destination Port Field
Indicates the port number at the Destination node Field Length: 16 bits
Source Port
Indicates the port number at the source node. Field Length: 16 bits
Data Field
Part of the TCP segment but NOT part of the TCP Header. Field Contains the original Data sent by the source host. Field Length: Variable - depending on amount of data being transmitted
Response to Request (SYN/ACK)
Second step of the Three-way Handshake. Computer B responds to the request made by Comp A by sending a return message with its own random Seq#, an ACK field containing a number equal to the Seq# in the original message plus 1, and ACK & SYN Flags Set. Ex Response: Seq #- 3043958669, Ack #- 937013559, Flags- ACK, SYN
Initial Sequence Number (ISN)
Sequence Number of the first SYN message in the Three-way Handshake. Referred to as random, but in reality, ISN is calculated by a specific clock based algorithm, which varies by OS
TCP Segment Fields
Source Port, Destination Port, Sequence Number, Acknowledgment Number, TCP Header Length, Reserved, Flags, Sliding-Window Size, Checksum, Urgent Pointer, Options, Padding, Data All Fields, with the exception of Data, make up the TCP Header
Options Field
Specifies special options, such as the maximum segment size a network can handle. Field Length: 0-32 bits
Sliding-Window Size Field
The FLOW CONTROL field. Indicates # of bytes the sender can issue to a receiver while still waiting on acknowledgment for the segment. Aka Window Field Length: 16 bits
Connection Established (ACK)
Third step of the Three-way Handshake. Computer A, issues a segment with the Seq# (number equal to the Ack# of Comp B), the Ack# (number equal to the Seq# of Computer B plus 1), and Flags ACK. after segment is sent Comp A will begin data transmission. Ex Established Connection: Seq #- 937013559, Ack #- 3043958670, Flags- ACK
Reserved Field
a field reserved for later use Field Length: 6 bits
Flags Field
six 1-bit fields or flags, that signal special conditions about other header fields: -- URG, ACK, PSH, RST, SYN, & FIN Field Length: 6 bits