# Multihomed FreeBSD server



## BondedBSD (Dec 4, 2014)

We need to configure the following:

Server with multiple applications talking to outside clients (TCP and UDP), accessible from two independent ISPs wired to two ether interfaces, each with its own IP address within unrelated subnets.

Clients can access applications through either interface. We have ability to bind application to a specific interface, so for example one copy of the application will deal only with one interface, and the other copy only with the other one.

The question is, how do we make the outgoing packet go out from the right interface, and how do we specify two separate gateways (to the whole world) for two interfaces, when there can be only one default gateway?


----------



## ondra_knezour (Dec 4, 2014)

See setfib(1)


----------



## BondedBSD (Dec 4, 2014)

Thanks!

What we really need is SO_SETFIB for setsockopt(), so that the same application can use multiple tables.


----------

