I. Architecture and features of TCP/IP
1. TCP/IP architecture
TCP/IP is actually a complete set of network protocols on the physical network. TCP provides the transport layer service, while IP provides the network layer service. TCP/IP includes the following protocols: (Structure: 1.1)
(Fig. 1.1)
IP: The internetprotocol is used to route data between hosts and store data on the network. The Group Sending service is also provided for ICMP, TCP, and UDP. User processes generally do not need to be involved in this layer.
ARP: Address Resolution Protocol)
This Protocol maps network addresses to hardware addresses.
RARP: Reverse Address Resolution Protocol)
This Protocol maps hardware addresses to network addresses
ICMP: inter-network Message Control Protocol (Internet Control Message Protocol)
This protocol handles communication and host errors and transfer control.
TCP: Transmission Control Protocol)
This is a reliable full-duplex byte stream connection-oriented protocol for user processes. It provides virtual circuit services for user processes and establishes a check for reliable data transmission. (Note: Most network user programs use TCP)
UDP)
This is a connection-free protocol provided to the user process for data transmission without performing the correctness check.
FTP: File Transfer Protocol)
Allows users to communicate with another host through file operations (such as file addition, deletion, modification, query, and transfer.
SMTP: Simple Mail Transfer Protocol)
The SMTP protocol is used to send emails between systems.
TELNET: Terminal protocol (Telnet Terminal Procotol)
Allow users to access remote hosts through virtual terminals
HTTP: Hypertext Transfer Protocol (Hypertext Transfer Procotol)
TFTP: simple File Transfer Protocol (Trivial File Transfer Protocol)
2. TCP/IP features
The core part of TCP/IP is the transport layer protocol (TCP, UDP), network layer protocol (IP), and physical interface layer, which are usually implemented in the operating system kernel. Therefore, users generally do not. During programming, the programming interface has two forms: one is the system call directly provided by the Internal core; the other is the function provided by the library function. The former is nuclear implementation, and the latter is non-nuclear implementation. User services can only be implemented through applications outside the core, so it must be implemented through sockets.
Figure 1.2 shows the relationship between TCP/IP protocol core and applications.
(Fig. 1.2)
Ii. Special terms
1. Socket
It is the basic component of the network. It is a communication endpoint that can be named and addressable. Each socket in use has its type and a process connected to it. The socket exists in the communication area (also known as address cluster. The socket only exchanges data with the socket in the same region (a specific and conversion process must be executed across regions ). In WINDOWS, sockets only support one domain-Internet domain. The socket has a type.
Windows socket 1.1 supports two types of sockets: stream SOCKET (SOCK_STREAM) and datagram SOCKET (SOCK_DGRAM)
2. windows sockets implementation
A windows sockets implementation is a set of software that implements all the functions described in the windows sockets specification. Generally, it is implemented through DLL files.
3. Blocking processing routine
Blocking hook is a mechanism provided by windows sockets to support blocking socket function calls.
4. Multi-address broadcast (multicast)
It is a one-to-multiple transmission mode. The transmission initiator transfers the information to a group of recipients after one transmission, and
(Unicast) corresponds to Broadcast (Broadcast.