Service Access Point (SAP) is the interface for communication between the upper and lower layers in the network architecture, that is, the SAP of layer N is the channel through which layer N+1 can access layer N.
Specifically, SAP is the logical interface between adjacent layer entities (software or hardware), as shown in Figure 4-17. If the Internet four layer network architecture is analyzed, the SAP provided by the network access layer to the upper layer (network layer) should be the method of various media access control (see Section 5.2 for detailed explanation);The SAP provided by the network layer to the upper layer (transport layer) is the TCP and IP data transmission service interfaces;The SAP provided by the transport layer to the upper layer (application layer) is TCP and UDP, which allow different data transmission modesWebsite constructionThe port reuses several processes.
2. Communication process
Internet network communication technology seems abstruse and complex, but it is not as hard to understand as imagined.The TCP/IP protocol is layered according to the "service access point" of each layer, and it is easy to describe the data communication process of each layer of the Internet.First, user data flows from ports of different application processes to DCP or UDP respectively;At the transport layer, TCP or UDP starts to encapsulate the data unit of the transport layer after receiving the message data from different processes at the upper layer. The main information encapsulated is the source port number and destination port number of the upper layer process, and then flows to the network layer through the designated service access point;In the network layer, whether TCP datagram or UDP datagram, the data unit in the upper layer is re encapsulated as the transmission data of the layer by the IP protocol. The main information encapsulated is the IP address of the source and destination;Then it flows to the network access layer through the lower level service access point.
When the network failure causes the network impassability or the destination host is unreachable or the route is unavailable, the ICMP protocol will assist in transmitting the corresponding control message to notify the network management, each forwarding router and the originating host user.ARP protocol is used to obtain the MAC address of the next link point or destination node when transmitting data at the data link layer.
It can be seen from the above analysis that:
(1) The responsibilities between the network layer and the transport layer are very clear and explicit.The IP protocol header of the network layer indicates the logical addresses (IP) of the hosts at both ends during data transmission;The TCP or UDP protocol header of the transport layer indicates the end addresses (source port and destination port) of the processes at both ends during data transmission.The network layer is only responsible for host to host data transmission between networks, while the transport layer is only responsible for end-to-end data transmission between processes.
(2) A complete data transmission process must have at least three basic parameters.The first is the port number required for end-to-end data transmission between processes, the second is the control mode of data transmission at the transport layer, namely TCP or UDP, and the third is the IP address required for host to host data transmission between networks.The three basic parameters are bound together to form a socket, which is managed in the form of a virtual file.It can be understood that the data transmission between any two application layers is realized through a specific socket interface.