How to Connect Two Networks to Share Resources

lan

We have two offices with separate routers and Internet connections. Is it possible to connect them with a LAN cable so they can share files?

The first router is at gateway 192.168.100.1 the second is at 192.168.101.1.
From what I read I will need to assign static routes in the routers. Is that all I need to do?

Best Answer

From the perspective of the network, you need the physical connection between the two routers on a common subnet, but you also need the routers to share routes, either through a common routing protocol, or by configuring static routes. You need to make sure there are no overlapping routes, too.

From the perspective of the computers connected to the networks, you may have a problem with DHCP. You will need to make sure that the routers only connect to each other on their own link, not the LAN of the other router. When a host requests DHCP, it will use the first DHCP response, which may end up being the wrong DHCP server if the two separate networks are connected via layer-2, not layer-3.