Understanding TCP-IP reference models
Introduction to TCP/IP reference models
TCP/IP is a group of communication protocols used for network interconnection. The Internet architecture is centered on TCP/IP. Based on the TCP/IP reference model, the protocols are divided into four layers: network interface layer, Internet layer, transport layer and application layer.
Application Layer
The application layer corresponds to the top layer of the OSI reference model and provides users with various services, such as FTP, telnet, DNS, and SMTP.
Transport Layer
The transport layer corresponds to the transport layer of the OSI reference model and provides end-to-end communication for application layer entities. This layer defines two main Protocols: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP ).
TCP provides a reliable connection-oriented data transmission service, while UDP provides unreliable and connectionless data transmission services.
Internet Layer
It mainly solves the communication problem between the host and the host. This layer has four main Protocols: Internet Protocol (IP), Address Resolution Protocol (ARP), Reverse Address Resolution Protocol (RARP) and Internet Control Protocol (ICMP ).
The IP protocol is the most important protocol in the Internet layer. It provides an unreliable, connectionless datagram transmission service.
Network Interface Layer
The physical layer and data link layer in the OSI reference model of the network interface layer correspond to each other. It is mainly responsible for managing the actual network media and defining how to use the actual network to transmit data. In fact, TCP/IP itself defines the protocol for this layer, and each network involved in the interconnection uses its own physical layer and data link layer protocol, connect to the TCP/IP network interface layer.
Similarities and differences between the OSI reference model and the TCP/IP Reference Model
Both the OSI reference model and the TCP/IP reference model adopt a hierarchical structure, but the former is a layer-7 model and the latter is a layer-4 structure. Their main differences are as follows:
1. Services, interfaces, and Protocols
The concept of the OSI reference model is clear, and the three concepts and their relationships are clearly defined. The TCP/IP reference model does not clearly distinguish between services, interfaces, and protocols.
2. Relationship between models and protocols
OSI is a first-in-one model with a later Protocol (strong versatility, but difficult to implement)
TCP/IP is a first-in-one protocol with a later model (highly practical, but not versatile)
3. connection-oriented and connectionless services
The network layer of the OSI reference model provides connection-oriented services and connectionless services. However, the transport layer only provides connection-oriented services.
The TCP/IP reference model only provides connectionless services, while the transport layer provides connection-oriented services (TCP) and connectionless services (UDP ).
Encapsulation and encapsulation of Network Data
When data is transmitted from one user to another, there is a process of data encapsulation and encapsulation. Is the encapsulation process of the OSI reference model (the process of decoding encapsulation is the opposite ).
Why is encapsulation required? For example, it is equivalent to sending a mail. You can't simply send a letter paper. You also need to put an envelope on the outside and write the address, name, and zip code of the recipient and the sender, you can successfully send the email. The letter is equivalent to the hello content, and the envelope is equivalent to the Baotou.