The original TCP/IP protocol was defined as four software layers built upon the hardware. Today, however, TCP/IP is thought of as a five-layer model with the layers named similar to the ones in the OSI model.
When we compare the two models, we find that two layers, session and presentation, are missing from the TCP/IP protocol. The application layer in the suite is usually considered to be the combination of three layers in the OSI model.
The OSI model specifies which functions belong to each of its layers but the layers of the TCP/IP protocol suite contain relatively independent protocols that can be mixed and matched, depending on the needs of the system. The term hierarchical means that each upper level protocol is supported by one or more lower level protocols.
The four layers of the TCP/IP model are the host-to-network layer, internet/network layer, transport layer and the application layer. The purpose of each layer in the TCP/IP protocol suite is detailed below.
The above image represents the layers of TCP/IP protocol suite.
TCP/IP does not define any specific protocol for the physical layer. It supports all of the standard and proprietary protocols.
At this level, the communication is between two hops or nodes, either a computer or router. The unit of communication is a single bit.
When the connection is established between the two nodes, a stream of bits is flowing between them. The physical layer, however, treats each bit individually.
The responsibility of the physical layer, in addition to delivery of bits, matches with what mentioned for the physical layer of the OSI model, but it mostly depends on the underlying technologies that provide links.
TCP/IP does not define any specific protocol for the data link layer either. It supports all of the standard and proprietary protocols.
At this level also, the communication is between two hops or nodes. The unit of communication however, is a packet called a frame.
A frame is a packet that encapsulates the data received from the network layer with an added header and sometimes a trailer.
The head, among other communication information, includes the source and destination of frame.
The destination address is needed to define the right recipient of the frame because many nodes may have been connected to the link.
The source address is needed for possible response or acknowledgment as may be required by some protocols.
LAN, Packet Radio and Point-to-Point protocols are supported in this layer
At the network layer, TCP/IP supports the Internet Protocol (IP). The Internet Protocol (IP) is the transmission mechanism used by the TCP/IP protocols.
IP does not keep track of the routes and has no facility for reordering datagrams once they arrive at their destination.
There is a main difference between the transport layer and the network layer. Although all nodes in a network need to have the network layer, only the two end computers need to have the transport layer.
The network layer is responsible for sending individual datagrams from computer A to computer B; the transport layer is responsible for delivering the whole message, which is called a segment, from A to B.
A segment may consist of a few or tens of datagrams. The segments need to be broken into datagrams and each datagram has to be delivered to the network layer for transmission.
Since the Internet defines a different route for each datagram, the datagrams may arrive out of order and may be lost.
The transport layer at computer B needs to wait until all of these datagrams to arrive, assemble them and make a segment out of them.
Traditionally, the transport layer was represented in the TCP/IP suite by two protocols: User Datagram Protocol (UDP) and Transmission Control Protocol (TCP).
A new protocol called Stream Control Transmission Protocol (SCTP) has been introduced in the last few years.
The application layer in TCP/IP is equivalent to the combined session, presentation, and application layers in the OSI model.
The application layer allows a user to access the services of our private internet or the global Internet.
Many protocols are defined at this layer to provide services such as electronic mail file transfer, accessing the World Wide Web, and so on.
The protocols supported in this layer are TELNET, FTP and HTTP.