Switch vs Router for connecting workstations

eepyikes

Distinguished
Jan 15, 2010
24
0
18,510
If you have a router connected to a switch, and then two computers connected to the switch sending data to one another, is the speed any different than just connecting the two computers to the router?

In my case, I've got the Archer C5 running internet/wifi for the whole house (TV/Roku/couple laptops/ipads). I have two workstations that share files and run VEPRO and RDP, so ideally the fastest throughput is best for those two computers talking to each other (internet speed not important here). If I just connect those two computers to the switch and connect the switch to the router, is all the workstation traffic then limited only by the switch? Or will it be limited by what's going on in the whole network (say, roommates watching netflix and playing games online via the router).

Just testing it under normal circumstances with LAN Speed Test, there was no real difference whether I connected the workstations via switch or via the router, but at the time none of the other computers in the house were using internet, so I didn't get a good reading. But in theory at least, shouldn't the two computers connected via switch communicate to each other faster than if they were connected to the router with all the other stuff in the house?
 
Solution
Let take a much simpler case. You plug 4 machines into your router lan ports. machines 1 and 2 can transfer 1g of traffic between them...technically they can send 2g if they send in both directions at the same time. Machines 3 and 4 are not affected by this traffic at all. They can also tranfer traffic between each other or they could go to the internet which is connected thought the router chip to the lan ports by a 5 port you can not see.


So then the switch traffic is not "separated" from the router traffic? IE, does the data go from workstation 1 to the switch to the router then back down to the switch to workstation 2? Or does it just go from workstation 1 to the switch to workstation 2?
 


a switch basically lets you connect more off you router/modem but it still is separated where each workstation will still get assigned its own IP address

 
The lan ports in a router are actually connected to a small switch chip inside the router. This chip is then connected to the router chip. It will work the same as if you used a external switch for lan-lan traffic Obviously the traffic must go thought he ports but it does not pass though the router chip.
 
EDITED:
So lets say you have PC 1, 2, and 3 connected to the router, PC 4-10 connected to the switch.

PC 4-10 can communicate with each other without the data having to travel up to the router and back down to the switch, as the switch will recognize the mac destination is arleady on its switch and just transfer it through.

The ideal way to connect netwokring is to have modem go to router, router to switch and all devices connected to switch. It is also best to have say 1 24 port switch then 3 8 port switches.
While you loose very very little speed haivng to hop from switch to switch you make it so that all 7 computers connected to that bottom switch are limited to the single 1gbps connection to all devices on the parent switch.
So if all PCs are on 1 24 port switch you could have many simultanious connections to other PCs all running at gigabit speed. But if you had 3 8 port switches and if the 7 computers on one switch all wanted to talk to computers on other switches they would have to share the single 1gbps connection that has switch has to the other switches.


To summerize your question:
Looking at a single connection from PC 1 to PC 2 there will be zero noticable difference and the traffic on the switch ports in no way reduces the routers speed to say provide a fast download to PC 3.
Now you will notice a differecne having to go up and down the switch to router if there is multiple independant computers connecting with each other.
 


as long as all the devices are on the same subnet (ex. 255.255.255.0) they will be able to communicate. the problem can come if you setup another router that may have a different default gate way and subnet mask which will cause problems with the computers communication between each router

 


Yes a second router also providing NAT would cause issues. The fact that it is on a different subnet can easily be fixed by changing the subnet settings on devices, the real problem comes from NAT seperation between the WAN and LAN interface on router, but unless i missed something that is completley not in the scope of this quesiton.
 
One thing else to add for consideration depending on your setup.

If you have 1 single server PC and many clients then no matter how you wire it the Server can only provide 1gbps bandwidth to the switch.
So if you have 2 computers both wanting files at the same time they will either have to wait in line or both get half of the server's 1gbps link to the switch.

The remidy to this is called NIC teaming (also called port trunking and a few other terms). For my server PC funcitoning as a NAS, among other things, I got a higher end Intel network card so I can bind multiple nics together. My specific card only had 2 ports so I now have 2gbps bandwidth but you can get cards with up to 8 nics on them to have 8gbps bandwidth.
 
So it looks like in theory having the 2 workstations on their own switch would be faster, as they wouldn't be traffic jammed with other computers at the router level. Though, in this particular case there will probably be no difference because all of the other router traffic is wireless, so wifi traffic is probably not competing with the eth ports?
 
Let take a much simpler case. You plug 4 machines into your router lan ports. machines 1 and 2 can transfer 1g of traffic between them...technically they can send 2g if they send in both directions at the same time. Machines 3 and 4 are not affected by this traffic at all. They can also tranfer traffic between each other or they could go to the internet which is connected thought the router chip to the lan ports by a 5 port you can not see.
 
Solution