Why Is the OSI and TCP/IP Model Used?
Both OSI and TCP/IP are Internet models, they can be considered as the cornerstone of the Internet. Then, why do we need these Internet models? Why is the OSI model/TCP model used?
It's just like an American and a Japanese meeting each other one day.
American say: Hello
Japanese say: こんにちは
They can’t understand each other because of the language differences. That’s why English is gradually used as the language of communication in the international area. Similar to the Internet, networks with different architectures can’t realize interconnection without an internet model, just like your mobile phone sends a message to your PC but your PC can’t receive it.
Consequently, the arrival of Internet models such as OSI and TCP/IP promotes the development of computer networks and solve the compatibility and interconnection of different network structures and systems.
The OSI model is referred to as the Open System Interconnection Reference Model. As its name implies, the OSI model emphasizes open standards, that is, any system can communicate with other systems as long as they follow the OSI standard. Using the layered architecture method, the OSI model divides the large and complex system into several small easy-handed systems. The OSI model allows you to visually observe the network functions of each layer and understand the whole process of network transmission.
However, the OSI model is an idealized theoretical model, which only standardizes some concepts. It doesn’t describe the protocols and services used in each layer in detail. It just tells us what to do in each layer and does not provide detailed implementation methods.
What Are the Layers of OSI
Layer 1 - Physical Layer
The physical layer is the bottom layer of the OSI model, which defines the system’s electrical, mechanical, and functional standards, such as voltage, physical data rate, maximum transmission distance, physical coupler, etc. The main function of the physical layer is to use the transmission medium to provide the physical connection for the data link layer and be responsible for the physical transmission of data flow.
The basic unit of the physical layer transmission is bitstream, namely 0 and 1, that is, the most basic electrical signal or optical signal, which is the most basic physical transmission feature.
Layer 2 - Data Link Layer
The main function of the data link layer is to establish data link connection between communication entities and provide error control and flow control services for the network layer. The basic unit of the data link layer transmission is the frame.
The data link layer consists of MAC sublayer (medium access control sublayer) and LLC sublayer (logical link control sublayer). The MAC sublayer specifies how to transmit frames on physical lines. The LLC sublayer manages the communication among devices on the same network link. The data link control sublayer is mainly responsible for identifying and encapsulating different protocol types. In other words, the data link control sublayer will accept the network protocol data, packet datagram and add more control information, so as to transmit the packet to its target device.
Layer 3 - Network Layer
The network layer is designed to create logical links for data transmission between nodes and selects the best path for packets through the routing algorithm, so as to realize the functions of congestion control, network interconnection.
The network layer is the key layer with the router as the highest node. It is responsible for the routing of packets from the source network to the target network. The Internet is a collection of multiple networks. With the help of the routing function of the network layer, the connection between multiple networks can be interconnected and information can be shared.
Layer 4 - Transport Layer
The transport layer is an interface layer connecting high and low layers in the ISO model. The main function of the transport layer is to provide end-to-end services for users and to deal with transmission problems such as datagram errors.
The transport layer is a key layer in the OSI model. It shields the communication details of the lower data from the upper layer so that users do not need to consider the details of the physical layer, data link layer, and network layer.
Layer 5 - Session Layer
The main function of the session layer is to maintain the transmission connection between two nodes, ensure point-to-point transmission, and manage data exchange.
The session layer establishes, manages, and terminates sessions. It can also decide which communication mode to use through dialog control, such as full-duplex or half-duplex communication. The session layer coordinates the request and response through its own protocol, such as RPC (remote process call) protocol, X-Windows system protocol, AppleTalk session protocol and DNA SCP protocol.
Layer 6 - Presentation Layer
The main function of the presentation layer is to deal with the representation of information exchanged between the two communication systems, mainly including data format change, data encryption and decryption, data compression and decompression, etc. The services provided by the presentation layer for the application layer include syntax conversion, syntax selection, and connection management.
On the premise of certain network bandwidth, the smaller the data compression, the faster the transmission rate. Therefore, the data compression and decompression of the presentation layer is regarded as the key factor to influence the network transmission rate. In addition, the presentation layer also provides a data encryption service, which ensures the safe transmission of data.
Layer 7 - Application Layer
The application layer is the highest layer in the OSI model, which is a layer directly facing users. The communication of users should be solved by the application process, which requires the application layer to adopt different application protocols to solve different types of application requirements.
The application layer contains several independent user service protocol modules to provide services for the communication between different network users. It should be noted that the application layer is not an application, but provides services for applications.
TCP/IP is the most widely used Internet model. The full name of TCP/IP is Transmission Control Protocol/Internet Protocol, which is also known as Internet protocol suite. TCP/IP protocol suite has two of the most important protocols, TCP (Transmission Control Protocol) and IP (Internet Protocol). TCP is responsible for the connection with the remote host, and IP is responsible for addressing. They are the core of the model. Therefore, the model is called the TCP/IP model. Protocols used in the TCP/IP model also include HTTP, TELNET, DNS, SMTP, UDP, etc.
Source and Development of TCP/IP
The TCP/IP model was funded by the United States Department of Defense (DoD). The design background of TCP/IP is that the DoD needs a network that can survive at any time and in any conditions. This requires that the network not only allows various connection modes, such as cable, microwave, optical fiber, and satellite line but also has good compatibility and relative independence. This harsh requirement prompted the establishment of the TCP/IP model and enabled TCP/IP to meet the needs of data communication all over the world.
What Are the Layers of TCP/IP
Layer 1 - Network Access Layer
The network access layer is the bottom layer of the TCP/IP model. The main functions of the network access layer are basically consistent with the physical layer and the data link layer in the OSI model. It is responsible for sending and receiving data packets through the networks and the transmission of information between computers.
Layer 2 - Internet Layer
The Internet layer is layer 2 of the TCP/IP model. It is responsible for the best path selection and packet switching during data transmission. It provides selecting transmission paths and traffic congestion control services for the transport layer.
The management protocol of the Internet layer is IP (Internet Protocol).
Layer 3 - Transport Layer
The transport layer is mainly designed to provide the reliability of data transmission and flow control functions.
The transport layer has two transmission protocols, TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). TCP applies for applications with high-reliability requirements, while UDP works for low-reliability requirements and economical transmission.
TCP can provide reliable data transmission, allowing services like data flow transmission, reliability, flow control, full-duplex operation, and multiplexing. Generally speaking, it establishes and connects the channel for the transmitted data in advance, then sends the data, and finally cancels the channel. However, UDP may cause data loss, disorder, and error, but it has the advantages of flexible and fast transmission.
The TCP-supported application protocols mainly include Telnet, FTP, SMTP. And UDP-supported application protocols include NFS, SNMP, DNS, TFTP.
Layer 4 - Application Layer
TCP/IP classifies all application-related contents into the application layer and ensures data grouping and packaging for the next layer. The application layer contains all high-layer protocols, such as TELNET, FTP, etc.
TCP/IP Model Structure
Differences Between OSI and TCP/IP Model
OSI and TCP models have in common is adopting the layered structure and using protocol stack concept in the same layer. However, the two models differ in the specific level division and functional design.
OSI vs TCP/IP: Layer Structure
Although both OSI and TCP/IP adopt Layered architecture, OSI has 7 layers whereas TCP/IP only has 4 layers. The TCP/IP model combines the top three layers of the OSI model into one layer, the application layer. Also, it combines the bottom two layers of OSI into one layer, the network access layer. Clearly, the TCP/IP model is more simplified than the OSI model.
OSI Layers vs TCP/IP Layers
OSI vs TCP/IP: Application Range
Since the OSI model is designed before the formulation of specific protocols, the model design is not very practical. Sometimes it can not fully guide the realization of some protocols. Therefore, the scope of OSI applications is limited. On the contrary, the TCP/IP model comes after various protocols are set up, it provides more flexibility in application compared to the OSI model. TCP/IP model has become the de facto international standard and industrial standard of Internet Interconnection.
OSI vs TCP/IP: Connection-oriented or Connectionless
The OSI model focuses on communication reliability, such as the guarantee of service quality and error rate. Thus in the transport layer, the OSI model only considers connection-oriented service while TCP/IP model enables both connection-oriented service (TCP) and connectionless service (UDP), and meets more practical needs.
Future Trend: OSI or TCP/IP
The TCP/IP model is roughly similar to the OSI, but they have their own characteristics. Neither the OSI nor the TCP/IP is perfect. OSI is more idealistic, complicated, and impractical when compared to the TCP/IP model, but it has the advantages of integrality and rigorism. The OSI model is more like a textbook, which has great significance in teaching and research.
The TCP/IP model has successfully promoted the development of the Internet, conversely, the development of the Internet has also expanded the influence of TCP/IP. However, TCP/IP is not perfect either. The problems such as insufficient address space, QoS service quality, security, etc. have always troubled TCP/IP. At present, the introduction of IPv6 can solve some problems, but it still needs to be improved. I believe that in the near future, we will see a more perfect and industrial standards TCP/IP model.
Which layer of the OSI model do switches and routers work on?
Switches work on the second layer of the OSI model, the data link layer. Routers work on the third layer of the OSI model, the network layer.
Which layer of the TCP/IP model do IP protocol and TCP protocol work on?
IP protocol works on the second layer of TCP/IP, the Internet layer. TCP protocol works on the third layer of TCP/IP, the transport layer.
Note: Part of the content reference: https://en.wikipedia.org/wiki/Internet_protocol_suite