per-interface default routes?

Mark Messier mark at messier.com
Wed Mar 14 18:40:26 UTC 2007


Suppose you have a freebsd box with two LAN interfaces,
one numbered on netA and one on netB...

Some applications are listening on the netA IP address, some on the
netB IP address.  Some applications may be listening on all interfaces
but might have a directive that indicates which IP address to use for
packets sourced from the application, like this:

	query-source address 192.0.2.2 port 53;

What I want to happen is that packets sourced from the
netA IP address go out the netA physical interface
and packets sourced from the
netB IP address go out the netB physical interface.

That is, I want per-interface default routes
(is this the correct term?).

How do I do this?

Thanks,
-mark



More information about the freebsd-questions mailing list