






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







-^ Although this protocol sounds simple, there are
-^ Since segments can be fragmented, it is possible that part ofa transmitted segment arrives but the rest is lost and neverarrives. –^ Segments can also arrive out of order, for example, bytes3072-4095 can arrive but cannot be acknowledged becausebytes 2048-3071 have not come yet. –^ Segments can also be delayed so long in transit that thesender times out and retransmits them. –^ If a retransmitted segment takes a different route than theoriginal, and is fragmented differently, bits and pieces of boththe original and the duplicate can arrive sporadically,requiring careful administration to achieve a reliable bytestream.
-^ Finally, with so many networks making up the Internet, it ispossible that a segment may occasionally hit a congested (orbroken) network along its path. • TCP must be prepared to deal with these problems andsolve them in an efficient way. • A considerable effort has gone into optimizing theperformance of TCP streams, even in the face ofnetwork problems. We will discuss some algorithmsnext.
Fig. 1. The TCP header
-^ Source port
and^ Destination port
points of the connection. • Sequence number
and^ acknowledgement number
(specifies
the next sequence number expected) • TCP header length
-^ Host 1 chooses a sequence number,
x, and sends a
CONNECTION REQUEST containing it to host 2. – Host 2 replies with CONNECTION ACCEPTEDacknowledgment
x, and announcing its own initial sequence number,
y.
-^ Finally Host 1 acknowledges host 2’s choice of an initialsequence number in the first data that it sends.
When this segment arrivesat the destination, the TCPentity there checks to see ifthere is a process that hasdone a LISTEN on the portgiven in the Destination portfield. If not, it sends a replywith the RST bit on to rejectthe connection.If some process is listeningon the port, that process isgiven the incoming TCPsegment. It can eitheraccept or reject theconnection. If it accepts, anacknowledgment segment issent back.