kiminoa
kiminoa

Reputation: 2699

How long is the interval for a ping that results in "Destination Host Unreachable"?

Is there a set duration ping waits for returning "Destination Host Unreachable"? If I know the time when I issued a ping, I want to be calculate how long it took to get back my first ack.

From host-redacted.com (ip.redacted) icmp_seq=1006 Destination Host Unreachable
From host-redacted.com (ip.redacted) icmp_seq=1007 Destination Host Unreachable
64 bytes from host-redacted.com (ip.redacted): icmp_seq=1008 ttl=64 time=977 ms
64 bytes from host-redacted.com (ip.redacted): icmp_seq=1009 ttl=64 time=0.121 ms

Upvotes: 1

Views: 1162

Answers (3)

Spike0xff
Spike0xff

Reputation: 1245

"Destination host unreachable" indicates a routing problem, not a timeout problem: Some node between the sender and the destination does not know how to route packets to that destination. Waiting longer won't help with that, you have to diagnose or correct the routing problem.

Upvotes: 1

Code Different
Code Different

Reputation: 93161

From the man page:

-W timeout Time to wait for a response, in seconds. The option affects only timeout in absense of any responses, otherwise ping waits for two RTTs.

RTT = Round Trip Time. Seems like it does not have a set value but depend on your network config.

Upvotes: 1

CollinD
CollinD

Reputation: 7573

This is dependant on your OS, but I believe a great many systems use 1000ms as the default timeout for ping.

On windows, the ping command accepts a parameter ping -w X where X is the timeout in milliseconds.

On many linux distributions, you can use ping -t X to modify the timeout.

Upvotes: 1

Related Questions