What is the best way to split the computers of a LAN (about 50 computers) to go on two WANs, depending on the computers' IP address or computers' configuration (gateway). I'm not looking for load-balancing, I need to be able to route which computer uses which Internet connection.
A solution would be to rewire the old office to split the two distinct groups that need to use two different Internet connections but I'm not sure it's worth it at the moment.
I have a pfSense router configured with the LAN (DHCP), WAN1 and WAN2. I also have the IP addresses (and ability to configure) the next router on WAN1 and the one on WAN2.
What would you suggest? Routing based on IP addresses ranges? Different gateways? VLANs would be difficult for the same reason as to why rewire is a bit complicated.
Thanks!
// Edit:
The rationale is: imagine a big old office floor with two or three companies renting it. The wiring was done when as for one company, mixing in multiple switches in multiple locations across the big floor. One company is paying for a simple Internet connection, the other one for a dedicated link to its server.
We've done this before in PFSense.
If your IP addresses are grouped together it's easier, otherwise you have to create a rule for each and every IP address.
In the WAN Firewall rules, create a rule matching:
You might want to create two failover groups (WAN1->WAN2, and WAN2->WAN1) so that if one WAN goes down it will failover to the other WAN, but won't use it otherwise (if this is appropriate)
One way to split computer traffic from a LAN accessing the internet is by using a load balancer. Load balancers can do both balance and force traffic on a specific interface (thus not balacing). you can force for instance 192.168.0.1/25 on wan 1 (and not going to wan 2) and the rest on wan 2.
you can take a look at most brand like peplink, astrocorp.
I am familiar with the fiberlogic optiqroute which does that well.