File Sharing On A LAN With Two Routers

File sharing on a LAN with a single segment (all computers connected to the same router) is fairly simple. Windows Networking uses requests broadcasted between all computers, transported over NetBIOS Over TCP (NetBT).

  • Browser broadcasts help to advertise the existence of a computer to the others. This enables each computer to be displayed in My Network Places / Network Neighborhood.
  • Name resolution broadcasts help a computer find out the IP address of another computer. With Windows Networking using NetBT, IP addresses are essential.

If you use Windows Networking in its native form, by opening My Network Places, and clicking on a server name, to see a list of its shares, you’re using broadcasts.

Now, you can’t have every computer in the world broadcasting to every other computer. So, NetBT broadcasts, by design, don’t pass thru routers. One router = one subnet = one broadcast domain.

What if you need to have two or more routers on your LAN, but you need to have just one broadcast domain, so you can share files everywhere?

  • The primary router is to be next to the broadband modem, and you have to run a long cable to another room, with a secondary router, to connect wireless computers in there.
  • The primary router ran out of ports, so you used the secondary router to add capacity to your LAN.
  • It’s simpler to run 1 cable elsewhere, and share that one cable using a router, than to run 2 (or more) separate cables from the primary router.
  • Your Internet service includes a modem that can only connect to the primary router. The primary router may be a computer running ICS.
  • The primary router is a wired router, and the secondary router is wireless.

In this example, you’ve got a pair of routers, and 4 computers. Router 1 is connected to your Internet service. Computers A and B, and Router 2, are all connected to Router1. Computers C and D are connected to Router 2.

You have Computers A and B on their subnet (LAN 1), in one broadcast domain, and Computers C and D their subnet (LAN 2), in another broadcast domain.

That’s a perfectly reasonable setup, for Internet service, but it’s not-so-great for file sharing. Computers A and B can see, and access each other. Likewise, Computers C and D can see and access each other. But neither Computer A nor B can see nor access C or D, and vice versa. It would be simpler if you would just get rid of Router 2, connect all computers to Router 1, and everything would be fine.

OK, maybe 2 routers is just something you can’t avoid, but nobody said that they have to both work as routers. What you do is only use Router 2 as a switch (or a WAP, if it’s wireless) – you can still connect the computers to it, but Router 1 will be the only functioning router. It’s a simple solution.

In this exercise, the Router 1 LAN is 192.168.0.1, and the Router 2 LAN is 192.168.1.1.

  • Don’t connect the WAN on Router 2 to anything. Connect a LAN port on Router 1, and Computers C and D, as peers, to a LAN port on Router 2.
  • Change the LAN on Router 2 from 192.168.1.1, to 192.168.0.254 (or any other address not in use, and not part of any DHCP scope).
  • Disable the DHCP server on Router 2.
  • Are you using DHCP on your LAN? If so, make sure that the DHCP server, on router 1, has a scope defined large enough to service all of the computers.
  • Restart each computer, so it gets a new IP address. This may always not be necessary with Windows XP, but do it just in case.

And that’s all you have to do. Router 1 is the only router (remember, the router has to sit between your LAN and the Internet, so that has to be Router 1). Router 2 still provides connectivity for Computers C and D, but it’s working now as a switch (or WAP). And all 4 computers – A, B, C, D – are on the same subnet.

Problem solved.

For another description of this solution, see DSLR Forums Using a Wireless Router as an Access Point (#11233)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: