ping question
Hello everyone
I have a machine that is connected to two different ISP's. One of them is currently my default GW, the other one is unused.
I need to constantly ping a known internet host (e.g. google) through each of these ISPs. I was pretty confident that a script that loops through 'ping -I interface_1 8.8.8.8' and 'ping -I interface_2 8.8.8.8' will do the job.
But it turned out that my ping always transmits packets from the egress interface (that has the default route configure). This is useless for me - I cannot change the default gateway everytime the loop continues. My internet connection would suffer greatly from this.
How can I ping an internet host from two different interfaces?
Thank you in advance,
Simeon
PS. I am using OpenBSD 4.9, if this makes any difference.
|