0% found this document useful (0 votes)
121 views

TCP & Udp

TCP provides a connection-oriented, reliable byte-stream service that handles establishment and termination of connections, sequencing of data, end-to-end reliability through checksums and acknowledgments, and end-to-end flow control. It buffers data at the TCP layer and delivers it to applications in sequenced chunks, and can handle urgent out-of-band data. TCP segments can be up to 64kb in size and are sent via one or more IP datagrams.

Uploaded by

Sristick
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC or read online on Scribd
0% found this document useful (0 votes)
121 views

TCP & Udp

TCP provides a connection-oriented, reliable byte-stream service that handles establishment and termination of connections, sequencing of data, end-to-end reliability through checksums and acknowledgments, and end-to-end flow control. It buffers data at the TCP layer and delivers it to applications in sequenced chunks, and can handle urgent out-of-band data. TCP segments can be up to 64kb in size and are sent via one or more IP datagrams.

Uploaded by

Sristick
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC or read online on Scribd
You are on page 1/ 1

TCP (Transmission Control Protocol)

Connection-oriented, reliable, full-duplex, byte-stream service. In other words, exactly


what most applications (and application programmers) want.

Byte stream means that message boundaries don't exist. The receiving process can't tell
how the data was written by the sending process. This makes application protocols a little
trickier, since the demarkations of application messages must be in the data itself.

TCP handles:

• establishment and termination - setting up the connection


• sequencing of data
• end-to-end reliability (checksums, acks, timeouts)
• end-to-end flow control via a sliding window algorithm

Data is buffered at the TCP layer, since it must be delivered to the app in reliable,
sequenced chunks. This buffering can be defeated for urgent data. This is know as "out
of band" data.

The TPDUs are called segments by TCP. Each segment has data plus a 20 byte header,
and winds up being sent by one or more IP datagram. The segments may be up to 64k
bytes (but are usually much smaller) and must be reassembled into the original data
stream when they are received

UDP (User Datagram Protocol)


Connectionless, unreliable, datagram service. Note that unreliable does not refer to the
presence of undetected errors (data integrity is guaranteed, but delivery and sequence is
not). A very thin veneer on top of IP. Lower overhead both for header and for time (no
connection set-up).

UDP is a good match to applications that don't need reliability, for example SNMP, DNS.
Or for those in which the environment is clean and small (LAN) so that errors are quite
unlikely.

UDP packets may be corrupted in transit, lost due to congestion in a router, lost due to
buffer overrun in the receiver's buffer. In all cases their is no indication given to the
sending process. Packets just disappear.

You might also like