MSc-IT Study Material
June 2010 Edition

Computer Science Department, University of Cape Town

Protocols and TCP/IP

In order for people to communicate with each other, it is essential that only one person speaks at a time, in a language that the listeners understand, and that the content of the speech is comprehensible (i.e. not complete gibberish). Computers are no different except that their protocols are very much simpler and relatively inflexible. In this section we will investigate the protocols that enable computers to communicate with one another.

Protocols

A protocol is a set of rules for communicating between two parties. This is similar to the concept of diplomatic protocol in international politics, which allows governments to work with each other even if they have quite different political, cultural and ethical rules and practices.

Computer networks require well defined protocols in order to transfer data. These protocols allow the devices (typically computers) participating in the communication to know how to package data for transmission, and later, after receiving the data, how to deal with it.

Consider the possible results of using two different protocols, one at the data source, and another at the destination. Let us assume that software at the source breaks up a file and packages it for transmission in such a way that the packets arrive in a different order than that in which they were transmitted. If the second protocol requires the destination to reconstruct the packets strictly in the order in which they arrive, then the file as reconstructed would not be a copy of the original. Imprecisely, we could describe the supposed copy to have been corrupted.

Many companies have, over the last three decades, tried to develop their own networking protocols, with considerable success, as users of airlines and banks can attest. This lead to the International Standards Organisation (ISO) introduction of a standard protocol, known as the Open Systems Interconnection (or Interconnect) model, the OSI model, or just the ISO reference model. The OSI model provides a reference framework for protocol development. The hope was that network implementers would adhere to the model. In practice, many network companies, as well as hardware and software developers, did not adhere to it, and so to this day few protocols are strictly compliant to it. However, because it clearly specifies how suites of protocols can be used for the different layers in the model, it remains extremely useful when analysing network infrastructures.

One protocol suite that follows the OSI model is TCP/IP, the protocol pair underlying the Internet and World Wide Web. These two protocols — Transport Control Protocol (TCP) and Internet Protocol (IP) — have become the standard protocols for internetwork communication. Before the advent of the Internet and TCP/IP, it was impossible to enforce every network to be compatible with application software, physical organisations, operating systems, and so on. Now, the Internet, built on top of TCP/IP, has allowed truly open systems to be developed.

Note that TCP/IP is sometimes referred to as a single protocol, even though it is a suite of protocols. Also note that it is very occasionally also called 'the Internet Protocol', confusing this term with IP.

Transport Control Protocol/Internet Protocol (TCP/IP)

The protocol of concern to Web designers is the Internet Protocol (IP). IP has some important functional characteristics:

  • IP is connectionless inasmuch as it is unaware of the physical connections between destination and source. All packets are unaware of the physical nature of the transmission medium.

  • Packets transmitted over the internetwork are independent of each other, irrespective of the data they contain or are associated with.

  • Except in high priority cases, no explicit resources are reserved for any of the packets. All packets are equal.

  • The path between the communication end-points (the source and destination) is not random. The path between nodes (routers) is chosen according to certain criteria, usually the shortest path. This can result in pathways becoming static and the network overloaded. Some protocols have a more dynamic nature and balance the load over several pathways. This causes packets to potentially arrive out of sequence, although network traffic becomes more evenly distributed.

In terms of the OSI reference model, IP is a low level protocol on which TCP is built. The most important aspects of IP is that it provides a mechanism for addressing network nodes, for splitting data into packets and appending addresses to these packets.

Being connectionless, IP does not take into consideration the failure to deliver packets. However, TCP addresses this by managing, organising and auditing all packets. To demonstrate this technique, consider the following scenario:

A file is transmitted as 90 packets of data, numbered sequentially 1,2,3 ... 88,89,90. During its transmission, the 45th packet is temporarily stored at a node which loses power and shuts down. This causes the destination device to receive all packets except the 45th.

TCP is responsible for re-ordering the received packets to match the order in which they were sent. It therefore discovers the missing 45th packet. TCP then requests that the packet be resent. When the 45th packet finally arrives at the destination, the document is re-assembled, and its transmission is complete.

Put simply:

  • IP is responsible for transporting packets.

  • TCP guarantees that the packets arrive at the correct destination, in their correct order, and ensures that no corruption has taken place.

Analogy

The postal service is a useful analogy for explaining networking and network protocols. The postal service is an established network of roads, airmail and trains. In a postal service there are many layers of complexity.

Some parallels can be drawn:

  • The sorting office is a node on a WAN.

  • Envelopes are packets of data.

  • The sender is the source.

  • The receiver is the destination.

  • The roads are the transmission medium through which the data travels.

  • Lost property is the protocol.

The figure below shows the relationships between these elements and should be compared with the previous figure.

To conclude the analogy, two networks can also be seen in the above figure:

  1. between the sorting offices that covers a large geographical area, much like a WAN;

  2. between sorting offices and senders/receivers that cover a local area e.g. a town , like a LAN;

Exercise 2

Write down points that describe how a postal service might work. Use the terminology of internetworking that we have used.

A solution can be found at the end of the Unit.