Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a very simple question: if I have a router (DHCP enabled - leasing IP addresses between 192.168.0.2 and 192.168.0.254) with a switch plugged in, and I plug two computers into the switch, will the network traffic (file transfers etc.) be sent through the router, or will it simply go straight through the switch to the other computer completely avoiding the router?

share|improve this question
    
This is the perfect website for it. All general purpose software and hardware questions have a home on superuser :) –  Darth Android Jun 10 '11 at 17:37
    
Glad to hear it :) Just with all the new sites coming from Area 51 (!) I wasn't sure –  jrtc27 Jun 10 '11 at 17:46
    
If the question was about large, managed switches operating corporate networks, I'd point you towards serverfault.com, but home networking with consumer-grade routers is just fine here. And yes, all the new sites are confusing sometimes. –  Darth Android Jun 10 '11 at 17:52
    
Just so everyone knows - the plan is to have at least 10 devices plugged into the switch, each of which could potentially be transferring data over a gigabit connection at the same time. –  jrtc27 Jun 10 '11 at 17:54
1  
If that's the case, you'll want to verify the switching capacity of the router's backplane, since that will be handling all of the data going through the switch at once. Usually it's sufficient to support total utilization by all ports, but it's something worth looking into if the information is easily available. For example, a 24-port gigabit switch might have a switching capacity of 48Gbps, or sending and receiving on all 24 ports at 1Gbps at the same time. –  Darth Android Jun 10 '11 at 18:08

2 Answers 2

up vote 13 down vote accepted

In short, no.

The switch should keep track of which MAC addresses can be reached on which ports, and it then only sends packets out through the correct ports. There is a limit to how many MAC addresses a switch can remember, though it's usually not an issue unless you're operating extremely large networks.

Furthermore, most consumer routers are actually a switch for the LAN ports, which is then connected to the routing hardware which sits between this switch and the WAN port, so even if you don't have a separate switch, you still won't be able to control routing of packets that are directed to another computer within the LAN.

As an example, you can connect 2 computers to a switch with gigabit links, and then connect that switch to a router with a 100Mbit link, and still send data between the computers at speeds of 1Gbps. You can even disconnect the router from the switch entirely while data is being sent between the computers without affecting said data

I would like to point out that all of this becomes way more complicated once you introduce other protocols, such as VLAN tagging, but that is outside the scope of a home user simply transferring files between computers at home. This is a good primer if you're looking into that, though.

share|improve this answer
    
So if I have a load of devices (say 6) connected to the switch which in turn is connected to the router over 1Gbps ethernet cable and I transfer files between each pair of devices at the same time, will there be a bottleneck due to the 1Gbps connection to the router, or will that connection not need to be used? –  jrtc27 Jun 10 '11 at 17:47
1  
It won't be used. No bottleneck due to the switch-router connection as long as all your traffic is local from device to device plugged into the switch. –  KCotreau Jun 10 '11 at 17:53
1  
That connection will be unused, and you should be able to unplug it during the file transfer with no adverse affects. This is not true if you are using VLAN tagging, in which case you have to have a switch capable of VLAN routing or you will run into the Router on a Stick problem. There is more information on that here serverfault.com/questions/188350/how-do-vlans-work –  Darth Android Jun 10 '11 at 17:59
    
Don't worry - this is just a simple home network set-up, just with a few more connections than the average home - I have no plans for using a VLAN (I have nothing to use it for). Thanks for the answer Darth Android - I will accept yours, but it would be great if you could edit it to include this information for any future readers. Thanks again :) –  jrtc27 Jun 10 '11 at 18:08
    
If you only have two computers, you don't need a switch. A crossover cable can serve as your network infrastructure. –  mpez0 Jun 10 '11 at 18:29

Every network card listens to all the traffic, but in this case, it does not actually route it, so I would not say it passes through it. (I mis-read the original question...thought it was a router/switch combo).

On another note: Although super unlikely to cause any problems (because it won't get to the last address to give out), your DHCP scope should be 192.168.0.2-192.168.0.254, excluding the broadcast address 192.168.0.255.

share|improve this answer
    
RE: DCHP scope - I was doing it from memory, not from my settings - apologies for my mistake. –  jrtc27 Jun 10 '11 at 17:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.