one ,ICMP Concept of agreement

1,ICMP The agreement is TCP/IP A protocol in the network layer of a protocol stack ,ICMP yes (Internet Control Message Protocol)
Internet control message protocol , Used in IP host , Transfer control messages between routers . Control message means that the network is not connected , Whether the host can reach , Whether the route is available or not .

2, ICMP Message is in IP Datagram internally transmitted ,
It is encapsulated in IP In datagram .ICMP Messages are usually IP Layer or higher protocol (TCP or UDP) use . some ICMP Message returns the error message to the user process .

two , common ICMP Message type and code

1, Source point suppression . When a router or host drops a packet due to congestion , The source point suppression message will be sent to the source point , The source knows that the sending rate of packets should be reduced .

2, Time out . When the router receives a datagram with a lifetime of zero , In addition to discarding the datagram , Also send timeout message to the source point . When the destination fails to receive all the datagrams of a datagram within a predetermined time ,
Just discard all the received data packets , And send timeout message to the source point .

3, Parameter problem . When the value of some fields in the header of the datagram received by the router or destination host is incorrect , Drop the datagram , And send parameter problem message to the source point .

4, Change route ( redirect ). The router sends the routing change message to the host , Let the host know that the datagram should be sent to another router next time ( Better routing ).

three ,ICMP The error report message contains the network layer header of the data packet with error ( The source address of the packet containing the error ) And data fields 8 Bytes ( Contains the transport layer protocol and port number ),
So the router can determine where the wrong packet came from , So I knew that ICMP Who is the error report sent to .

four , use ICMP Troubleshoot network problems

1, If the computer sends a ICMP The request packet has not been received within a period of time ICMP Response packet or ICMP Error report packet of request packet , The request timeout is displayed .

2, use ping Command to determine which link has failed :

     ①ping Command plus arguments -i You can specify the TTL, So we can know the first router of the path , Second router IP address .

     ② use ping Command plus arguments -t successively ping In each link IP Address to determine the link in question .

3,Windows In the operating system tracert command
Is the route tracing utility , Specifically used to determine IP Path through which datagram access destination address , It can help us find out which link in the destination and destination network has failed .tracert The command is ping Command extensions ,
It is also through IP Message lifetime (TTL) Fields and ICMP Error report message to determine the router along the way .

Technology
©2019-2020 Toolsou All rights reserved,
【C++ Must see for entry 】C++ from 0 reach 1 Introductory programming axios Interceptor packaging and use Spring Boot Interview must ask : Automatic configuration principle VMware 16 install centos 7 Detailed tutorial C Language data structure - Sequence table delete duplicates V2.0.0 The 12th Blue Bridge Cup c++b Group personal problem solving On sending data from serial port single chip microcomputer to upper computer centos7 install RabbitMqjava Polymorphic array of opencv-python Fourier transform and inverse transform