# Networking – How to join two simple home networks together using an ethernet cable

lannetworking

I want to join two different home networks together like so:

PC A1      PC A2                              PC B1      PC B2
\         /                                   \         /
Gateway A      <----- ethr. cable ----->      Gateway B
|                                             |


Both networks are of the basic residential type with identical configuration, with all PCs running Vista/7. The point is to temporarily join two apartments in a building for gaming and file sharing, and the holy grail would be:

1. PCs on network A can access PCs on network B and vice-versa (file shares and gaming).
2. Each network uses its own internet connection.
3. Data between networks shouldn't take a trip through the internet (broadband upload speeds are severely capped)
4. A network's internet access should continue working if the joining cable is disconnected with minimal configuration changes.

How closely can this be achieved?

Since you don't want to go through the Internet, you don't want a VPN.

You need:

• networks A and B to be different, non-overlapping IP scopes;
• a router between the two networks; and

The router needs to have two separate ethernet connecters on it. The reason for this is because if you are using DHCP on either network, you need to be able to isolate the DHCP traffic to the appropriate network. If you just glue the two networks together with an ethernet wire, there's no way to guarantee that PCs on network A wouldn't get DHCP from network B, and then use network B's internet.

So your network diagram would look like this:

PC A1      PC A2                              PC B1      PC B2
\         /                                   \         /
Gateway A         ------ Router -----         Gateway B
|                                             |


Then, Gateway A would have a route on it telling it that Network "B" was reachable via the A address on the router; Gateway B would have a route on it telling it that network "A" was reachable via the B address on the router.

Now if you have a Linux-based firewall as either Gateway, then you can probably just put another ethernet card in it and have that Gateway act as the router as well, but that's left as an exercise for the reader.

If one of the PCs involved is stronger than consumer-grade Windows and has multiple ports, I believe that it could act as the router too. I don't think XP or Vista can act as a router, though.

Also, if you have a more "business" level firewall as either gateway, you may be able to mark some ports as a different "security zone" and use that box as the router.

PC A1      PC A2                              PC B1      PC B2