Home » Questions » Computers [ Ask a new question ]

How can I join two simple home networks together using an ethernet cable?

How can I join two simple home networks together using an ethernet cable?

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

Asked by: Guest | Views: 81
Total answers/comments: 5
Guest [Entry]

"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
gateways that let you add additional routs.

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
| |
ADSL modem A ADSL modem 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.

Note that the Linksys or D/Link ""DMZ"" functionality is NOT what I am talking about here.

But my guess is we are talking $50 cheapie firewalls here, so you are probably looking at scrounging another box to do this job.

As a short term fix, you could replace one of the Gateways with a small switch, disconnect the DSL from that side of the network, and run a long cable to the other apartment. Then reboot the computers on the now-disconnected side. That would make those computers join the other network, which means that for the duration of the game they'd be using the Internet from the other apartment, but it would at least let you play. ie:

PC A1 PC A2 PC B1 PC B2
\ / \ /
Gateway A ------ cable ----- switch
|
ADSL modem A"
Guest [Entry]

"How about doing it in layer 2? No fancy router software required.

Have both networks be the same IP scope
Have each apartment's gateway use a different address in that scope
Have the DHCP servers allocate different host addresses within that scope
Use your dual-NIC machines as bridges (or see update below)

So you set Gateway A to 192.168.0.1, Gateway B to 192.168.0.128 (but each still using .255 netmasks).
PC A1, A2, ... get

address 192.168.0.2, .3, ...
LAN netmask 192.168.0.255
default route 192.168.0.1
DNS servers for modem A

PC B1, B2, ... get

address 192.168.0.129, .130 etc.
LAN netmask 192.168.0.255
default route 192.1.0.128
DNS servers for modem B

Then PC A1 has all the settings to use modem A for internet access, but sees PC B1 on it's local network. It doesn't know that B1 has a different default gateway and DNS servers and it doesn't care.

The bit I'm not 100% sure about is using DHCP like this. I think that if you list each apartment's PCs' MAC addresses in each DHCP server then each PC will be happy to be served by the local gateway and won't worry that it is rejected by the other apartment's DHCP server. But if you can't, it's not hard to configure all the PCs' IP addresses manually.

Update: Actually there's no need for dual-NIC PCs and software bridges, just join one switch in each network together. Run your long cable from a spare LAN port on Gateway A to a spare LAN port on Gateway B. If your $50 gateways don't auto-sense crossover, use a crossover cable."
Guest [Entry]

If you want to bridge the networks without a cable (not sure of the distance between then) you can always go get a wireless router that has wireless bridging functionality. You can have one apartment broadcast a wireless signal, and the bridge grab it and act as a relay to the other apartment's network.
Guest [Entry]

Or use a crossover cable, makes life much easier, but you lose a lan port in the router, since it doesn't use the internet port on either side.
Guest [Entry]

"VPN would be great, you even doesn't need the cable.

You had two different router rights? well try this:

PCA1 - 192.168.A.1
PCA2 - 192.168.A.2
GWA0 - 192.168.A.254 --> the lan ip on your router A

Change the B Network:

PCB1 - 192.168.A.3
PCB2 - 192.168.A.4
GWB0 - 192.168.A.253 --> the lan ip on your router B

The cable will connect GWA0 and GWB0

Then...

Disable DHCP on GWA0 and GWB0, or use static ip assigment to each pc on each physical network, so PCB2 will recieve 192.168.A.253 as his gateway, and so PCA2 will use 192.168.A.254
Filter out(Firewall) PCB2, PCB1 IP on GWA0, vice-versa on GWB0
The L2 broadcast between GWA and GWB will be locals"