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 Server Message Blocks (SMBs) broadcast between all computers. In most networks, SMBs are transported over IP.

  • 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 transporting SMBs over IP, accurate and complete IP information is 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. If you try to access a server by name, you're probably using broadcasts.

Now, you can't have every computer in the world broadcasting to every other computer. So, SMB 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.

Maybe using 2 routers is something you just 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.

If you're lucky, and have a high end NAT router, your router may have a switch - maybe physical, maybe set in the router setup - that will put it into "Access Point Mode" or similar. Check your owners manual.

If not, you simply change the way the router is connected, and used.

In this exercise, the Router 1 LAN is, and the Router 2 LAN is

  • 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.
  • Disable the DHCP server on Router 2.
  • Change the LAN on Router 2 from, to (or any other address not in use, and not part of any DHCP scope).
  • 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 / Vista, but be prepared to do this.

In a variant of this setup, Router 2 is distant from Router 1, and you won't be running Ethernet cables between the two. You'll configure Router 2 the same as in the above scenario, then put it into client mode connected to Router 1 by WiFi. Router 2 then becomes a WiFi bridge client, and provides service to Computers C and D, which connect to it by Ethernet.

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 WiFi AP). And all 4 computers - A, B, C, D - are now on the same broadcast domain, and the same subnet.

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

>> Top


123 said...

Thank you. I've been searching the net for a while, but all I could find were very specific cases. A guide like this is handy, so thanks again!

Daniel Koning said...

Thank you very much for posting such an easy explaination. I've been scratching my head ALL day with regards to this, and it turned out I had to unplug the cable from the WAN port on router 2, and plug it into one of the LAN ports. No other thread on any website made that so clear.

Thanks again!


TJ365 said...

Thank you I just spent 4 hours trying to do just that. was about to give up when I ran across your post and 3 seconds later I was done. Works like I want it to now.

hamenoskili said...

Wow so easy thank you I didn't know how to share my files on my second router with the other devices connected on the first router! Changed to access point switched from WAP to lan. All done! Thanks!