Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I put a switch before my router in my home network?

Here is a diagram of how I want to set up my network:

╔═════════════════════════════════╗  ╔═════════════════════════════════════════╗
║       Cable Access Panel        ║  ║              Home Office                ║
║ ┌─────────────┐   ┌──────────┐  ║  ║   ┌─────────────────────┐               ║
║ │ Cable Modem ├──►│  Switch  ├──╫──╫──►│        Router       │___┌─────────┐ ║
║ └─────────────┘   └─┬──────┬─┘  ║  ║   └─┬────────┬────────┬─┘   │ Printer │ ║
╚═════════════════════╪══════╪════╝  ║     │        │        │     └─────────┘ ║
                   ┌──┴──┐┌──┴──┐    ║ ┌───┴─┐ ┌────┴────┐ ┌─┴───┐             ║
                   │ PC1 ││ PC2 │    ║ │ PC3 │ │ Ext. HD │ │ PC4 │             ║
                   └─────┘└─────┘    ║ └─────┘ └─────────┘ └─────┘             ║

The reason I want to do this is because my router is also my wireless access point. My cable modem is located in the far corner of my home where my phone/tv/network access panel is. I'd rather keep the wireless access point in a more central location, but I'm not sure if DHCP will continue to work properly with that configuration.

Edit: I'd like to continue to be able to share files and access my networked drive and printer from each computer in the house.

share|improve this question
up vote 2 down vote accepted

DHCP will not work properly, but it isn't the DHCP between your router and the machines behind your router that won't work, it's the DHCP between your ISP and your router.

Assume you aren't trying to stick a switch in the middle like that. Your router gets a public IP via DHCP from your ISP, on its WAN interface. Your router is also running it's own DHCP server, and handing out addresses probably on the 192.168.0.X subnet to machines connected to it, on the LAN interfaces. Read on to see why this relevant.

The first hurdle is that if your cable modem works like mine (which, since mine is a Comcast modem, is likely) it will not recognize a second machine behind it. I have to reset my cable modem any time I change what it is connected to.

THe second hurdle is that your ISP is very very unlikely, even if the cable modem did cooperate, willing to give you two public IP addresses without paying for them.

There's lots of ways to solve your problem, but since the location of the router/AP is important, it's going to be easiest in my opinion if you get a second router and place it where the switch is now, or get wifi dongles for PC1 and PC2.

share|improve this answer

Router will need to be configured as a bridge (no assignment of DHCP) and your modem would need to have the ability to create a network. I agree that the switch would be happier downstream of the router.

share|improve this answer

It'll work, but your PC1 and PC2 won't be behind the router/firewall.

EDIT: If you want your PC1 and PC2 behind the firewall, you'll need some long cables. Your cable modem should go in the WAN port of the router, and the PCs into LAN ports.

Alternatively, you could use the switch into a LAN port, and a separate long cable for the modem and the router via the WAN port.

share|improve this answer
and they likely won't be able to get out to the internet – warren Feb 28 '11 at 21:08
Ok... so what part will work? Just LAN connections? – gilly3 Feb 28 '11 at 21:14
@warren - It depends how the router is plugged in. If it's on the same physical network, and it's not the external port, it may work. But you make an excellent point. – user3463 Feb 28 '11 at 21:15
I've made some suggestions in my answer. – user3463 Feb 28 '11 at 21:17

The cable modem has to be connected into a single device which connects to the internet. Either a single PC, in which case only that PC will be able to get to the internet, or to a router, in which case all the computers connected to the router would be able to get to the internet.

The connection between the router and the cable modem will be running PPPoE not TCP/IP, and so the router will not be able to communicate with computers on that side of it.

What you want to do is basically swap the router and switch over, so it goes:

cable modem -> router ------------------> switch -> pcs
                   \-----> pcs
share|improve this answer
You could always add a wireless repeater to increase the range of your wireless signal. – Majenko Feb 28 '11 at 21:30

Look for a good layer-2 switch that can also take over dhcp duties from the router, configure the router to run in bridge mode (or just turn off dhcp and connect your upstream cable to a normal lan port), and set up dhcp on the switch to use the same subnet as your cable modem's internal ip network address and hand out that address as the default gateway.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .