Скачать в pdf «Network+»

The source port number and the destination port number ensure that the data is sent back and forth to the correct process running on each computer.

The sequence number allows the datagrams to be rebuilt in the correct order in the receiving computer, and the checksum allows the protocol to check whether the data sent is the same as the data received. It does this by first totaling the contents of a datagram and inserting that number in the header. This is when IP enters the picture. Once the header is in the datagram, TCP passes the datagram to IP to be routed to its destination. The receiving computer then performs the same calculation, and if the two calculations do not match, an error has occurred somewhere along the line, and the datagram is re-sent.

Figure 3.2 shows the layout of the datagram with the TCP header in place.

FIGURE 3.2 A datagram with its TCP header

Source Port

Destination Port

Sequence Number

Acknowledgment Number






Urgent Pointer



Start of Data

In addition to the source and destination port numbers, the sequence number, and the checksum, a TCP header contains the following information:

Acknowledgment Number Indicates that the data was received successfully. If the datagram is damaged in transit, the receiver throws the data away and does not send an acknowledgment back to the sender. After a predefined time-out expires, the sender retransmits the data for which no acknowledgment was received.

Скачать в pdf «Network+»