16.06.2014 Views

Cisco CCNA Study Guide - Router Alley

Cisco CCNA Study Guide - Router Alley

Cisco CCNA Study Guide - Router Alley

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>CCNA</strong> <strong>Study</strong> <strong>Guide</strong> v2.62 – Aaron Balchunas<br />

95<br />

TCP Segmentation and Sequencing<br />

TCP is a stream-oriented transport protocol. This allows the application<br />

layer to send a continuous stream of unstructured data and rely on TCP to<br />

package the data as segments, regardless of the amount of data.<br />

TCP will not only segment data into smaller pieces for transport, but will<br />

also assign a sequence number to each segment. Note though that this<br />

sequence number identifies the data (bytes) within the segment rather than<br />

the segment itself.<br />

Sequencing serves two critical purposes:<br />

• It allows the receiving host to reassemble the data from multiple<br />

segments in the correct order, upon arrival.<br />

• It allows receipt of data within a segment to be acknowledged, thus<br />

providing a mechanism for dropped segments to be detected and<br />

resent.<br />

When establishing a connection, a host will choose a 32-bit initial sequence<br />

number (ISN). The ISN is chosen from a randomizing timer, to prevent<br />

accidental overlap or predictability.<br />

The receiving host responds to this sequence number with an<br />

acknowledgment number, set to the sequence number + 1. In the above<br />

example, HostB’s acknowledgment number would thus be 1001.<br />

HostB includes an initial sequence number with its SYN message as well –<br />

4500 in the above example. HostA would respond to this sequence number<br />

with an acknowledgement number of 4501.<br />

The TCP header contains both a 32-bit Sequence Number and 32-bit<br />

Acknowledgement Number field.<br />

* * *<br />

All original material copyright © 2013 by Aaron Balchunas (aaron@routeralley.com),<br />

unless otherwise noted. All other material copyright © of their respective owners.<br />

This material may be copied and used freely, but may not be altered or sold without the expressed written<br />

consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.

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

Saved successfully!

Ooh no, something went wrong!