Information Technology Reference
In-Depth Information
24
TCP and UDP
24.1 Introduction
TCP, ICMP and IP are extremely important protocols as they allow hosts to communicate
over the Internet in a reliable way. The TCP layer is defined by RFC793 and RFC1122,
ICMP by RFC792 and the IP layer by RFC791. TCP provides a connection between two
hosts and supports error handling. This chapter discusses TCP in more detail and shows how
a connection is established and then maintained. An important concept of TCP/IP communi-
cations is the usage of ports and sockets. A port identifies the process type (such as FTP,
TELNET and so on) and the socket identifies a unique connection number. In this way,
TCP/IP can support multiple simultaneous connections of applications over a network.
The IP header is added to higher-level data. This header contains a 32-bit IP address of
the destination node. Unfortunately, the standard 32-bit IP address is not large enough to
support the growth in nodes connecting to the Internet. Thus a new standard, IP Version 6,
has been developed to support a 128-bit address, as well as additional enhancements.
24.2 Transmission control protocol
In the OSI model, TCP fits into the transport layer and IP fits into the network layer. TCP
thus sits above IP, which means that the IP header is added onto the higher-level information
(such as transport, session, presentation and application). The main function of TCP is to
provide a robust and reliable transport protocol. It is characterised as a reliable, connection-
oriented, acknowledged and datastream-oriented server. IP, itself, does not support the con-
nection of two nodes, whereas TCP does. With TCP, a connection is initially established and
is then maintained for the length of the transmission.
The main aspects of TCP are:
Data transfer - data is transmitted between two applications by packaging the data within
TCP packets. This data is buffered and forwarded whenever necessary. A push function
can be used when the data is required to be sent immediately.
Reliability - TCP uses sequence numbers and positive acknowledgements (ACK) to
keep track of transmitted packets. Thus, it can recover from data that is damaged, lost,
duplicated, or delivered out of order, such as:
Time-outs - the transmitter waits for a given time (the timeout interval), and if it does
not receive an ACK, the data is retransmitted.
Sequence numbers - the sequence numbers are used at the receiver to correctly order
the packets and to delete duplicates.
Search WWH ::




Custom Search