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] 1 points 11 months ago (1 children)

Link speed is your hard limit -- you can't go faster than that. Nothing gets divided up just because a device is on. The concept of bottlenecks is what's important. If you had a 100Mbs switch (with 1Gbs uplink) and a 1Gbs router with a 500Mbs ISP speed, a PC on the switch will be bottlenecked at your 100mbs switch port -- it won't be able to go beyond 100mbs. If you have 5 PC's on that 100Mbs switch all trying to do 100Mbs each (since that's the bottleneck of the switch), each PC will be able to do 100Mbs and since you have a 500Mbs speed connection -- each PC should get 100Mbs. The switch uplink will pass 500Mbs/1000Mbs and the router will pass 500Mbs to the ISP. If you add a 6th PC trying to do 100Mbs then it gets bottlenecked at the ISP link since it can only do 500Mbs even though the router can do 1Gbs.

If your 100Mbs switch had no 1Gbs uplink then the fastest switchport to the router would be 100Mbs. In the first scenario of 5 PC's trying to do 100Mbs each, they would all be throttled to roughly 20Mbs since the total connection out of the switch would be 100Mbs. If only 1 device tried downloading, the limit would be 100Mbs for that device since the limit would be the link speed of the switch to the router.

If you had a PC directly connected to your router at 1Gbs bypassing any 100Mbs switch limits, the bottleneck would be at the ISP of 500Mbs. If you had devices on the 100Mbs switch (with 100Mbs uplink) trying to download at max capacity while your PC was directly connected, your expected speed would be 400Mbs since 100Mbs would be going to the switch.

The concept of a 24-port Gigabit switch with only 1Gbs uplink works because no device is expected to be constantly utilizing 1Gbs for a sustained period of time. They also supply full bandwidth to ports across the switch that don't have to go across a common uplink. PC A and PC B can talk to each other at 1Gbs if on the same switch while PC C is talking to the Internet at 1Gbs. As long as the devices aren't utilizing a common port at the same time, there's no bottleneck.

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

No switch or router does load balancing, you wont get 5 times 20mbit it will be all over the place...

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

You could actually expect less than 20Mbs because of congestion issues assuming no QoS and you're right that any port might get more at any particular moment of time. This is mean to be an illustration of bottlenecks and not an implication of layer-2 load balancing. The traffic just can't be more than what the bottleneck will allow.

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

There's another variable here, which is the behavior that TCP and UDP flows have on each other. There are a number of TCP congestion management algorithms that have been developed over the years. This paper, for example, shows that BBR congestion control is very unfair to CUBIC. IOW, if one PC is using BBR and another CUBIC, the first PC will hog most of the bandwidth.

Similarly, QUIC, which is a UDP-based alternative to TCP originally developed by Google and used a lot by Chrome, is quite unfair to TCP as the images show.

Anyway, this is a bit off topic. The main point that the network is only as fast as the slowest link is correct.