Q. What is the TCP/IP Model? Explain the functions and protocols and services of the each layer? Compare it with the OSI Model.
Answer: - The TCP/IP MODEL is explained below:-
The TCP/IP reference model was developed earlier to the OSI model. The main design goals of this model were as follows,
1. To link multiple networks together so that they appear as the single network.
2. To survive after the partial subnet hardware failures.
3. To provide with a flexible architecture.
Not like OSI reference model, TCP/IP reference model comprises of only 4 layers. They are as follows,
1. Host-to-Network Layer
2. Internet Layer
3. Transport Layer
4. Application Layer
1. Host-to-Network Layer:
The TCP/IP reference model does not really say a lot about what happens here in this layer, except to point out that the host has to link to the network using some protocol so it can send IP packets to it. This protocol is not defined and differs from host to host and network to network.
2. Internet Layer:
This layer, known as the internet layer, is the linchpin that contains the whole architecture together. Its job is to allow hosts to inject packets into the network and have they travel separately to the purpose (potentially on a various network). They might even arrive in a different order than they were sent, in which case it is the job of advanced layers to rearrange them, if in-order delivery is required. Note that ''internet'' is used here in a generic sense, although this layer is present in the Internet.
The internet layer describes an official packet format and protocol called IP (Internet Protocol). The purpose of the internet layer is to deliver IP packets where they are assumed to go. Packet routing is clearly the main issue here, as is avoiding overcrowding. For these reasons, it is appropriate to say that the TCP/IP internet layer is similar in function to the OSI network layer.
3. The Transport Layer:
The layer on top of the internet layer in the TCP/IP model is called the transport layer.
It is designed and created to allow peer entities on the source and target hosts to carry on a conversation, similar to that in the OSI transport layer. The two end-to-end transport protocols have been described here. The first one, TCP (Transmission Control Protocol), is a quite reliable connection- oriented protocol that permits a byte stream originating on one machine to be delivered without any error on any other machine in the internet. It fragments the incoming byte stream into the discrete messages and transfers each one on to the internet layer. At the target destination, the receiving TCP process reassembles the received messages into the output stream. TCP also handles the flow control to make sure that the fast sender cannot swamp a slow receiver with more messages which it can handle.
The next protocol in this layer, UDP (User Datagram Protocol), is an undependable, connectionless protocol for applications which do not want TCP's sequencing or the control of flow and wish to offer their own. It is also extensively used for one-shot, client-server-type request-reply queries and applications in which prompt delivery is more significant than accurate delivery, such as transmitting speech or transmitting video. As the model was developed, IP has been implemented on number of other networks.
4. The Application Layer:
The TCP/IP model does not contain session or presentation layers. Over the transport layer is the application layer. It comprises all the higher-level protocols. The early ones included file transfer (FTP), virtual terminal (TELNET), and electronic mail (SMTP), as shown in the Fig.6.2. The practical terminal protocol permits a user on one machine to log onto a far-away machine and work there. The file transfer protocol gives us a way to move data efficiently from one machine to the other machine. Electronic mail was basically a kind of file transfer, but later the specialized protocol (SMTP) was developed for it. Number of other protocols has been added to this over the years: the Domain Name System (DNS) for mapping the host names onto their own network addresses, NNTP, the
protocol for moving the USENET news articles around, and HTTP, the protocol for fetching the pages on the World Wide Web, and many others.
Comparison of the OSI and TCP/IP Reference Models given below:
The OSI and TCP/IP reference models have much in familiar. Both are based on the concept of
the stack of the independent protocols. Also, the functionality of the layers is approximately similar. For example, in both the models the layers up through and together with the transport layer are there to give an end-to-end, network-independent transport service to processes wanting to communicate. These layers create the transport provider. Once more in both the models, the layers above transport are application-oriented users of the transport service. Despite these fundamental similarities, the two models also have various differences.
The following concepts are central to the OSI model:
Probably the largest contribution of the OSI model is to create the distinction between these three basic concepts explicit. Each layer performs certain services for the layer above it. The service definition tells us that what the layer does, not how entities above it approach it or how the layer works. It describes the layer's semantics. A layer's interface tells us about the processes above it how to approach it. It specifies what the parameters are and what the results to be expected are. It, doesn't say anything about how the layer works inside.
At last, the peer protocols which are used in a layer are the layer's own business. It can make use of any protocols it wants to, as long as it gets the work done (which means it provides the offered services). It can also change them at will without disturbing software in higher layers. The TCP/IP model did not originally distinguish clearly between the service, protocol, and interface, though the people have tried to retrofit it after the fact to make it more like OSI. For example, the only real services provided by the internet layer are to SEND IP PACKET and to RECEIVE IP PACKET.
As a result, the protocols in the OSI model are hidden better than in the TCP/IP model and can be replaced relatively without difficulty as the technology changes. Being able to create such changes is one of the major purposes of having layered protocols in the first place. The OSI reference model was devised earlier than the corresponding protocols were invented.
This ordering means that the model was not biased toward only one particular set of the protocols, a fact that made it fairly general. The downside of this ordering is that the designers did not have a great deal experience with the subject and did not have a good idea of which functionality to place in which layer.
One more difference is in the area of connectionless vs. connection-oriented communication. The OSI model supports connectionless and connection-oriented communication both in the network layer, but only the connection-oriented communication in the transport layer, where it counts (because the transport service is observable to the users). The TCP/IP model has only one mode in the network layer (connectionless) but supports both the modes in the transport layer, giving the users a option. This option is especially significant for simple request-response protocols.