Re: Checking Routes/Gateways For Good Connection

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: dontek
Date: Thursday, August 26, 2010 - 4:01 pm

On August 25, 2010 8:20 PM, Stuart Henderson wrote:
interface/nexthop. if that's correct, to have relayd check connectivity
beyond the gateways, you'll need static routes (e.g. host 8.8.8.8 via
connection A, 208.67.222.222 via connection B) and use those hosts as an
indicator.

traceroute.

route-to pf rule to make sure packets with a specific source address are
directed out of the relevant interface...though if you only have one address
to play with for each connection you might be unable to distinguish "check"
packets from normal packets.

I tried out Stuart's suggestion with a couple of vether interfaces and it
seems to have accomplished what I was looking for.  Details:

$ cat /etc/hostname.vether0
inet 172.16.0.1 255.255.255.0 NONE

$ cat /etc/hostname.vether1
inet 172.16.1.1 255.255.255.0 NONE

$ cat /etc/pf.conf  (additions only)

match out on $ext_if_1 from (vether0:network) nat-to ($ext_if_1)
match out on $ext_if_2 from (vether1:network) nat-to ($ext_if_2)

pass out on $ext_if_1 from (vether0) route-to ($ext_if_1 $ext_gate_1)
pass out on $ext_if_2 from (vether1) route-to ($ext_if_2 $ext_gate_2)

Tests:

$ traceroute -s 172.16.0.1 -n google.com
$ traceroute -s 172.16.1.1 -n google.com

Once the above was done I could apply my traceroute scheme of testing to a
script and/or integrate into ifstated.

Thanks Stuart.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Checking Routes/Gateways For Good Connection, Don Tek, (Wed Aug 25, 3:18 pm)
Re: Checking Routes/Gateways For Good Connection, Jacob Yocom-Piatt, (Wed Aug 25, 3:27 pm)
Re: Checking Routes/Gateways For Good Connection, David Gwynne, (Wed Aug 25, 5:32 pm)
Re: Checking Routes/Gateways For Good Connection, Stuart Henderson, (Wed Aug 25, 6:19 pm)
Re: Checking Routes/Gateways For Good Connection, Pete Vickers, (Thu Aug 26, 2:13 am)
Re: Checking Routes/Gateways For Good Connection, dontek, (Thu Aug 26, 4:01 pm)