Enterprise Network Systems Lecture - TCP Protocols

This lecture is divided into hyperlinked sections

Introduction
Why do we need a Protocol Architecture?
What is a protocol?
The TCP/ IP Protocol Architecture Structure
Operation of TCP/ IP
TCP/ IP Applications
TCP/ IP Dependent Protocols
Conclusion
Tutorial Questions


Introduction

We shall examine computer communications and discuss the requirements and then compare the OSI model with the Internet model, the TCP/ IP suite.

We will discover what protocols are and why they are needed and look at several protocols and observe their function.

We shall then see how TCP/IP delivers a message across a network and see some applications that use TCP/IP.

We will see the use of port numbering to identify processes across an internetwork


Why the need for Protocol Architecture?

When any two computer based entities wish to exchange data there must exist more than just a physical data path between the two communicating devices. There has to be some amount of formal co-operation between the two devices to enable the data transfer to take place. Some typical tasks that need to be performed for the data transfer to take place are:

  1. The source system (client) must set up the communication path or inform a remote system it wishes to communicate with it
  2. The source system (client) must determine whether the remote system is ready to accept data
  3. The data transfer application on the source system must make sure that the file management program (daemon) within the remote system is ready to accept the data from the source
  4. If there is any incompatibility between the two system's file formats, one of the systems must perform a format translation e.g. big endian to little endian
  5. If data are lost, there must be some recovery system
  6. When the data transfer is complete, the systems must inform each other of their readiness to break the connection
The tasks described above are a highly simplified view of the process that actually takes place and the logic to implement this co-operation is too complex to be installed as a single module. Instead, this logic is broken down into a set of sub-tasks, each of which is implemented separately.

In a protocol architecture, the logic modules are arranged in a vertical stack. Each layer of this stack performs a subset of the entire logic necessary to communicate with a remote system. Layers should be designed so that changes in one layer do not affect any higher or lower layers.

This stack of logic modules must be implemented in both of the machines that wish to communicate. Communication is achieved by corresponding, or peer levels in both machines communicating with each other. Each of these peer levels communicates according to a set of rules or conventions that are known as a protocol.


What is a protocol

A protocol is the formal code of behaviour for a system, or to be more precise the set form in which data must be presented for handling by a particular computer configuration. A protocol defines the set of rules governing the exchange of data between two entities such as user application programs, file transfer packages, email etc.

The key features of a protocol are:


The TCP/ IP Protocol Architecture Structure

The TCP/ IP suite has come to dominate computer communications. The OSI protocols were still in development when the TCP/ IP protocols had already been tested and implemented. When businesses realised the need for interoperability, it was only TCP/ IP that was ready to be used. Another factor is that the OSI model is too complicated and needs seven layers to do what TCP/ IP does in five.

For reasons best known to themselves the Internet community have chosen to divide the functionality of the protocol stack in a different manner to OSI but not without maintaining the compatibility. The layers correspond roughly as shown below.

Figure: Comparison of OSI and TCP/IP


Operation of TCP/ IP

To understand how one application that resides on one computer operates, let us consider the case of a PC on an Ethernet network that wishes to communicate with another machine on a different network. For our purposes two separate Ethernet networks separated by a router will help illustrate the process. For successful communication to take place, every entity in the overall system must have a unique address. The host is identified with an IP address so IP is implemented in all end systems and routers.

Compare this with surface post. It is necessary to have the address of the house to which you want your letter to be delivered, and this is written on the envelope. This can be likened to the IP address. However a PC may have many applications running in seprate processes (identified by port numbers) that are able to communicate and these may be compared with the inhabitants of the house to which you send the letter. When you write a letter, you specify the person within the address to which the letter is bound. The post office sorting system only looks at the postcode and address written on the envelope and delivers it to the house (IP address). Once the letter has arrived at the house, it is further sorted by the person who picks up the letters and passed to the person whose name precedes the address (port number).

This is the same as computer addressing where the host has an IP address and the application process within the host has an identity too. The address for the application process within the host is known as a port. It is TCP at the Transport layer that looks at the port address and delivers any incoming data to the proper application process specified by the port number.

Let us consider the operation where a process running on one host wishes to send a message to another process on a remote host.

Figure: Overview of TCP/IP communication concepts

To help with the following discussion, please refer to the diagram above. The process (application) is associated with an arbitrary port e.g. 2343 on host A and wishes to communicate with a process associated with port 80 on host B. The process on host A sends the message to TCP with instructions to send to host B, port 80. TCP hands the message down to IP with instructions to send to host B. IP does not need to know the destination port as this has been taken care of by TCP. IP then passes the message down to the network access layer along with the IP address of host B (193.60.61.124), Ethernet in this case with instructions to send the message to a router R which is the first hop (default gateway) on the route to host B.

For this operation to take place, extra information other than the data generated by the application has to be transmitted too, see the figure below. For each piece of data passed to TCP, there is some control information too that is added by TCP in the form of a header, a few bytes of information that is prepended to the data. This forms a TCP segment. This information will be used when the TCP segment is examined by host B to pass the data to the correct port. It is not used or seen at any other point between host A and B.

Some of the information included in the TCP header are:

Having formed the TCP segment, it is passed to IP with instructions to pass the TCP segment to host B. The segments must be passed across one or more subnetworks and via one or more intermediate routers. This operation will require control information too and IP adds its own header of control information. This forms an IP datagram. The IP header contains both source and the destination host address.

This IP datagram is presented to the network access layer for transmission across the first subnetwork in its journey towards its destination. The network access layer then appends its own header containing information that is required to transfer data across this first subnetwork.

Information contained in the network access layer includes:

Having arrived at the router, the network access layer header is examineded and the IP address of the final destination is revealed in the IP header (in our case 193.60.61.124). The router  then makes a decision based on internal tables as to which interface the datagram ought to be passed to. The datagram is once more augmented with a network access protocol header, but this time it will be the header associated with the destination network. This header will contain elements such as subnetwork address (MAC address) and facilities requests.

The data will then be delivered to host B where firstly the network header is stripped off. The IP header is removed too, revealing the TCP data (port address). The TCP layer in host B then is able to remove the TCP control information and pass the (original) data to the correct port for the residing application process to decode and present to the user.

Figure: Protocol Data Units within the TCP/IP structure


TCP/IP applications

Several applications have been written to operate within the TCP/IP environment. The three most common are:


TCP/ IP Dependent Protocols

The TCP/IP protocol suites occupy two levels in the system model, those of Transport and Internet layers respectively.

The Internet layer, i.e. that which deals with addressing using IP numbers, is a connectionless mode while the transport layer is connection oriented if Transmission Control Protocol (TCP) is used but again connectionless if User Datagram Protocol (UDP) is used.

Connectionless mode is when the end entity is not contacted before the data transfer and no defined data path is required to exist.

Connection oriented mode is where a connection must be established with the end entity before data transfer may commence.

There are situations where either are the best choice for the application in use. The most common Internet applications are :
 


The relationship between the protocols and the end-to-end services is shown below.
 


 

Figure: Protocol layer relationships

In the figure above it can be seen that the Internet layer provides a delivery service independent of the underlying technology of the interface layer. To do this the Internet layer requires global addressing facilities and to be able to route datagrams to the required destination. The selected path may traverse a number of different networks with differing interface layers. This latter requirement may affect the operation of the Internet layer.

There is one protocol not previously mentioned, that of ICMP Internet Control Message Protocol. This is inside the IP layer and provides some simple control facilities independent of SNMP.

ICMP is a message control and error-reporting protocol between a host server and a gateway (router) to the Internet. ICMP uses Internet Protocol (IP) datagrams, but the messages are processed by the TCP/IP software and are not directly apparent to the application user.

Conclusion

We have seen that a protocol architecture is required to allow for a structured set of rules to be established that will allow communications to take place between a client and the server.

Within the communication architecture reside protocols which are sets of rules for each individual operation to take place.

We have seen that a practical protocol architecture in use is TCP/ IP, how it fits in with the OSI model and how it is used in a communication arena.

We named several of the most popular applications that use TCP/ IP, namely HTTP, SMTP, FTP and TELNET.

The transport layer makes use of port numbers to identify processes on the end systems.

The Internet layer makes use of IP to address individual end systems.


Tutorial questions


Background Information

 TCP and IP

In May of 1974, Vint Cerf and Bob Kahn of ARPA began to develop methods and protocols for internetworking. This is the ability to communicate across different and arbitrary packet switched networks. The proposal in their paper was enthusiastically received and their proposal was refined and with contributions from ARPANET and Cyclades (a French network project) and other projects from around the world formed the basis of what was eventually to become Transmission Control Protocol (TCP) and Internet Protocol (IP). These in turn became the foundations for the TCP/IP protocol suite. In 1980, experimentation with TCP/IP commenced.

This provided the underpinning of what was to become the Internet as we know it today with Arpanet being just one of a collection of interconnected networks.

Between 1982 and 1983, Arpanet converted form its original NCP (Network Control Protocol) to TCP/IP. Many networks throughout the world were interconnected using this technology.

Worldwide realisation of the usefulness of the technology of networking brought the National Science Foundation (NSF) to give support to other computer science research groups. In 1986, NSF extended support for all disciplines of the general research community with the NSFNET backbone. Eventually NSFNET offered interconnection via its backbone to regional packet switched networks across the United States. The Joint Academic Network JANET was formed around this time to interconnect European universities and colleges.

In 1990 the ARPANET was shut down.