messages. Thus, TCP is not particularly suitable for real-time applications such as Voice over IP. For such applications, protocols like the Real-Time Transport Protocol (RTP) running over the User Datagram Protocol (UDP) are usually used (see Table 3.1b). A TCP segment consists of a segment header and a data section. The header contains 10 mandatory fields, and an optional extension field, as shown in Figure 3.23. The main fields of the header are the source port and destination port identifiers and two fields for the segment progressive number and the segment reception acknowledge. A checksum for error detection and an end of transmission flag are also included. TCP protocol operations may be divided into three phases: 1. Connections establishment 2. Data transfer 3. Connection termination 3.2.3.1.1 Connection Establishment To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a server, the server must first prepare a port for connection binding it to a connection request: this is called a passive open. Once the passive open is established, a client may initiate an active open. The active open is performed by the client sending a segment with the suitable flag on to the server. It sets the segment's sequence number to a random value, let us call it A. In response, the server replies with an acknowledgment segment whose sequence num- ber is another random number, let us call it B. Finally, the client sends its own acknowledgment back to the server. At this point, both the client and server have received an acknowledgment of the connec- tion with coherent acknowledgment and sequence numbers and the connection is set up. 3.2.3.1.2 Data Transfer The main features of TCP during the data transfer phase can be described as follows: Reliable transmission: TCP uses a sequence number to identify each byte of data. The sequence number identifies the order of the bytes sent from each computer SO that the data can be reconstructed in order, regardless of any fragmentation, disor