this post was submitted on 26 Nov 2023
3 points (100.0% liked)

Home Networking

198 readers
1 users here now

A community to help people learn, install, set up or troubleshoot their home network equipment and solutions.

Rules

founded 1 year ago
MODERATORS
 

Probably a very basic question but confused the hell out of me - say if I have 100mb internet at home, and scenario one, a router with 100mb port speed and I connect two PCs to it, each has a 100mb NIC card, is it true that ignoring other factors I should be able to get close to, if not 100mb connection on each of the PCs? On the other hand, scenario 2, if I have a (unmanaged) switch and I connect the PCs to the switch I would only ended up getting 50mb each on each of the PCs (i.e., the switch essentially "halved" my internet speed if I connect 2 PCs to it, 1/3 if I connect 3 PCs to it, etc)?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 11 months ago (6 children)

Ok I guess we have to start way in front of your question to not just answer your question but give you an understanding.

First of all, what does a switch do: A switch has for example 24 ports and all ports are connected to the CPU of the switch. When a pc connected to the switch wants to reach the router to access the internet he asks the switch to really the data to the router but the switch doesn’t know where the router is so it sends on all ports „Hey are you 192.168.0.1(for example if it’s the gateway in your network config)“ then on one port the router answered „yes“ and the switch makes a note on a list that this up is on port x. So over time the switch knows who is where and what speed does the port support. Because said CPU has a bandwidth normally greater than the sum of all ports (rock a Unifi 24 port switch by chance and it had 26gbit bandwidth) it can for example connect 2 pcs transfering files with a full gigabit all while running a download from the internet router to a third pc with no problem. So as long as you don’t want to access one ressource with multiple PCs you have full speed and if you do the packets are stored in a small buffer and if it is full the PCs are told to wait a millisecond and it is transfered in a first come first serve method so everyone can get data through.

All a router does extra on top is have an extra list if he doesn’t find the receiver of the packets internally he notes the address of the PC that asked and sends the request to the wan port and when someone responds he know who to send the response internally.

[–] [email protected] 1 points 11 months ago (5 children)

Thanks for the detailed explanation - so if I understand this correctly, basically there is a port speed and there is an internal bandwidth speed - a port speed could be 100M, 1G, or 10Gbit, for example, but the internal bandwidth should be much much larger than that.

My follow up question is then: if I have a ISP modem -> router A and ISP modem -> switch -> router B connection set up (both connecting from the same ISP modem but using different ports on the modem) and all my PCs/game consoles/smart TVs are connecting to router B and all my IoT devices are connecting router A, in terms of the speed for devices connected to Router B it should, at least in theory, enjoying whatever bandwidth that's not used by the IoT devices in router A (which I assume would be minimum) and if I only have one PC turned on and that's the only device connecting to router B then my PC should almost have the same speed as the minimum of all port speed and my internet speed? Is that correct?

[–] [email protected] 1 points 11 months ago

The first part is correct, mostly it isn't "much much" higher because it is wasted performance but you could hace a 24port switch with the CPU of a 48 port switch and you could have over 50GBit internal switching bandwidth for the 24 ports.

The Second part is a bit strange for me. Probably because of the wording. When you say modem it is probably already a router because you have multiple LAN ports. A Modem normaly only supports 1 WAN and 1 LAN Port at consumer level devices.

You can have routers behind routers but unless manually configured correctly on the main router and the 2 routers WAN the 2 LAN Networks behind each router can't reach each other, like you cant easily reach your neighbors PC unless he opens a connection to it specifically.

Whats the model number of the thing you called a Modem?

Can you extend on what you meant when you statet "which I assume would be minimum"

And without and even in some cases with expensive load balancers you cant say stuff like "use bandwidth that is left by IoT" for example. It is very random who gets more or less bandwidth of a connection when it is at full capacity. Because of the way TCP was designed in the beginning. Resiliency was much more important than fairness ;)

load more comments (4 replies)
load more comments (4 replies)