I know there are managed switches out there that allow you to hardcode the speed of their ports to 10/100/1000 Mb per second. But what if I want to set the speed to only 1 Mb per second or perhaps even 500 Kb per second. Are there any switches that support this kind of setting? If no are there any other solutions to this problem?


The problem I'm facing is I want to run a small webserver at home that will be used by very few people. Since my internet speed is relatively low - 20Mb per second, I don't want it to overload the bandwidth too much so I would like to limit the upload speed to let's say 1Mb per second, so I know my home internet will work pretty much fine. I though that having a switch that allow only 1Mb per second through one of its ports will be a perfect solution to this problem.

  • 4
    10Mbps, 100Mbps and 1Gbps are three different ethernet protocols. There's no protocol for 1Mbps, so even if you could set a switch port to 1Mbps no computer would be able to talk to it. This sounds like an XY problem to me, can you describe what you're actually trying to achieve? – Harry Johnston Oct 17 '18 at 5:49
  • 3
    You need a managed switch with traffic shaping capabilities. With traffic shaping you can assign maximum bandwidth to a single or a group of ports. However, these switches are not exactly cheap. If you can detail your problem and your need, we may provide an easier to implement answer. – bayindirh Oct 17 '18 at 6:23
  • 1
    @HarryJohnston I've updated the question with the actual problem I'm trying to solve. – Mykhailo Seniutovych Oct 17 '18 at 7:03
  • 3
    @MykhailoSeniutovych, Instead of limiting the bandwidth on the switch layer, you can run software based traffic shapers in Linux. ArchLinux has an introductory document here. Take a look if you wish. – bayindirh Oct 17 '18 at 8:01

If you're running Linux, you can use software traffic shaping instead of limiting the server at the switch layer.

It'll be obviously cheaper, easier and more flexible. You can add Quality of Service (QoS) on top of it to limit/prioritize different ports, hence different applications.

Arch Linux has a nice document here. Take a look if you wish.

| improve this answer | |

No. As Harry has pointed out, 10, 100 and 1000 Mbit/s are different Ethernet protocols (on twisted pair that is 10BASE-T, 100BASE-TX, 1000BASE-T). Depending on the hardware you can force a certain protocol or limit TP's autonegotiation to specific speeds but there are no arbitrary speeds in between).

Watch out when disabling autonegotiation and forcing a speed you'll also deactivate half-duplex/full-duplex negotiation, causing a node to fall back to half duplex when it's still trying to autonegotiate. You need to either use something like Auto-10/100 to limit the negotiated speed on the switch or configure both sides (switch and host) to e.g. 100BASE-TX/FDX. Your exact options depend on your hardware.

Apart from the link speed you can configure some switches to limit the effective traffic inbound or outbound on a port to a certain throughput - excess traffic is simply dropped. While this simulates a slower link it isn't the exact same. A node linked with 100BASE-TX may send 100 Mbit/s worth of traffic through the link, but when the switch limits ingress to 20 Mbit/s, 80% of the frames will be dropped.

There are some transport layer protocols that can handle this situation automatically and adjust the flow (e.g. TCP) and some that can't (e.g. UDP). When there's no acknowledgement on the application layer either, traffic will just vanish.

Your server - or rather uplink - overloading problem is best countered by implementing QoS on the router. You should define the traffic class (server source IP, server source TCP port) and limit the maximum bandwidth that is transported. Alternatively, you can just give it low priority, so that it is simply dropped when (or slightly before) congestion starts.

If you limit the server's uplink port bandwidth on the switch you'd have the limited speed in your network as well.

| improve this answer | |

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