Router – Best way to split LAN computers on two WANs (not load balancing)

network-topologynetworkingpfsenserouterwide-area-network

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.

Best Answer

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:

Protocol: any
Source: x.x.x.x (or a range, if appropriate)
Destination: any
Gateway: (select WAN connection)

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)