I got to thinking about Ronen's question as to how to find non-functional gateway, and I've come up with a scheme.
I've added code to the rip sender that watches for ICMP unreachable packets coming back to amprgw during the rip sending cycle, which repeats every 5 minutes.
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.
The time and gateway address are logged; some future process should be able to analyze this log and do something about the gateway if it's out of service long enough. (What it will do about it isn't exactly clear right now.)
This doesn't seem to have slowed down the rip sender much if at all. - Brian
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.
Marius, you're quite correct, it won't find some of the gateways that really should be deleted, but it will find some of them that should, and it's my feeling that some is better than none.
Right now it's finding 45 out of 432 unreachable, and if those are confirmed as down by being unreachable for some time (perhaps a few months?), I think that's a little too high a percentage. Better to have the statistics to work from rather than just guessing. - Brian
On Wed, May 24, 2017 at 01:41:49AM +0300, Marius Petrescu wrote:
I don't think this is feasible in some cases.
- 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.
- 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