The first problem of slow ping packets (icmp correspondence and relationship)

Before the company had wget slow, find wget to call the default system getaddrinfo, ipv4 and ipv6 will also send the dns request, only two have received or ipv6 overtime, will be downloaded.
The company uses dns ipv6 does not respond to the request, resulting in a before and after each wget should dns stage Caton 5 seconds, the solution is to modify the dns code encounters request ipv6 direct return empty data, an effective solution use getaddrinfo wget, and a function of the problems of slow procedure.

So first encounter ping packets slow, subconsciously think it should be ipv6 problems, but to solve the problem of the time to help my colleagues found the first package Caton is irregular, instead of the default 5 seconds.
Ethereal looked, dns return quickly, ping packet request and reply very quickly, obviously has received a reply, ping the first package is still in Caton state.

The first problem of slow ping packets (icmp correspondence and relationship)
Ethereal found icmp instant return.

The first problem of slow ping packets (icmp correspondence and relationship)
But time is displayed giant slow, you need to wait for 3s.

So to capture dns also be
The first problem of slow ping packets (icmp correspondence and relationship)
found at dns resolution, the ping response, the addition of step with the ip dns reverse lookup domain name, wasted a lot of time.
man found a configuration of a ping
-n Numeric output only. No attempt will be made to lookup symbolic names for host addresses.
Use this parameter to solve the problem first packet delays.
Also, if direct ping ip address, I will not go reverse lookup dns.


When the company tested the network discovery ping packets often not received a response, but a response packet capture are, so to get the local packet capture analysis.
The first problem of slow ping packets (icmp correspondence and relationship)

icmp ping packet is not a port, so the inside of the field is determined by who the message is sent, each have their own monitoring process to respond to the results of the selection process.
The first problem of slow ping packets (icmp correspondence and relationship)
As request packet
The first problem of slow ping packets (icmp correspondence and relationship)
as a response packet

In a second set of discovery, however, the request packet and response packet is inconsistent, the same identification field is not used, but the use of the last identification field estimation did firewall protection processing, the result of the last ping packet to the cache, in response to a new ping request. The results led to the failure. When that nowhere on when the ping.
So understand that if the agreement is not clear, it should not people do caching.

Guess you like

Origin blog.51cto.com/xzq2000/2402249