[Addition] There is also a method to measure with speedtest-cli ⇒ Article
This is useful to remember if you want to benchmark the network of your rented VPS machine.
$ curl http://cachefly.cachefly.net/100mb.test > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 100M 100 100M 0 0 11.4M 0 0:00:08 0:00:08 --:--:-- 12.7M
A CDN service called CacheFly publishes a test file to check the speed of your CDN. Originally it is for checking the speed of the CDN, but if you look at it the other way around, you can check the speed of the network of the machine. (On the contrary, communication is a story between two parties, so it is a natural story)
The line speed of a machine is difficult to find because it depends on the machine, location, and route to which it communicates, in addition to the network to which it connects, and this test file is very appreciated.