TCP is designed to adapt to the layered protocol system supporting multi-network applications. Paired processes in hosts connected to different but interconnected computer communication networks rely on TCP to provide reliable communication services.
TCP assumes that it can obtain simple and possibly unreliable datagram services from lower-level protocols. In principle, TCP should be able to run on all types of communication systems from hard-wired connections to packet-switched or circuit-switched networks.
ICMP: Internet Control Message Protocol (English: Internet? Control? Leave a message Protocol (abbreviated as ICMP) is one of the core protocols of the Internet protocol family.
It is used in Internet Protocol (IP) to send control messages and provide feedback on various problems that may occur in the communication environment. Through this information, managers can diagnose the problems that have occurred and then take appropriate measures to solve them.
ICMP protocol is used for many network management commands. Taking ping and tracert commands as examples, this paper introduces the application of ICMP protocol in detail.
(1) The ping command uses ICMP to echo request and reply messages.
The packet network probe command ping used in the network reachability test can generate ICMP echo request and reply message. After the destination host receives the ICMP echo request message, it will immediately send back a reply message. If the source host can receive the ICMP echo reply message, it means that the network reaching the host is normal.
(2) ICMP messages that tracert, a routing analysis and diagnosis program, has used for more than time.
Tracert command is mainly used to display the path of a packet to the destination host. By executing the tracert command on another host, it will return the path details of the packet to the destination host and display the time consumed by each path.
Extended data:
ICMP is one of the Internet protocols defined in RFC 792. Usually used to return error messages or analyze routes. ICMP error messages always contain source data and are returned to the sender. An example of an ICMP error message is that the TTL value has expired. When forwarding datagrams, each router subtracts 1 from the TTL value of the IP header.
If the TTL value is 0, the message "TTL expired in transmission" will be reported to the source address. Every ICMP message is directly encapsulated in an IP packet, so, like UDP, ICMP is unreliable.
Although ICMP is included in IP packets, ICMP messages are usually handled specially, and are Bao Butong with general IP, not as a sub-protocol of IP. In many cases, it is necessary to check the contents of the ICMP message, and then send an appropriate error message to the program that originally generated the IP packet, that is, the IP packet that caused the ICMP message to be sent.
Many commonly used tools are based on ICMP messages. Traceroute is realized by sending packets containing special TTL, and then receiving ICMP timeout messages and destination unreachable messages.
Ping is realized by ICMP's "Respond to Request" (category code: 8) and "Respond to Reply" (category code: 0) messages.
Baidu encyclopedia -TCP
Baidu encyclopedia -ICMP