Bug #7328
closedAllow several connections with the same gateway (no load balancing, but Multi-WAN)
0%
Description
I am not sure how load balancing works and it is not my goal to implement. May main goal is to use both of my cable modems, one dedicated to outbound internet connections (I), the other one for inbound VPN connections (V).
The problem I am having is, that setting the default gateway is not respecting the interface:
route_add_or_change("-inet default {$gatewayip}");
should be
route_add_or_change("-inet default {$gatewayip} -iface {$interfacegw}");
Otherwise the default gateway could be registered for the wrong connection V. This gives you a "working" setup, but the traffic is not separated, because all traffic run over connection V. But the bigger problem occurs, when the connection V is falsly set as default gateway and then restarts for whatever reason. This will remove the default gateway from the routing table and will not add a new one, because the default gateway is configured for the other connection I which did not restart.
I guess there are some other places, too, (for example when deleting routes) where the interface should be given to the route command.
With these changes and the new dpinger implementation, which respects the interfaces when creating special routes for external monitor ips, it should be possible to also have a fail-over multi-wan setup.
Updated by Jim Pingle about 7 years ago
- Status changed from New to Rejected
You cannot have two interfaces on the same subnet. It is not a valid configuration.
Updated by Robin Lutz about 7 years ago
Why not? What is "valid"? Valid in a technical sense, or valid in a pf-sense, or valid in a "community support" sense?
Updated by Jim Pingle about 7 years ago
It is not valid at the operating system level because FreeBSD doesn't support having two interfaces in the same subnet. Only one will get a link route. Not a limit we impose. This has been well documented and discussed hundreds of times.
Updated by Robin Lutz about 7 years ago
Actually most of the discussions about it I read end with "discussed hundreds of times" and no real reason. Coming from the linux world I didn't know that. Thanks for clarification.