I don't think this is feasible in some cases.
1. It assumes that a ICMP unreachable is sent back. This is not always the case since there may be routers on the way that block ICMP.
2. On dynamic hosts, if the IP is reallocated, you may target a valid active IP, and no ICMP unreachable will be returned.
My $0.02 Marius, YO2LOJ
On 24.05.2017 01:32, Brian Kantor wrote:
(Please trim inclusions from previous messages) _______________________________________________ I got to thinking about Ronen's question as to how to find non-functional gateway, and I've come up with a scheme.
...
If an ICMP unreachable packet is received, the matching gateway is removed from that cycle, so with luck (if the unreachables get here quickly enough) we'll only send one or two packets to a gateway that's not reachable.