On 2014-10-02, Jeff <j...@usedmoviefinder.com> wrote: > Thanks to everyone for your help/suggestions. I think that I'm headed in the > right direction. > > I still can't seem to force a ping through a particular interface, even when I > have both interfaces as default routes (I've tried both with and without > mpath). > If it matters, in both cases I used a lower priority (higher #) for our low > speed > metered connection. > > Here's my current routing information: > > default 10.150.228.105 UGS 5 168287 - 8 fxp0 > default 192.168.243.1 UGS 0 0 - 16 fxp1 > > and "ping -I 192.168.243.152 8.8.4.4" still sends traffic out through fxp0.
ping -I only selects the source address, not the outgoing route. (With pf route-to rules suggested by others in the thread, that choice of source address can *then* result in a different route being taken, but it's not automatic). To use your lower-priority default route, you need some way to take the first route out of action. One possibility is to use something like "ifconfig fxp0 down". Another is to have some kind of periodic check that removes the "prio 8" default route. There have been a few suggestions to use ifstated for this - that can work - alternatives include a simple script run from cron, or relayd has some code to handle this - check the "routers" section in relayd.conf(5).