Protocols in multi-service networks
Protocols in multi-service networks

This free course is available to start right now. Review the full course description and key learning outcomes and create an account and enrol if you want a free statement of participation.

Free course

Protocols in multi-service networks

3.4.1 Connection control

TCP does not assume a reliable communication network and takes precautions against the loss or duplication of protocol data units. One method is the three-way handshake procedure for establishing a connection between two hosts. Figure 18 shows the TCP procedure for this. This connection is a virtual connection of the type described in Section 2; many virtual connections can share a physical communication channel.

Figure 18
Figure 18 TCP three-way handshake procedure

The condition of the control flags in TCP segments determines how a host will interpret the segments it receives. The first protocol data unit (segment) from host A to host B is in effect a ‘connection request message’. This is indicated by the SYN flag being active. The value in the sequence number field indicates the initial sequence number, x, which means that the sequence number of the first data byte that A is going to send to B is x  +  1. The value of x is chosen by A to minimise the risk of duplicated sequence numbers. Host B responds by sending an ‘acknowledgement and connection request message’ to A. This is indicated by both the SYN flag and the ACK flag being active. The acknowledgement number field contains the value x  +  1, which is the first sequence number host B expects to receive. The initial sequence number chosen by B to transmit its data in this example is represented by the letter y. In the final stage of the three-way handshake, host A sends an ‘acknowledgement message’. This message has the ACK flag active and the acknowledgement number equals y + 1. Figure 18 shows that this is followed by user data sent between the two hosts.

Although not shown in Figure 18, the segments that set up a connection may contain user data in the data field, but the receiving host should not deliver this data until the connection has been established.

Figure 18 also shows an example of closing a connection in both directions. Host A first requests the connection to be closed. Host B acknowledges this request and in a separate message requests that the connection in the opposite direction is closed also. Notice that the values of the acknowledgement and sequence number fields make certain that there is no ambiguity about how much data has been received by each host.

T822_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus