25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TCP</strong> segment format<br />

Figure 4-10 shows the <strong>TCP</strong> segment format.<br />

0<br />

0 1 2 3 4 5 6 7 8 9<br />

Data<br />

Offset<br />

Checksum<br />

Figure 4-10 <strong>TCP</strong>: Segment format<br />

Where:<br />

Source Port The 16-bit source port number, used by the receiver to<br />

reply.<br />

Destination Port The 16-bit destination port number.<br />

Sequence Number The sequence number of the first data byte in this<br />

segment. If the SYN control bit is set, the sequence<br />

number is the initial sequence number (n) <strong>and</strong> the first<br />

data byte is n+1.<br />

Acknowledgment Number<br />

If the ACK control bit is set, this field contains the value of<br />

the next sequence number that the receiver is expecting<br />

to receive.<br />

Data Offset The number of 32-bit words in the <strong>TCP</strong> header. It<br />

indicates where the data begins.<br />

Reserved Six bits reserved for future use; must be zero.<br />

URG Indicates that the urgent pointer field is significant in this<br />

segment.<br />

ACK Indicates that the acknowledgment field is significant in<br />

this segment.<br />

PSH Push function.<br />

RST Resets the connection.<br />

156 <strong>TCP</strong>/<strong>IP</strong> <strong>Tutorial</strong> <strong>and</strong> <strong>Technical</strong> <strong>Overview</strong><br />

1<br />

Source Port<br />

0 1 2 3 4 5 6 7 8 9<br />

Reserved<br />

U<br />

R<br />

G<br />

Options …|… Padding<br />

A<br />

C<br />

K<br />

2<br />

0 1 2 3 4 5 6 7 8 9<br />

Sequence Number<br />

Acknowledgment Number<br />

P<br />

S<br />

H<br />

R<br />

S<br />

T<br />

Data Bytes<br />

S<br />

Y<br />

N<br />

F<br />

I<br />

N<br />

3<br />

0 1 2 3 4 5 6 7 8 9<br />

Destination Port<br />

Window<br />

Urgent Pointer

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!