One-timePaymentto Join,Long-termFree Tutorials,NoPaid Tutorials.
JoinWeChat GroupReply to Public Account:WeChat Group;QQ Group:460500587
Tutorial List See the bottom menu of the public account | Recommended Books at the Bottom of This Article

Public Account: Computer and Network Security
ID: Computer-network
1. Overview of TCP/IPWhen discussing the history of TCP/IP, one cannot avoid mentioning the history of the Internet. In the early 1960s, the U.S. Department of Defense commissioned the Advanced Research Projects Agency (ARPA) to develop wide-area network interconnection topics and established the ARPANET experimental network, which is the origin of the Internet. The initial operation of ARPANET indicated that a standardized communication protocol was needed for computer wide-area networks, leading to the birth of TCP/IP in 1973. Although ARPANET did not develop into a publicly accessible Internet, its operational experience showed that TCP/IP is a very reliable and practical network protocol. When the prototype of the modern Internet, the National Science Foundation Network (NSFNET), emerged in the late 1980s, it drew on ARPANET’s TCP/IP technology. With the help of TCP/IP technology, NSFNET connected more and more networks together, ultimately forming today’s Internet. Thus, TCP/IP became the widely used standard network communication protocol on the Internet.The TCP/IP standard consists of a series of defined documents that describe the internal implementation mechanisms of the Internet and the definitions of various network services. The TCP/IP standard is not developed by any specific organization; in fact, it is developed collaboratively by several groups. Anyone can publish their opinions as documents, but only recognized documents can ultimately become Internet standards.As a complete set of network communication protocols, TCP/IP is actually a protocol suite. In addition to its core protocols—TCP and IP—the TCP/IP suite also includes a series of other protocols, forming the TCP/IP stack across four layers, as shown in Figure 1.

Figure 1 TCP/IP Stack2. Functions of Each Layer in the TCP/IP Reference ModelUnlike the OSI reference model, the TCP/IP reference model was proposed after the emergence of TCP and IP. The correspondence between the layers of the two models is shown in Figure 2.

Figure 2 Correspondence Between OSI Reference Model and TCP/IP Reference ModelThe host-network layer of the TCP/IP reference model corresponds to the data link layer and physical layer of the OSI reference model; the interconnection layer corresponds to the network layer of the OSI reference model; the transport layer corresponds to the transport layer of the OSI reference model; and the application layer corresponds to the application layer of the OSI reference model.Based on the OSI model’s experience, the session layer and presentation layer are not useful for most applications, so they are excluded from the TCP/IP reference model. The functions of each layer of the TCP/IP reference model are as follows.(1) Host-Network LayerThe host-network layer (Host to Network Layer) is the lowest layer in the TCP/IP reference model. In fact, the TCP/IP reference model does not really define this part, but merely indicates that this layer must have the functions of the physical layer and data link layer to send data received from the network layer to the destination host. The standards used at this layer are not a concern of the TCP/IP reference model.The host-network layer includes various network layer protocols, such as Ethernet, Token Ring, and X.25.(2) Interconnection LayerThe interconnection layer (Internet Layer) is the second layer in the TCP/IP reference model and is the key part of the entire TCP/IP reference model. The interconnection layer provides connectionless service and is mainly responsible for sending packets from the source host to the destination host. The source and destination hosts can be on the same physical network or different physical networks.The interconnection layer defines the formal packet format and protocols, namely the Internet Protocol (IP). In addition to IP, it also includes control protocols for the interconnection layer, such as the Internet Control Message Protocol (ICMP), Address Resolution Protocol (ARP), and Reverse Address Resolution Protocol (RARP).The main functions of the interconnection layer include the following:1) Handling packet sending requests from the transport layer. Upon receiving a packet sending request, the packet is encapsulated into an IP datagram, the header is filled, the sending path is selected, and then the datagram is sent to the corresponding network.2) Handling received datagrams. Upon receiving a datagram sent by another host, the destination address is checked. If forwarding is needed, the sending path is selected and forwarded; if the destination address is the node’s IP address, the header is removed, and the packet is delivered to the transport layer for processing.3) Performing flow control and congestion control.(3) Transport LayerThe transport layer (Transport Layer) is the third layer in the TCP/IP reference model. The main function of the transport layer is to enable peer entities on the sending and receiving hosts to have a session. From this perspective, the transport layer of the TCP/IP reference model is similar to the transport layer of the OSI reference model.Two end-to-end protocols are defined at the transport layer:1) Transmission Control Protocol. The Transmission Control Protocol (TCP) is a connection-oriented protocol that allows a byte stream sent from the source host to be transmitted without error to other hosts on the network. At the sender, TCP divides the byte stream from the application layer into multiple segments and passes them to the interconnection layer. At the receiver, TCP encapsulates the received segments back into a byte stream and sends it to the application layer. TCP also handles flow control to avoid overwhelming the slower receiving host with too many messages from the faster sending host.2) User Datagram Protocol. The User Datagram Protocol (UDP) is an unreliable, connectionless protocol. UDP is mainly used in transmission environments where the order of packet arrival is not critical, and is widely used in one-time Client/Server request-response queries, as well as applications where speed is more important than accuracy (such as voice or video transmission).(4) Application LayerThe application layer (Application Layer) is the highest layer of the TCP/IP reference model.The application layer is responsible for providing users with a set of commonly used applications, such as email, remote login, file transfer, etc.The application layer includes all high-level protocols in the TCP/IP suite, such as File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), Hypertext Transfer Protocol (HTTP), Simple Network Management Protocol (SNMP), and Domain Name System Protocol (DNS).Application layer protocols can generally be divided into three categories:One category depends on the connection-oriented TCP, such as FTP and SMTP;One category depends on the connectionless UDP, such as SNMP;And another category depends on both TCP and UDP, such as DNS.
Public Account: Computer and Network Security
ID: Computer-network
【Recommended Books】