The Noob wrote:
> I have a small question.
> I have two interface in two vlans.
> The first interface
> The second interface:
> The gateway for the first interface must be and the second
> interface must be
> How can I configure them? In rc.conf we have just defaultrouter but we can't
> specify the interface.

I'm guessing you want the gateway to be chosen based on the source
address, correct? The kernel does not support routing based on the
source address.

I use ipfw and fwd rules to achieve this:

ipfw add fwd ip from to not

Then you can leave the default_gateway as

You might need IPFIREWALL_FORWARD in your kernel config. See ipfw(8).

Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley

Attachment: pgpiKYKLmOr9K.pgp
Description: PGP signature

Reply via email to