Connecting two independent networks onto a switch

I have two independent ISP connections connected to two separate routers. I am just curious what will happen If I connected the two routers to a single switch and then connected a computer to one of the switch's port. Will this setup even work, If so Which connection will my Computer use? Can I build a backup internet system out of this?

(Router : TP-LINK TL-WR840N )

1 Answer

It'll technically work, but it is not a good idea at all.

  • When you connect two DHCP servers to the same subnet using a switch, a client will get offers from both and will usually choose the first offer that arrives, ignoring the rest. So depending on the routers themselves, either the "faster" router wins most of the time, or it'll be mostly random as to which one wins. There will be no automatic failover – once a client gets an address lease, it'll keep using it.

  • When you connect two IPv6 SLAAC capable routers to the same subnet using a switch, a client will get advertisements from both and will usually accept all of them; it will have multiple IPv6 addresses (belonging to all subnets at once) and multiple default gateways. Current systems will treat all gateways as equivalent, only differing in priority, i.e. they will expect any gateway to handle packets for any prefix. Additionally, they will only fail over if the gateway itself is down, not if its uplink is down.

  • If a router has DHCP and IPv6 SLAAC services disabled, then it's just a passive device and connecting it to a switch has no immediate effect – unless hosts are manually configured to use it, in which case of course there won't be any automatic failover. (Assuming it has an unique IP address of course.)

  • Although... when you connect two routers with the same IP address to the same subnet using a switch, then a client will get ARP responses from both and (again) will usually choose the first one that arrives – AFAIK. However, unlike with DHCP above, it's quite possible that the client's ARP cache will keep switching between the two devices randomly – so if the routers don't provide completely identical uplink, then all connections will keep breaking randomly.

The usual method of implementing automatic failover is to put a single router in front of both connections and let it deal with the switching. (Many router firmwares have a "multi-WAN" or "failover" feature; check if yours does.) This will still cause connections to break during switchover, but at least it'll be predictable.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like