"Gateway" works on the third layer of the OSI reference model, the "network layer". The purpose of the network layer is to realize transparent transmission of data between two end systems. Specific functions include addressing and routing, connection establishment, maintenance and termination, etc. It provides services that eliminate the need for the transport layer to understand the data transmission and switching technologies in the network.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
"Gateway" works in the "network layer" of the OSI reference model.
Related recommendations: "Programming Video"
The network layer is the third layer in the OSI reference model, between the transport layer and the data link layer It further manages the data communication in the network based on the transmission function of data frames between two adjacent endpoints provided by the data link layer, and manages to transmit the data from the source end to the destination end through several intermediate nodes, thereby Provide the most basic end-to-end data transmission service to the transport layer. The main contents include: virtual circuit packet switching and datagram packet switching, routing algorithm, congestion control method, X.25 protocol, Integrated Services Data Network (ISDN), Asynchronous Transfer Mode (ATM) and Internet interconnection principles and implementation.
The purpose of the network layer is to realize transparent transmission of data between two end systems. Specific functions include addressing and routing, connection establishment, maintenance and termination, etc. It provides services that eliminate the need for the transport layer to understand the data transmission and switching technologies in the network.
The network layer mainly provides services for the transport layer. In order to provide services to the transport layer, the network layer must use the services provided by the data link layer. The main role of the data link layer is to solve the communication problem between two directly adjacent nodes, but it is not responsible for solving the communication problem when the data passes through multiple transfer nodes in the communication subnet. Therefore, in order to realize the communication between the two terminals, The transparent transmission of data between systems allows the source data to transparently reach the destination through multiple transfer nodes in the communication subnet via the optimal path, so that the transport layer does not need to care about the network topology and the communication medium used. and switching technology, the network layer must have the following functions:
Packet and packet switching: encapsulate the data messages received from the transport layer into packets (Packet, also known as "packet" ) and then transmitted down to the data link layer.
Routing: Selecting the most appropriate path for a packet through the communication subnet through a routing algorithm.
Network connection multiplexing: Create logical links for the transmission of packets between nodes in the communication subnet, and multiplex multiple network connections on one data link (multiple time division is used) reuse technology).
Error detection and recovery: Generally, the header checksum in the packet is used for error checking, and the acknowledgment and retransmission mechanism is used for error recovery.
Service selection: The network layer can provide datagram and virtual circuit services for the transport layer, but the network layer of the Internet only provides datagram services for the transport layer.
Network management: Manage the data communication process in the network, try to transmit the data from the source to the destination through several intermediate nodes, and provide the most basic end-to-end data for the transport layer Delivery Service.
Traffic control: Traffic control is achieved through traffic shaping technology to prevent performance degradation of the communication subnet caused by excessive traffic.
Congestion control: When the data traffic of the network exceeds the rated capacity, network congestion will occur, causing the network's throughput capacity to drop sharply. Appropriate control measures are therefore required for diversion.
Network interconnection: Connect one network to another network to achieve cross-network communication between users.
Fragmentation and reassembly: If the packet to be sent exceeds the allowed length of the protocol data unit, the network layer of the source node will fragment the packet and the fragments will reach the destination. After the host, the network layer of the destination node reassembles the original packet.
To read more related articles, please visit PHP Chinese website! !
The above is the detailed content of Which layer does the gateway work on?. For more information, please follow other related articles on the PHP Chinese website!