Skip to main content

The Difference Between TCP/IP and OSI Models

 The Difference Between TCP/IP and OSI Models

A few important differences between the two models are discussed here.

1. One difference has already been discussed; the difference in the number of layers. OSI has seven layers, while the TCP/IP has only five layers. 
2. The OSI layering scheme was based on the decisions made by their committee members, most of them telecoms. They preferred the mechanism called connection oriented transfer for their communication. It worked like telephones where a connection is established first, then the data transfer takes place, and at last the connection is closed. On the other way round, the TCP/IP model was based on connectionless transfer where the data is pumped into the network without establishing any connection to the recipient. This mechanism is more like sending a telegram to somebody. That is why the data chunks travelling in the network are usually referred to as datagrams. We just send it without really knowing if the recipient's address is correct or not or whether the recipient is ready to receive our message. 
3. The TCP/IP model used connectionless mechanism for data transfer. At the same time, it provided a choice of connectionless or connection-oriented service to the customers. This is quite an intelligent move. Why? Read on. 
The connection-oriented scheme is better and more reliable for the sender and the receiver but is more troublesome for the underlying network. Let us try to understand the same with an example. Assume an employer with very reliable employees. If the employer asks an employee to send a message to another company, the employee would try to send it using a telephone line. If not successful, he may try a few more times. He may try different telephone numbers of the same company. He may then try other personal numbers of some of the employees and ultimately get the job done. If the phone does not work, he may try emailing or may even try to have personal chat. He tries different possible tactics until he gets a solution. In this case, the employer can forget about the problem once it is assigned to the employee. The employee will have all the responsibility on his shoulders to solve it. Now take a case of an employer with irresponsible employees. The employer needs. to suggest him different ways of reaching to the other end (like telephones, personal numbers, emails, etc.) and also keep on reminding him after a while. The first case requires more work on the employee's part. The second case requires more work on the employer's part. The first case represents the connection-oriented mechanism, while the second represents the connectionless mechanism. In the first case, the sender and the receiver are relieved, while the message transfer system has to put more efforts. In the second case, the sender and the receiver must work hard, while the message transfer system can afford to relax.

Now assume that there is a secretary in between the employer and the employees of the second case. It is possible that the secretary takes the responsibility and provides the same service that was provided by the employee in the first case. In fact the secretary's job is to provide a reliable operative environment where the employees are not expected to provide the amount of reliability the manager wants. Now the employer gets a connection-oriented service even though the employee provides a connectionless service.

The TCP/IP model provides options to use this mechanism. It is also possible to provide dedicated (connection-oriented) service over a connectionless connection. The TCP that we will explore further in Chapter 8 is the layer which is responsible for providing a reliable service when the underlying network layer (IP) is designed to be connectionless. The other candidate for the transport layer in Internet is the UDP (user datagram protocol) which does not provide reliable connection-oriented service. TCP is an example of connection-oriented service over connectionless transfer provided by IP, the network layer protocol which is connectionless. When data is given to send across the network, the TCP divides it into segments or data chunks. It instructs the IP to send those chunks across. Being connectionless, the IP sends it across without bothering to have a connection at the other end and does not care if the data is lost in the transit or not received in order. The TCP layers of the sender and the receiver talk to each other to figure out lost segments and their order and ensure that the lost segments are retransmitted and given in the same order as they were sent. When we weigh the pros and cons of connectionless and connection-oriented transfer, a few questions are automatically raised.

What is the need to provide connectionless transfer? (Why to hire an transfer, then why does the TCP/IP model provide connectionless service irresponsible employee?) . 
When we can provide connection-oriented service on top a connectionless over connectionless transfer?

We will get the answers to these questions in due course. Meanwhile take it as an exercise and try to figure out the answers. 
4. The TCP/IP model actually describes an existing set of protocols (the practised leaming of arranging birthday parties is put on paper). The OSI model was designed before any actual network was designed. Thus it is more general in the sense that it can be used to describe any other model. The TCP/IP model is tailor-made for TCP/IP protocols. It fits the TCP/IP protocols perfectly. Fortunately non-TCP/IP protocols are not in much use.

5. The OSI model distinguishes between an interface and a protocol. An interface defines the communication that takes place between a lower and an upper layer. (For example, the communication between the manager and the secretary or the secretary and the route operator, or the route operator and the warehouse keeper.) A protocol defines the communication that takes place between two peer entities. (For example, the secretary of ABC to the secretary of XYZ, the transporter of RI to the transporter of R2, etc.) TCP is the protocol between two transport layers, while IP is the protocol between two network layers and Ethernet is the protocol between two data link and physical layers. The TCP/IP model does not stress on defining a unique interface either between TCP and IP or between some application layer protocol and TCP. The socket interface (popularly known as BSD socket API) is the one which is used universally to facilitate communication between the application layer with the TCP or UDP (transport layer protocols for Internet), but it is not defined by the TCP/IP standard itself.
6. The OSI model clearly mentions the physical and data link layers. They are required for a complete model description. (We have to describe who will put the consignment. into fitting boxes and who will carry them at the other end and how it is done.) The TCP/IP model assumes something of that sort is available and it does not describe them.

Having discussed the differences between the TCP/IP and OSI models, we will now look at each layer independently. There are two ways one can study these layers. That is described in the next section.

The Top-Down and Bottom-Up Approaches to Study Layers

The description of all the layers can begin from the lowermost layer, the physical layer (the Transporter). The description should include what it does and what services it renders to the data link layer (the warehouse keeper cum security officer). Then we describe what the data link layer does and the services it provides to the network layer and so on.

The other way is to start with the application layer and describe what it oes. To do that, we need to discuss why the application layer requires some specific services. We then describe how these services are provided by the transport layer and so on.

There is one thing in common in both the approaches. In the bottom-up approach, we need to take reference of upper layers to explain the functioning of a bottom layer. For example, when we are discussing physical layer, we may need to explain that an email is being sent (through the application layer) which travels down the hierarchy and eventually is given to the physical layer for transmission.

Similarly, when we discuss the functioning of application layer, we have to explain how an email is transmitted down to the physical layer and then transmitted across to the destination and again up to the receiving application layer. Thus if we follow the top-down approach, we need to discuss the lower layers to show how a specific service is implemented which is required at the upper layers. If we take the bottom-up approach, we need to discuss the services that are to be provided for the functionality that we are describing. Thus there is not much difference between the two approaches. In this book, therefore, we will follow the bottom-up approach.

Comments