2 ms·
Ok, so part one, like everyone is suggesting is you can probably make this fully automatic. I say, you don't even need to change the router IPs, but it's more d
by toast0 3y ago
Ok, so part one, like everyone is suggesting is you can probably make this fully automatic. I say, you don't even need to change the router IPs, but it's more difficult if you don't (you might need to setup 1:1 NAT to get sensible addresses and go from there). A new router with 4 interfaces, one to each modem and one to your network switch (if you can change modem IPs and disable DHCP on them, you can do everything with one NIC and a single collision domain, although you may not want to). You could get two devices each with 4 interfaces and use pfsync and CARP to make failover nearly seamless. There's appliances for this, but I've setup something similar from scratch on FreeBSD, use DSL if it's up, fail over to LTE otherwise.
Part two: what you asked for exists. Look for bypass NICs. There's a couple different flavors, but the commonly available pattern is a dual-port NIC, which you run a utility to switch from bypass mode (the two ports are connected via relays, the NICs are disconnected) to regular mode (each port serves one NIC).
If addressing is compatible, you could have three bypass nics, plug one end of each to your switch, the other end to a modem. The selected modem would be in bypass mode, and unselected modems would be in regular mode. (You could also do this with software bridging, only bridge the selected modem). I've had success with silicom bypass NICs, for older models like PEG4BPI, the -SD model is going to be easier to use PEG4BPI-SD has PCI ids set so that standard OS nic drivers will load automatically for the nics, but PEG4BPI has PCI ids set up differently and drivers won't start unless you modify them or can force them. You can actually modify the eeprom and turn a regular into a -SD, with just one bit flip, but that's an ordeal.
- jaclaz 3y agoThese bypass NICs sound interesting, thanks, I'll have a look for them.
- toast0 3y agoPlenty used on ebay at low cost. Quad port 1G (two sets of bypass) go for $25. Dual port (one set) 10g-baseT is maybe $30ish. Fiber bypass nics are also available, they'll have direct fiber connectors rather than SFP+ though (bypass will be optical).
- zamadatix 3y agoAt the last place I worked (3200 physical locations) we scrapped physical bypass ports/NICs because they seemed to create more site outage time than they ever solved (maybe there is actually a model that is reliable at scale, but we didn't find it). A port physical state watch script tends to be better. I don't know what lower end gear has it though, some may even support that as a mode of their "WAN monitoring" instead of actively sending probes. Worst case I know Ubiquiti Edgerouters let you run your own scripts on the Linux base and it'd be a matter of running "primary port up ? remove vlan from backup port and add vlan to primary port : remove vlan from primary port and add vlan to backup port" in a loop every second (there may even be a native feature for it though so check that first).