Home network

G

Guest

Guest
I've got a pretty nasty situation. Me and my friend each own a cable modem. We'd like to setup a home network between three computers using both modems. The cable modems have dynamic ips that the DHCP changes about once every month. Is it possible to setup a home network running Unix/Linux/BSD with this configuration? If so I'd greatly appreciate your help. Thanx!
 

Kelledin

Distinguished
Mar 1, 2001
2,183
0
19,780
Hmmm...a lot (all?) cable modems are actually part of a Windows workgroup called @HOME--a workgroup that's actually visible on the Internet. So there's a pretty good chance that you and your friend are both actually in the @HOME workgroup. In this case, you can set up the Samba service appropriately on the two cable modem boxen, and those two boxen should be able to see each other fine.

Getting the two boxen set up as routers would be a little more difficult...the first step would be to arrange with your friend to have your internal network on one range if private IPs (say 192.168.0.x) and his internal network on another range that doesn't overlap yours (say 192.168.1.x), then set up your route tables appropriately on each box.

The difficult part would be getting the two routers to track each other. "nmblookup" (part of Samba) can be used to get the IP address of an SMB-enabled box manually, but it won't be done automatically. AFAIK there's no way to get Linux to automatically do hostname resolution by nmblookup. You could conceivably have a script running on each router that starts, gets the IP of the other router via nmblookup, sets up its route tables and IP forwarding rules appropriately, then checks for an IP change every five minutes or so. The problem with this is that every time a router's IP changes, there will be a brief period of disconnection until the script checks IPs again (the script would also take up an almost negligible amount of resources).

Kelledin

bash-2.04$ kill -9 1
init: Just what do you think you're doing, Dave?