Thread: ping question
View Single Post
  #1   (View Single Post)  
Old 10th November 2011
zealer zealer is offline
Port Guard
Join Date: Sep 2011
Posts: 10
Default 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' and 'ping -I interface_2' 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,

PS. I am using OpenBSD 4.9, if this makes any difference.
Reply With Quote