The difference between switches and routers used to be very clear. Today what is sold to consumers as routers have built-in switches. And some advanced switches can do routing. But since your topic isn’t really related to your question, it’s not here or there.
Ethernet - the cables and nics that are commonly used today, is a broadcast network. Meaning every device on the wire can talk without waiting. In the olden days, there was just a wire between all the PCs, no switch - and because there was a limit to the length of that wire, we had “cheap” devices called hubs that simply took X number of plugs and connected them electrically as if it was one long wire. On that wire, only ONE pc could talk at a time. While it talked, everyone else had to listen and wait for silence; then it would try and if nobody else talked it would continue to transmit.
Switches fix that - instead of electrically making it one long wire, it splits each port into its own little network. It’s quite normal that only one PC/server is on that line - but it’s not really required. It means each PC while still listening to see if there’s traffic on the wire before talking, doesn’t have to contend with other PCs talking as long as they’re not talking to it. A great advantage of this is that you get close to the physical speed limit on each port - the switch having a lot of electronics (a small computer) can forward signals from one port to another. To do this, the switch notes which MAC addresses are present on each port, and it looks at the header of the packages to determine its MAC destination and hence what port to use. The switch, even the ‘cheap’ ones, can easily forward 100Mbps from one port to another at 100Mbos both ways.
But here’s the crock of it - not every device you attach to a switch talks at the same speed. With TCP each package has to be acknowledged, so when a PC isn’t ready there’s no ACK and hence the sender has to wait. So it may have plenty of bandwidth but it’s not going anywhere until the receiver is ready.
If you have a single port on your switch that everything else wants to “share” and transmit through, when that port’s bandwidth is at its limit, the senders will be told to wait. It doesn’t have to be your cable modem - it can happen if you have a file server on one port, and have everyone in your family trying to view pictures on it at the same time. It’s like a water pipe - you can only push a certain amount of water through at a time. It doesn’t matter if you split it into several more pipes - if the water has to go through that single pipe, that’s your limit.
In advanced networking we can do a lot of things to help determine which traffic should have priority; but the limit is still the limit. It can be made to appear as not making everything slow, by giving priority to the short bursts from user-interactions, while down prioritizing long file transfers and similar.
A gateway is a device that moves traffic between networks - but it’s still bound by the same bandwidth issues. Switches are only able to stay within the networks connected to it. A gateway knows which system to send traffic to/via to get to the final destination. They often have few ports - where switches can have a lot - 24, 48 or even more. Gateway devices typically have less than 10 and often less than 5 ports. Unless you have them combined with a switch internally.
Consumer grade devices rarely have advanced features - so it’s first come, first serve. As you get more and more smart devices, streaming etc. in your home you’ll find you need more advanced networking equipment to avoid issues with everyone wanting to go online at the same time.
The difference between switches and routers used to be very clear. Today what is sold to consumers as routers have built-in switches. And some advanced switches can do routing. But since your topic isn’t really related to your question, it’s not here or there.
Ethernet - the cables and nics that are commonly used today, is a broadcast network. Meaning every device on the wire can talk without waiting. In the olden days, there was just a wire between all the PCs, no switch - and because there was a limit to the length of that wire, we had “cheap” devices called hubs that simply took X number of plugs and connected them electrically as if it was one long wire. On that wire, only ONE pc could talk at a time. While it talked, everyone else had to listen and wait for silence; then it would try and if nobody else talked it would continue to transmit.
Switches fix that - instead of electrically making it one long wire, it splits each port into its own little network. It’s quite normal that only one PC/server is on that line - but it’s not really required. It means each PC while still listening to see if there’s traffic on the wire before talking, doesn’t have to contend with other PCs talking as long as they’re not talking to it. A great advantage of this is that you get close to the physical speed limit on each port - the switch having a lot of electronics (a small computer) can forward signals from one port to another. To do this, the switch notes which MAC addresses are present on each port, and it looks at the header of the packages to determine its MAC destination and hence what port to use. The switch, even the ‘cheap’ ones, can easily forward 100Mbps from one port to another at 100Mbos both ways.
But here’s the crock of it - not every device you attach to a switch talks at the same speed. With TCP each package has to be acknowledged, so when a PC isn’t ready there’s no ACK and hence the sender has to wait. So it may have plenty of bandwidth but it’s not going anywhere until the receiver is ready.
If you have a single port on your switch that everything else wants to “share” and transmit through, when that port’s bandwidth is at its limit, the senders will be told to wait. It doesn’t have to be your cable modem - it can happen if you have a file server on one port, and have everyone in your family trying to view pictures on it at the same time. It’s like a water pipe - you can only push a certain amount of water through at a time. It doesn’t matter if you split it into several more pipes - if the water has to go through that single pipe, that’s your limit.
In advanced networking we can do a lot of things to help determine which traffic should have priority; but the limit is still the limit. It can be made to appear as not making everything slow, by giving priority to the short bursts from user-interactions, while down prioritizing long file transfers and similar.
A gateway is a device that moves traffic between networks - but it’s still bound by the same bandwidth issues. Switches are only able to stay within the networks connected to it. A gateway knows which system to send traffic to/via to get to the final destination. They often have few ports - where switches can have a lot - 24, 48 or even more. Gateway devices typically have less than 10 and often less than 5 ports. Unless you have them combined with a switch internally.
Consumer grade devices rarely have advanced features - so it’s first come, first serve. As you get more and more smart devices, streaming etc. in your home you’ll find you need more advanced networking equipment to avoid issues with everyone wanting to go online at the same time.